| 392 | } |
| 393 | |
| 394 | LRESULT IECommandExecutor::OnBrowserNewWindow(UINT uMsg, |
| 395 | WPARAM wParam, |
| 396 | LPARAM lParam, |
| 397 | BOOL& bHandled) { |
| 398 | LOG(TRACE) << "Entering IECommandExecutor::OnBrowserNewWindow"; |
| 399 | NewWindowInfo* info = reinterpret_cast<NewWindowInfo*>(lParam); |
| 400 | std::string target_url = info->target_url; |
| 401 | std::string new_browser_id = this->OpenNewBrowsingContext(WINDOW_WINDOW_TYPE, |
| 402 | target_url); |
| 403 | BrowserHandle new_window_wrapper; |
| 404 | this->GetManagedBrowser(new_browser_id, &new_window_wrapper); |
| 405 | if (new_window_wrapper->IsCrossZoneUrl(target_url)) { |
| 406 | new_window_wrapper->InitiateBrowserReattach(); |
| 407 | } |
| 408 | |
| 409 | LOG(DEBUG) << "Attempting to marshal interface pointer to requesting thread."; |
| 410 | IWebBrowser2* browser = new_window_wrapper->browser(); |
| 411 | HRESULT hr = ::CoMarshalInterThreadInterfaceInStream(IID_IWebBrowser2, |
| 412 | browser, |
| 413 | &(info->browser_stream)); |
| 414 | if (FAILED(hr)) { |
| 415 | LOGHR(WARN, hr) << "Marshalling of interface pointer b/w threads is failed."; |
| 416 | } |
| 417 | |
| 418 | return 0; |
| 419 | } |
| 420 | |
| 421 | LRESULT IECommandExecutor::OnBrowserCloseWait(UINT uMsg, |
| 422 | WPARAM wParam, |
nothing calls this directly
no test coverage detected