| 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/browser/automation/automation_provider.h" | 5 #include "chrome/browser/automation/automation_provider.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 94 |
| 95 #if defined(OS_CHROMEOS) | 95 #if defined(OS_CHROMEOS) |
| 96 #include "chrome/browser/chromeos/login/user_manager.h" | 96 #include "chrome/browser/chromeos/login/user_manager.h" |
| 97 #endif // defined(OS_CHROMEOS) | 97 #endif // defined(OS_CHROMEOS) |
| 98 | 98 |
| 99 using WebKit::WebFindOptions; | 99 using WebKit::WebFindOptions; |
| 100 using base::Time; | 100 using base::Time; |
| 101 using content::BrowserThread; | 101 using content::BrowserThread; |
| 102 using content::DownloadItem; | 102 using content::DownloadItem; |
| 103 using content::NavigationController; | 103 using content::NavigationController; |
| 104 using content::RenderViewHost; |
| 104 using content::WebContents; | 105 using content::WebContents; |
| 105 | 106 |
| 106 namespace { | 107 namespace { |
| 107 | 108 |
| 108 void PopulateProxyConfig(const DictionaryValue& dict, net::ProxyConfig* pc) { | 109 void PopulateProxyConfig(const DictionaryValue& dict, net::ProxyConfig* pc) { |
| 109 DCHECK(pc); | 110 DCHECK(pc); |
| 110 bool no_proxy = false; | 111 bool no_proxy = false; |
| 111 if (dict.GetBoolean(automation::kJSONProxyNoProxy, &no_proxy)) { | 112 if (dict.GetBoolean(automation::kJSONProxyNoProxy, &no_proxy)) { |
| 112 // Make no changes to the ProxyConfig. | 113 // Make no changes to the ProxyConfig. |
| 113 return; | 114 return; |
| (...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1012 } | 1013 } |
| 1013 } | 1014 } |
| 1014 } | 1015 } |
| 1015 | 1016 |
| 1016 void AutomationProvider::SaveAsAsync(int tab_handle) { | 1017 void AutomationProvider::SaveAsAsync(int tab_handle) { |
| 1017 NavigationController* tab = NULL; | 1018 NavigationController* tab = NULL; |
| 1018 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); | 1019 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); |
| 1019 if (web_contents) | 1020 if (web_contents) |
| 1020 web_contents->OnSavePage(); | 1021 web_contents->OnSavePage(); |
| 1021 } | 1022 } |
| OLD | NEW |