| 61 | } |
| 62 | |
| 63 | void __stdcall Browser::OnQuit() { |
| 64 | LOG(TRACE) << "Entering Browser::OnQuit"; |
| 65 | if (!this->is_explicit_close_requested_) { |
| 66 | if (this->is_awaiting_new_process()) { |
| 67 | LOG(WARN) << "A new browser process was requested. This means a Protected " |
| 68 | << "Mode boundary has been crossed, and that future commands to " |
| 69 | << "the current browser instance will fail. The driver will " |
| 70 | << "attempt to reconnect to the newly created browser object, " |
| 71 | << "but there is no guarantee it will work."; |
| 72 | DWORD process_id; |
| 73 | HWND window_handle = this->GetBrowserWindowHandle(); |
| 74 | ::GetWindowThreadProcessId(window_handle, &process_id); |
| 75 | |
| 76 | BrowserReattachInfo* info = new BrowserReattachInfo; |
| 77 | info->browser_id = this->browser_id(); |
| 78 | info->current_process_id = process_id; |
| 79 | info->known_process_ids = this->known_process_ids_; |
| 80 | |
| 81 | this->DetachEvents(); |
| 82 | this->browser_ = NULL; |
| 83 | ::PostMessage(this->executor_handle(), |
| 84 | WD_BROWSER_REATTACH, |
| 85 | NULL, |
| 86 | reinterpret_cast<LPARAM>(info)); |
| 87 | return; |
| 88 | } else { |
| 89 | LOG(WARN) << "This instance of Internet Explorer (" << this->browser_id() |
| 90 | << ") is exiting without an explicit request to close it. " |
| 91 | << "Unless you clicked a link that specifically attempts to " |
| 92 | << "close the page, that likely means a Protected Mode " |
| 93 | << "boundary has been crossed (either entering or exiting " |
| 94 | << "Protected Mode). It is highly likely that any subsequent " |
| 95 | << "commands to this driver instance will fail. THIS IS NOT A " |
| 96 | << "BUG IN THE IE DRIVER! Fix your code and/or browser " |
| 97 | << "configuration so that a Protected Mode boundary is not " |
| 98 | << "crossed."; |
| 99 | } |
| 100 | } |
| 101 | this->PostQuitMessage(); |
| 102 | } |
| 103 | |
| 104 | void __stdcall Browser::NewProcess(DWORD lCauseFlag, |
| 105 | IDispatch* pWB2, |
nothing calls this directly
no test coverage detected