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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 #include "chrome/common/chrome_paths.h" | 73 #include "chrome/common/chrome_paths.h" |
74 #include "chrome/common/chrome_switches.h" | 74 #include "chrome/common/chrome_switches.h" |
75 #include "chrome/common/chrome_version_info.h" | 75 #include "chrome/common/chrome_version_info.h" |
76 #include "chrome/common/extensions/extension.h" | 76 #include "chrome/common/extensions/extension.h" |
77 #include "chrome/common/pref_names.h" | 77 #include "chrome/common/pref_names.h" |
78 #include "chrome/common/render_messages.h" | 78 #include "chrome/common/render_messages.h" |
79 #include "chrome/common/url_constants.h" | 79 #include "chrome/common/url_constants.h" |
80 #include "content/public/browser/browser_thread.h" | 80 #include "content/public/browser/browser_thread.h" |
81 #include "content/public/browser/download_item.h" | 81 #include "content/public/browser/download_item.h" |
82 #include "content/public/browser/render_view_host.h" | 82 #include "content/public/browser/render_view_host.h" |
| 83 #include "content/public/browser/trace_controller.h" |
83 #include "content/public/browser/web_contents.h" | 84 #include "content/public/browser/web_contents.h" |
84 #include "content/public/browser/web_contents_view.h" | 85 #include "content/public/browser/web_contents_view.h" |
85 #include "net/proxy/proxy_config_service_fixed.h" | 86 #include "net/proxy/proxy_config_service_fixed.h" |
86 #include "net/proxy/proxy_service.h" | 87 #include "net/proxy/proxy_service.h" |
87 #include "net/url_request/url_request_context.h" | 88 #include "net/url_request/url_request_context.h" |
88 #include "net/url_request/url_request_context_getter.h" | 89 #include "net/url_request/url_request_context_getter.h" |
89 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h" | 90 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h" |
90 | 91 |
91 #if defined(OS_WIN) && !defined(USE_AURA) | 92 #if defined(OS_WIN) && !defined(USE_AURA) |
92 #include "chrome/browser/external_tab_container_win.h" | 93 #include "chrome/browser/external_tab_container_win.h" |
93 #endif // defined(OS_WIN) | 94 #endif // defined(OS_WIN) |
94 | 95 |
95 #if defined(OS_CHROMEOS) | 96 #if defined(OS_CHROMEOS) |
96 #include "chrome/browser/chromeos/login/user_manager.h" | 97 #include "chrome/browser/chromeos/login/user_manager.h" |
97 #endif // defined(OS_CHROMEOS) | 98 #endif // defined(OS_CHROMEOS) |
98 | 99 |
99 using WebKit::WebFindOptions; | 100 using WebKit::WebFindOptions; |
100 using base::Time; | 101 using base::Time; |
101 using content::BrowserThread; | 102 using content::BrowserThread; |
102 using content::DownloadItem; | 103 using content::DownloadItem; |
103 using content::NavigationController; | 104 using content::NavigationController; |
104 using content::RenderViewHost; | 105 using content::RenderViewHost; |
| 106 using content::TraceController; |
105 using content::WebContents; | 107 using content::WebContents; |
106 | 108 |
107 namespace { | 109 namespace { |
108 | 110 |
109 void PopulateProxyConfig(const DictionaryValue& dict, net::ProxyConfig* pc) { | 111 void PopulateProxyConfig(const DictionaryValue& dict, net::ProxyConfig* pc) { |
110 DCHECK(pc); | 112 DCHECK(pc); |
111 bool no_proxy = false; | 113 bool no_proxy = false; |
112 if (dict.GetBoolean(automation::kJSONProxyNoProxy, &no_proxy)) { | 114 if (dict.GetBoolean(automation::kJSONProxyNoProxy, &no_proxy)) { |
113 // Make no changes to the ProxyConfig. | 115 // Make no changes to the ProxyConfig. |
114 return; | 116 return; |
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1013 } | 1015 } |
1014 } | 1016 } |
1015 } | 1017 } |
1016 | 1018 |
1017 void AutomationProvider::SaveAsAsync(int tab_handle) { | 1019 void AutomationProvider::SaveAsAsync(int tab_handle) { |
1018 NavigationController* tab = NULL; | 1020 NavigationController* tab = NULL; |
1019 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); | 1021 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); |
1020 if (web_contents) | 1022 if (web_contents) |
1021 web_contents->OnSavePage(); | 1023 web_contents->OnSavePage(); |
1022 } | 1024 } |
OLD | NEW |