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 // ChromeFrameHost implementation. | 5 // ChromeFrameHost implementation. |
6 #include "ceee/ie/common/chrome_frame_host.h" | 6 #include "ceee/ie/common/chrome_frame_host.h" |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 | 158 |
159 HRESULT ChromeFrameHost::GetEnabledExtensions() { | 159 HRESULT ChromeFrameHost::GetEnabledExtensions() { |
160 if (chrome_frame_) { | 160 if (chrome_frame_) { |
161 return chrome_frame_->getEnabledExtensions(); | 161 return chrome_frame_->getEnabledExtensions(); |
162 } else { | 162 } else { |
163 NOTREACHED(); | 163 NOTREACHED(); |
164 return E_UNEXPECTED; | 164 return E_UNEXPECTED; |
165 } | 165 } |
166 } | 166 } |
167 | 167 |
168 HRESULT ChromeFrameHost::GetSessionId(int *session_id) { | 168 HRESULT ChromeFrameHost::GetSessionId(int* session_id) { |
169 if (chrome_frame_) { | 169 if (chrome_frame_) { |
170 CComQIPtr<IChromeFrameInternal> chrome_frame_internal_(chrome_frame_); | 170 CComQIPtr<IChromeFrameInternal> chrome_frame_internal_(chrome_frame_); |
171 if (chrome_frame_internal_) | 171 if (chrome_frame_internal_) { |
172 return chrome_frame_internal_->getSessionId(session_id); | 172 return chrome_frame_internal_->getSessionId(session_id); |
173 else | 173 } else { |
174 return kInvalidChromeSessionId; | 174 *session_id = kInvalidChromeSessionId; |
| 175 return S_OK; |
| 176 } |
175 } | 177 } |
176 NOTREACHED(); | 178 NOTREACHED(); |
177 return E_UNEXPECTED; | 179 return E_UNEXPECTED; |
178 } | 180 } |
179 | 181 |
180 void ChromeFrameHost::OnFinalMessage(HWND window) { | 182 void ChromeFrameHost::OnFinalMessage(HWND window) { |
181 GetUnknown()->Release(); | 183 GetUnknown()->Release(); |
182 } | 184 } |
183 | 185 |
184 HRESULT ChromeFrameHost::SetChildSite(IUnknown* child) { | 186 HRESULT ChromeFrameHost::SetChildSite(IUnknown* child) { |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 | 366 |
365 // Forward to the sink. | 367 // Forward to the sink. |
366 event_sink_->OnCfPrivateMessage(V_BSTR(&data), V_BSTR(&origin), target); | 368 event_sink_->OnCfPrivateMessage(V_BSTR(&data), V_BSTR(&origin), target); |
367 } | 369 } |
368 | 370 |
369 STDMETHODIMP_(void) ChromeFrameHost::SetChromeProfileName( | 371 STDMETHODIMP_(void) ChromeFrameHost::SetChromeProfileName( |
370 const wchar_t* chrome_profile_name) { | 372 const wchar_t* chrome_profile_name) { |
371 chrome_profile_name_ = chrome_profile_name; | 373 chrome_profile_name_ = chrome_profile_name; |
372 DLOG(INFO) << "Assigned profile name " << chrome_profile_name_; | 374 DLOG(INFO) << "Assigned profile name " << chrome_profile_name_; |
373 } | 375 } |
OLD | NEW |