Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: ceee/ie/plugin/bho/executor.cc

Issue 5533007: Revert 68290 - Restored missing BrokerRpcClient::Connect.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ceee/ie/plugin/bho/executor.h ('k') | ceee/ie/plugin/bho/webrequest_notifier.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 } 363 }
364 DCHECK(sync != NULL); 364 DCHECK(sync != NULL);
365 365
366 hr = sync->Signal(); 366 hr = sync->Signal();
367 if (FAILED(hr)) 367 if (FAILED(hr))
368 LOG(ERROR) << "Failed to signal " << com::LogHr(hr); 368 LOG(ERROR) << "Failed to signal " << com::LogHr(hr);
369 369
370 return hr; 370 return hr;
371 } 371 }
372 372
373 CeeeExecutor::CeeeExecutor() 373 CeeeExecutor::CeeeExecutor() : hwnd_(NULL) {
374 : hwnd_(NULL),
375 // Don't restart on broker crash. It won't work because executor was
376 // already registered in dead broker.
377 broker_rpc_client_(false) {
378 } 374 }
379 375
380 CeeeExecutor::~CeeeExecutor() { 376 CeeeExecutor::~CeeeExecutor() {
381 } 377 }
382 378
383 HRESULT CeeeExecutor::CreateTabCall(ICeeeTabExecutor* executor, 379 HRESULT CeeeExecutor::CreateTabCall(ICeeeTabExecutor* executor,
384 IUnknown *outer, 380 IUnknown *outer,
385 REFIID riid2, 381 REFIID riid2,
386 IUnknown **out) { 382 IUnknown **out) {
387 CComPtr<IUnknown> tab_call; 383 CComPtr<IUnknown> tab_call;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 return hr; 419 return hr;
424 } 420 }
425 421
426 // If this is tab window then create the infobar manager. 422 // If this is tab window then create the infobar manager.
427 // 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
428 // for the different executors. 424 // for the different executors.
429 // 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
430 // 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
431 // 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
432 // is ready. 428 // is ready.
433 if (window_utils::GetTopLevelParent(hwnd_) != hwnd_) { 429 if (window_utils::GetTopLevelParent(hwnd_) != hwnd_)
434 hr = broker_rpc_client_.Connect(true);
435 if (FAILED(hr))
436 return hr;
437 infobar_manager_.reset( 430 infobar_manager_.reset(
438 new infobar_api::InfobarManager(hwnd_, &broker_rpc_client_)); 431 new infobar_api::InfobarManager(hwnd_, new BrokerRpcClient(false)));
439 }
440 432
441 return S_OK; 433 return S_OK;
442 } 434 }
443 435
444 HRESULT CeeeExecutor::GetWebBrowser(IWebBrowser2** browser) { 436 HRESULT CeeeExecutor::GetWebBrowser(IWebBrowser2** browser) {
445 DCHECK(browser); 437 DCHECK(browser);
446 CComPtr<IFrameEventHandlerHost> frame_handler_host; 438 CComPtr<IFrameEventHandlerHost> frame_handler_host;
447 HRESULT hr = GetSite(IID_IFrameEventHandlerHost, 439 HRESULT hr = GetSite(IID_IFrameEventHandlerHost,
448 reinterpret_cast<void**>(&frame_handler_host)); 440 reinterpret_cast<void**>(&frame_handler_host));
449 if (FAILED(hr)) { 441 if (FAILED(hr)) {
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 1006
1015 STDMETHODIMP CeeeExecutor::OnTopFrameBeforeNavigate(BSTR url) { 1007 STDMETHODIMP CeeeExecutor::OnTopFrameBeforeNavigate(BSTR url) {
1016 DCHECK(infobar_manager_ != NULL) << "infobar_manager_ is not initialized"; 1008 DCHECK(infobar_manager_ != NULL) << "infobar_manager_ is not initialized";
1017 if (infobar_manager_ == NULL) 1009 if (infobar_manager_ == NULL)
1018 return E_FAIL; 1010 return E_FAIL;
1019 1011
1020 // According to the specification, tab navigation closes the infobar. 1012 // According to the specification, tab navigation closes the infobar.
1021 infobar_manager_->HideAll(); 1013 infobar_manager_->HideAll();
1022 return S_OK; 1014 return S_OK;
1023 } 1015 }
OLDNEW
« no previous file with comments | « ceee/ie/plugin/bho/executor.h ('k') | ceee/ie/plugin/bho/webrequest_notifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698