OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // CeeeExecutor implementation | 5 // CeeeExecutor implementation |
6 // | 6 // |
7 // We use interfaces named ITabWindowManager and ITabWindow | 7 // We use interfaces named ITabWindowManager and ITabWindow |
8 // (documented at | 8 // (documented at |
9 // http://www.geoffchappell.com/viewer.htm?doc=studies/windows/ie/ieframe/interf
aces/itabwindowmanager.htm | 9 // http://www.geoffchappell.com/viewer.htm?doc=studies/windows/ie/ieframe/interf
aces/itabwindowmanager.htm |
10 // and | 10 // and |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 | 421 |
422 // If this is tab window then create the infobar manager. | 422 // If this is tab window then create the infobar manager. |
423 // TODO(mad@chromium.org): We are starting to need to have different classes | 423 // TODO(mad@chromium.org): We are starting to need to have different classes |
424 // for the different executors. | 424 // for the different executors. |
425 // TODO(hansl@chromium.org): We might not need to have an Executor for | 425 // TODO(hansl@chromium.org): We might not need to have an Executor for |
426 // Infobar. In any case, the construction below should have a reference to | 426 // Infobar. In any case, the construction below should have a reference to |
427 // a BHO and its EventSender so we don't create Infobars before the tab_id | 427 // a BHO and its EventSender so we don't create Infobars before the tab_id |
428 // is ready. | 428 // is ready. |
429 if (window_utils::GetTopLevelParent(hwnd_) != hwnd_) | 429 if (window_utils::GetTopLevelParent(hwnd_) != hwnd_) |
430 infobar_manager_.reset( | 430 infobar_manager_.reset( |
431 new infobar_api::InfobarManager(hwnd_, new BrokerRpcClient)); | 431 new infobar_api::InfobarManager(hwnd_, new BrokerRpcClient(false))); |
432 | 432 |
433 return S_OK; | 433 return S_OK; |
434 } | 434 } |
435 | 435 |
436 HRESULT CeeeExecutor::GetWebBrowser(IWebBrowser2** browser) { | 436 HRESULT CeeeExecutor::GetWebBrowser(IWebBrowser2** browser) { |
437 DCHECK(browser); | 437 DCHECK(browser); |
438 CComPtr<IFrameEventHandlerHost> frame_handler_host; | 438 CComPtr<IFrameEventHandlerHost> frame_handler_host; |
439 HRESULT hr = GetSite(IID_IFrameEventHandlerHost, | 439 HRESULT hr = GetSite(IID_IFrameEventHandlerHost, |
440 reinterpret_cast<void**>(&frame_handler_host)); | 440 reinterpret_cast<void**>(&frame_handler_host)); |
441 if (FAILED(hr)) { | 441 if (FAILED(hr)) { |
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1006 | 1006 |
1007 STDMETHODIMP CeeeExecutor::OnTopFrameBeforeNavigate(BSTR url) { | 1007 STDMETHODIMP CeeeExecutor::OnTopFrameBeforeNavigate(BSTR url) { |
1008 DCHECK(infobar_manager_ != NULL) << "infobar_manager_ is not initialized"; | 1008 DCHECK(infobar_manager_ != NULL) << "infobar_manager_ is not initialized"; |
1009 if (infobar_manager_ == NULL) | 1009 if (infobar_manager_ == NULL) |
1010 return E_FAIL; | 1010 return E_FAIL; |
1011 | 1011 |
1012 // According to the specification, tab navigation closes the infobar. | 1012 // According to the specification, tab navigation closes the infobar. |
1013 infobar_manager_->HideAll(); | 1013 infobar_manager_->HideAll(); |
1014 return S_OK; | 1014 return S_OK; |
1015 } | 1015 } |
OLD | NEW |