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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 std::hex << parent.get(); | 251 std::hex << parent.get(); |
252 | 252 |
253 *parent_browser = parent.Detach(); | 253 *parent_browser = parent.Detach(); |
254 return S_OK; | 254 return S_OK; |
255 } | 255 } |
256 | 256 |
257 HRESULT BrowserHelperObject::GetBrokerRegistrar(ICeeeBrokerRegistrar** broker) { | 257 HRESULT BrowserHelperObject::GetBrokerRegistrar(ICeeeBrokerRegistrar** broker) { |
258 DCHECK(broker); | 258 DCHECK(broker); |
259 if (broker == NULL) | 259 if (broker == NULL) |
260 return E_INVALIDARG; | 260 return E_INVALIDARG; |
261 HRESULT hr = ::CoCreateInstance(CLSID_CeeeBroker, NULL, CLSCTX_ALL, | 261 HRESULT hr = StartCeeeBroker(broker); |
262 IID_ICeeeBrokerRegistrar, | |
263 reinterpret_cast<void**>(broker)); | |
264 DCHECK(SUCCEEDED(hr) && *broker) << "CoCreating Broker. " << com::LogHr(hr); | |
265 if (FAILED(hr) || *broker == NULL) | 262 if (FAILED(hr) || *broker == NULL) |
266 return com::AlwaysError(hr); | 263 return com::AlwaysError(hr); |
267 return hr; | 264 return hr; |
268 } | 265 } |
269 | 266 |
270 HRESULT BrowserHelperObject::CreateExecutor(IUnknown** executor) { | 267 HRESULT BrowserHelperObject::CreateExecutor(IUnknown** executor) { |
271 HRESULT hr = ::CoCreateInstance( | 268 HRESULT hr = ::CoCreateInstance( |
272 CLSID_CeeeExecutor, NULL, CLSCTX_INPROC_SERVER, | 269 CLSID_CeeeExecutor, NULL, CLSCTX_INPROC_SERVER, |
273 IID_IUnknown, reinterpret_cast<void**>(executor)); | 270 IID_IUnknown, reinterpret_cast<void**>(executor)); |
274 if (SUCCEEDED(hr)) { | 271 if (SUCCEEDED(hr)) { |
(...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1623 return S_FALSE; | 1620 return S_FALSE; |
1624 } else { | 1621 } else { |
1625 return SendEventToBrokerImpl(event_name, event_args); | 1622 return SendEventToBrokerImpl(event_name, event_args); |
1626 } | 1623 } |
1627 } | 1624 } |
1628 | 1625 |
1629 HRESULT BrowserHelperObject::SendEventToBrokerImpl( | 1626 HRESULT BrowserHelperObject::SendEventToBrokerImpl( |
1630 const std::string& event_name, const std::string& event_args) { | 1627 const std::string& event_name, const std::string& event_args) { |
1631 return broker_rpc().FireEvent(event_name.c_str(), event_args.c_str()); | 1628 return broker_rpc().FireEvent(event_name.c_str(), event_args.c_str()); |
1632 } | 1629 } |
OLD | NEW |