| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 LOG(INFO) << | 120 LOG(INFO) << |
| 121 "Refused to instantiate the BHO when the visual component is hidden."; | 121 "Refused to instantiate the BHO when the visual component is hidden."; |
| 122 return E_FAIL; | 122 return E_FAIL; |
| 123 } | 123 } |
| 124 | 124 |
| 125 const wchar_t* bho_list = NULL; | 125 const wchar_t* bho_list = NULL; |
| 126 ::LoadString(_pModule->m_hInstResource, IDS_CEEE_NESTED_BHO_LIST, | 126 ::LoadString(_pModule->m_hInstResource, IDS_CEEE_NESTED_BHO_LIST, |
| 127 reinterpret_cast<wchar_t*>(&bho_list), 0); | 127 reinterpret_cast<wchar_t*>(&bho_list), 0); |
| 128 if (bho_list == NULL) { | 128 if (bho_list == NULL) { |
| 129 LOG(ERROR) << "Failed to load string: " << GetLastError(); | 129 LOG(ERROR) << "Failed to load string: " << GetLastError(); |
| 130 } else { | 130 } else if (wcslen(bho_list) > 0) { |
| 131 std::vector<std::wstring> guids; | 131 std::vector<std::wstring> guids; |
| 132 base::SplitString(bho_list, ',', &guids); | 132 base::SplitString(bho_list, ',', &guids); |
| 133 for (size_t i = 0; i < guids.size(); ++i) { | 133 for (size_t i = 0; i < guids.size(); ++i) { |
| 134 CLSID clsid; | 134 CLSID clsid; |
| 135 base::win::ScopedComPtr<IObjectWithSite> factory; | 135 base::win::ScopedComPtr<IObjectWithSite> factory; |
| 136 HRESULT hr = ::CLSIDFromString(guids[i].c_str(), &clsid); | 136 HRESULT hr = ::CLSIDFromString(guids[i].c_str(), &clsid); |
| 137 if (SUCCEEDED(hr)) { | 137 if (SUCCEEDED(hr)) { |
| 138 hr = factory.CreateInstance(clsid); | 138 hr = factory.CreateInstance(clsid); |
| 139 if (SUCCEEDED(hr)) { | 139 if (SUCCEEDED(hr)) { |
| 140 nested_bho_.push_back(factory); | 140 nested_bho_.push_back(factory); |
| (...skipping 1526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1667 return S_FALSE; | 1667 return S_FALSE; |
| 1668 } else { | 1668 } else { |
| 1669 return SendEventToBrokerImpl(event_name, event_args); | 1669 return SendEventToBrokerImpl(event_name, event_args); |
| 1670 } | 1670 } |
| 1671 } | 1671 } |
| 1672 | 1672 |
| 1673 HRESULT BrowserHelperObject::SendEventToBrokerImpl( | 1673 HRESULT BrowserHelperObject::SendEventToBrokerImpl( |
| 1674 const std::string& event_name, const std::string& event_args) { | 1674 const std::string& event_name, const std::string& event_args) { |
| 1675 return broker_rpc().FireEvent(event_name.c_str(), event_args.c_str()); | 1675 return broker_rpc().FireEvent(event_name.c_str(), event_args.c_str()); |
| 1676 } | 1676 } |
| OLD | NEW |