| 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 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1003 DLOG(ERROR) << "Invalid URL: " << url_; | 1003 DLOG(ERROR) << "Invalid URL: " << url_; |
| 1004 Error(L"Invalid URL"); | 1004 Error(L"Invalid URL"); |
| 1005 url_.Reset(); | 1005 url_.Reset(); |
| 1006 return false; | 1006 return false; |
| 1007 } | 1007 } |
| 1008 | 1008 |
| 1009 if (is_automation_client_reused_) | 1009 if (is_automation_client_reused_) |
| 1010 return true; | 1010 return true; |
| 1011 | 1011 |
| 1012 automation_client_->SetUrlFetcher(url_fetcher_.get()); | 1012 automation_client_->SetUrlFetcher(url_fetcher_.get()); |
| 1013 return InitializeAutomation(GetHostProcessName(false), L"", IsIEInPrivate(), | 1013 if (launch_params_) { |
| 1014 false, cf_url.gurl(), GURL(referrer)); | 1014 return automation_client_->Initialize(this, launch_params_); |
| 1015 } else { |
| 1016 return InitializeAutomation(GetHostProcessName(false), L"", IsIEInPrivate(), |
| 1017 false, cf_url.gurl(), GURL(referrer)); |
| 1018 } |
| 1015 } | 1019 } |
| 1016 | 1020 |
| 1017 | 1021 |
| 1018 HRESULT ChromeActiveDocument::OnRefreshPage(const GUID* cmd_group_guid, | 1022 HRESULT ChromeActiveDocument::OnRefreshPage(const GUID* cmd_group_guid, |
| 1019 DWORD command_id, DWORD cmd_exec_opt, VARIANT* in_args, VARIANT* out_args) { | 1023 DWORD command_id, DWORD cmd_exec_opt, VARIANT* in_args, VARIANT* out_args) { |
| 1020 DLOG(INFO) << __FUNCTION__; | 1024 DLOG(INFO) << __FUNCTION__; |
| 1021 popup_allowed_ = false; | 1025 popup_allowed_ = false; |
| 1022 if (in_args->vt == VT_I4 && | 1026 if (in_args->vt == VT_I4 && |
| 1023 in_args->lVal & OLECMDIDF_REFRESH_PAGEACTION_POPUPWINDOW) { | 1027 in_args->lVal & OLECMDIDF_REFRESH_PAGEACTION_POPUPWINDOW) { |
| 1024 popup_allowed_ = true; | 1028 popup_allowed_ = true; |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1265 web_browser2->put_Height(dimensions_.height()); | 1269 web_browser2->put_Height(dimensions_.height()); |
| 1266 web_browser2->put_Left(dimensions_.x()); | 1270 web_browser2->put_Left(dimensions_.x()); |
| 1267 web_browser2->put_Top(dimensions_.y()); | 1271 web_browser2->put_Top(dimensions_.y()); |
| 1268 web_browser2->put_MenuBar(VARIANT_FALSE); | 1272 web_browser2->put_MenuBar(VARIANT_FALSE); |
| 1269 web_browser2->put_ToolBar(VARIANT_FALSE); | 1273 web_browser2->put_ToolBar(VARIANT_FALSE); |
| 1270 | 1274 |
| 1271 dimensions_.set_height(0); | 1275 dimensions_.set_height(0); |
| 1272 dimensions_.set_width(0); | 1276 dimensions_.set_width(0); |
| 1273 } | 1277 } |
| 1274 } | 1278 } |
| OLD | NEW |