OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chrome_frame_automation.h" | 5 #include "chrome_frame/chrome_frame_automation.h" |
6 | 6 |
7 #include "app/app_switches.h" | 7 #include "app/app_switches.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1003 | 1003 |
1004 void ChromeFrameAutomationClient::SetEnableExtensionAutomation( | 1004 void ChromeFrameAutomationClient::SetEnableExtensionAutomation( |
1005 const std::vector<std::string>& functions_enabled) { | 1005 const std::vector<std::string>& functions_enabled) { |
1006 if (!is_initialized()) | 1006 if (!is_initialized()) |
1007 return; | 1007 return; |
1008 | 1008 |
1009 // We are doing initialization, so there is no need to reset extension | 1009 // We are doing initialization, so there is no need to reset extension |
1010 // automation, only to set it. Also, we want to avoid resetting extension | 1010 // automation, only to set it. Also, we want to avoid resetting extension |
1011 // automation that some other automation client has set up. Therefore only | 1011 // automation that some other automation client has set up. Therefore only |
1012 // send the message if we are going to enable automation of some functions. | 1012 // send the message if we are going to enable automation of some functions. |
1013 if (functions_enabled.size() > 0) { | 1013 if (!functions_enabled.empty()) { |
Peter Kasting
2011/03/03 19:35:53
Nit: No need for {}
| |
1014 tab_->SetEnableExtensionAutomation(functions_enabled); | 1014 tab_->SetEnableExtensionAutomation(functions_enabled); |
1015 } | 1015 } |
1016 } | 1016 } |
1017 | 1017 |
1018 // Invoked in launch background thread. | 1018 // Invoked in launch background thread. |
1019 void ChromeFrameAutomationClient::LaunchComplete( | 1019 void ChromeFrameAutomationClient::LaunchComplete( |
1020 ChromeFrameAutomationProxy* proxy, | 1020 ChromeFrameAutomationProxy* proxy, |
1021 AutomationLaunchResult result) { | 1021 AutomationLaunchResult result) { |
1022 // If we're shutting down we don't keep a pointer to the automation server. | 1022 // If we're shutting down we don't keep a pointer to the automation server. |
1023 if (init_state_ != UNINITIALIZING) { | 1023 if (init_state_ != UNINITIALIZING) { |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1464 const net::URLRequestStatus& status) { | 1464 const net::URLRequestStatus& status) { |
1465 automation_server_->Send(new AutomationMsg_RequestEnd( | 1465 automation_server_->Send(new AutomationMsg_RequestEnd( |
1466 tab_->handle(), request_id, status)); | 1466 tab_->handle(), request_id, status)); |
1467 } | 1467 } |
1468 | 1468 |
1469 void ChromeFrameAutomationClient::OnCookiesRetrieved(bool success, | 1469 void ChromeFrameAutomationClient::OnCookiesRetrieved(bool success, |
1470 const GURL& url, const std::string& cookie_string, int cookie_id) { | 1470 const GURL& url, const std::string& cookie_string, int cookie_id) { |
1471 automation_server_->Send(new AutomationMsg_GetCookiesHostResponse( | 1471 automation_server_->Send(new AutomationMsg_GetCookiesHostResponse( |
1472 tab_->handle(), success, url, cookie_string, cookie_id)); | 1472 tab_->handle(), success, url, cookie_string, cookie_id)); |
1473 } | 1473 } |
OLD | NEW |