| 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 // Implementation of ChromeActiveDocument | 5 // Implementation of ChromeActiveDocument |
| 6 #include "chrome_frame/chrome_active_document.h" | 6 #include "chrome_frame/chrome_active_document.h" |
| 7 | 7 |
| 8 #include <hlink.h> | 8 #include <hlink.h> |
| 9 #include <htiface.h> | 9 #include <htiface.h> |
| 10 #include <initguid.h> | 10 #include <initguid.h> |
| (...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 924 return; | 924 return; |
| 925 } | 925 } |
| 926 DWORD flags = 0; | 926 DWORD flags = 0; |
| 927 if (params.user_gesture) | 927 if (params.user_gesture) |
| 928 flags = NWMF_USERREQUESTED; | 928 flags = NWMF_USERREQUESTED; |
| 929 else if (popup_allowed_) | 929 else if (popup_allowed_) |
| 930 flags = NWMF_USERALLOWED; | 930 flags = NWMF_USERALLOWED; |
| 931 | 931 |
| 932 HRESULT hr = S_OK; | 932 HRESULT hr = S_OK; |
| 933 if (popup_manager_) { | 933 if (popup_manager_) { |
| 934 LPCWSTR popup_wnd_url = UTF8ToWide(params.url.spec()).c_str(); | 934 const std::wstring& url_wide = UTF8ToWide(params.url.spec()); |
| 935 hr = popup_manager_->EvaluateNewWindow(popup_wnd_url, NULL, url_, | 935 hr = popup_manager_->EvaluateNewWindow(url_wide.c_str(), NULL, url_, |
| 936 NULL, FALSE, flags, 0); | 936 NULL, FALSE, flags, 0); |
| 937 } | 937 } |
| 938 // Allow popup | 938 // Allow popup |
| 939 if (hr == S_OK) { | 939 if (hr == S_OK) { |
| 940 BaseActiveX::OnAttachExternalTab(tab_handle, params); | 940 BaseActiveX::OnAttachExternalTab(tab_handle, params); |
| 941 return; | 941 return; |
| 942 } | 942 } |
| 943 | 943 |
| 944 automation_client_->BlockExternalTab(params.cookie); | 944 automation_client_->BlockExternalTab(params.cookie); |
| 945 } | 945 } |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1297 web_browser2->put_Height(dimensions_.height()); | 1297 web_browser2->put_Height(dimensions_.height()); |
| 1298 web_browser2->put_Left(dimensions_.x()); | 1298 web_browser2->put_Left(dimensions_.x()); |
| 1299 web_browser2->put_Top(dimensions_.y()); | 1299 web_browser2->put_Top(dimensions_.y()); |
| 1300 web_browser2->put_MenuBar(VARIANT_FALSE); | 1300 web_browser2->put_MenuBar(VARIANT_FALSE); |
| 1301 web_browser2->put_ToolBar(VARIANT_FALSE); | 1301 web_browser2->put_ToolBar(VARIANT_FALSE); |
| 1302 | 1302 |
| 1303 dimensions_.set_height(0); | 1303 dimensions_.set_height(0); |
| 1304 dimensions_.set_width(0); | 1304 dimensions_.set_width(0); |
| 1305 } | 1305 } |
| 1306 } | 1306 } |
| OLD | NEW |