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 // IE browser helper object implementation. | 5 // IE browser helper object implementation. |
6 #include "ceee/ie/plugin/bho/browser_helper_object.h" | 6 #include "ceee/ie/plugin/bho/browser_helper_object.h" |
7 | 7 |
8 #include <atlsafe.h> | 8 #include <atlsafe.h> |
9 #include <shlguid.h> | 9 #include <shlguid.h> |
10 | 10 |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 std::hex << parent.get(); | 259 std::hex << parent.get(); |
260 | 260 |
261 *parent_browser = parent.Detach(); | 261 *parent_browser = parent.Detach(); |
262 return S_OK; | 262 return S_OK; |
263 } | 263 } |
264 | 264 |
265 HRESULT BrowserHelperObject::GetBrokerRegistrar(ICeeeBrokerRegistrar** broker) { | 265 HRESULT BrowserHelperObject::GetBrokerRegistrar(ICeeeBrokerRegistrar** broker) { |
266 DCHECK(broker); | 266 DCHECK(broker); |
267 if (broker == NULL) | 267 if (broker == NULL) |
268 return E_INVALIDARG; | 268 return E_INVALIDARG; |
269 HRESULT hr = ::CoCreateInstance(CLSID_CeeeBroker, NULL, CLSCTX_ALL, | 269 HRESULT hr = StartCeeeBroker(broker); |
270 IID_ICeeeBrokerRegistrar, | |
271 reinterpret_cast<void**>(broker)); | |
272 DCHECK(SUCCEEDED(hr) && *broker) << "CoCreating Broker. " << com::LogHr(hr); | |
273 if (FAILED(hr) || *broker == NULL) | 270 if (FAILED(hr) || *broker == NULL) |
274 return com::AlwaysError(hr); | 271 return com::AlwaysError(hr); |
275 return hr; | 272 return hr; |
276 } | 273 } |
277 | 274 |
278 HRESULT BrowserHelperObject::CreateExecutor(IUnknown** executor) { | 275 HRESULT BrowserHelperObject::CreateExecutor(IUnknown** executor) { |
279 HRESULT hr = ::CoCreateInstance( | 276 HRESULT hr = ::CoCreateInstance( |
280 CLSID_CeeeExecutor, NULL, CLSCTX_INPROC_SERVER, | 277 CLSID_CeeeExecutor, NULL, CLSCTX_INPROC_SERVER, |
281 IID_IUnknown, reinterpret_cast<void**>(executor)); | 278 IID_IUnknown, reinterpret_cast<void**>(executor)); |
282 if (SUCCEEDED(hr)) { | 279 if (SUCCEEDED(hr)) { |
(...skipping 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1634 return S_FALSE; | 1631 return S_FALSE; |
1635 } else { | 1632 } else { |
1636 return SendEventToBrokerImpl(event_name, event_args); | 1633 return SendEventToBrokerImpl(event_name, event_args); |
1637 } | 1634 } |
1638 } | 1635 } |
1639 | 1636 |
1640 HRESULT BrowserHelperObject::SendEventToBrokerImpl( | 1637 HRESULT BrowserHelperObject::SendEventToBrokerImpl( |
1641 const std::string& event_name, const std::string& event_args) { | 1638 const std::string& event_name, const std::string& event_args) { |
1642 return broker_rpc().FireEvent(event_name.c_str(), event_args.c_str()); | 1639 return broker_rpc().FireEvent(event_name.c_str(), event_args.c_str()); |
1643 } | 1640 } |
OLD | NEW |