| 80 | } |
| 81 | |
| 82 | void HtmlDialog::Close() { |
| 83 | LOG(TRACE) << "Entering HtmlDialog::Close"; |
| 84 | if (!this->is_closing()) { |
| 85 | this->is_navigating_ = false; |
| 86 | this->set_is_closing(true); |
| 87 | // Closing the browser, so having focus on a frame doesn't |
| 88 | // make any sense. |
| 89 | this->SetFocusedFrameByElement(NULL); |
| 90 | this->DetachEvents(); |
| 91 | this->window_->close(); |
| 92 | |
| 93 | // Must manually release the CComPtr<IHTMLWindow> so that the |
| 94 | // destructor will not try to release a no-longer-valid object. |
| 95 | this->window_.Release(); |
| 96 | this->window_ = NULL; |
| 97 | |
| 98 | this->PostQuitMessage(); |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | bool HtmlDialog::IsValidWindow() { |
| 103 | LOG(TRACE) << "Entering HtmlDialog::IsValidWindow"; |
nothing calls this directly
no test coverage detected