OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome_frame/test/ie_event_sink.h" | 5 #include "chrome_frame/test/ie_event_sink.h" |
6 | 6 |
7 #include <shlguid.h> | 7 #include <shlguid.h> |
8 #include <shobjidl.h> | 8 #include <shobjidl.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 DispEventUnadvise(web_browser2_); | 247 DispEventUnadvise(web_browser2_); |
248 CoDisconnectObject(this, 0); | 248 CoDisconnectObject(this, 0); |
249 } | 249 } |
250 | 250 |
251 if (!did_receive_on_quit_) { | 251 if (!did_receive_on_quit_) { |
252 // Log the browser window url for debugging purposes. | 252 // Log the browser window url for debugging purposes. |
253 ScopedBstr browser_url; | 253 ScopedBstr browser_url; |
254 web_browser2_->get_LocationURL(browser_url.Receive()); | 254 web_browser2_->get_LocationURL(browser_url.Receive()); |
255 std::wstring browser_url_wstring; | 255 std::wstring browser_url_wstring; |
256 browser_url_wstring.assign(browser_url, browser_url.Length()); | 256 browser_url_wstring.assign(browser_url, browser_url.Length()); |
257 std::string browser_url_string = WideToUTF8(browser_url_wstring); | 257 std::string browser_url_string = base::WideToUTF8(browser_url_wstring); |
258 LOG(ERROR) << "OnQuit was not received for browser with url " | 258 LOG(ERROR) << "OnQuit was not received for browser with url " |
259 << browser_url_string; | 259 << browser_url_string; |
260 web_browser2_->Quit(); | 260 web_browser2_->Quit(); |
261 } | 261 } |
262 | 262 |
263 base::win::ScopedHandle process; | 263 base::win::ScopedHandle process; |
264 process.Set(OpenProcess(SYNCHRONIZE, FALSE, ie_process_id_)); | 264 process.Set(OpenProcess(SYNCHRONIZE, FALSE, ie_process_id_)); |
265 web_browser2_.Release(); | 265 web_browser2_.Release(); |
266 | 266 |
267 if (!process.IsValid()) { | 267 if (!process.IsValid()) { |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
770 source.Receive(), NULL, NULL)); | 770 source.Receive(), NULL, NULL)); |
771 } | 771 } |
772 } | 772 } |
773 | 773 |
774 if (listener_) | 774 if (listener_) |
775 listener_->OnMessage(V_BSTR(&data), V_BSTR(&origin), V_BSTR(&source)); | 775 listener_->OnMessage(V_BSTR(&data), V_BSTR(&origin), V_BSTR(&source)); |
776 return S_OK; | 776 return S_OK; |
777 } | 777 } |
778 | 778 |
779 } // namespace chrome_frame_test | 779 } // namespace chrome_frame_test |
OLD | NEW |