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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 #include "content/public/browser/trace_controller.h" | 70 #include "content/public/browser/trace_controller.h" |
71 #include "content/public/browser/web_contents.h" | 71 #include "content/public/browser/web_contents.h" |
72 #include "content/public/browser/web_contents_view.h" | 72 #include "content/public/browser/web_contents_view.h" |
73 #include "net/proxy/proxy_config_service_fixed.h" | 73 #include "net/proxy/proxy_config_service_fixed.h" |
74 #include "net/proxy/proxy_service.h" | 74 #include "net/proxy/proxy_service.h" |
75 #include "net/url_request/url_request_context.h" | 75 #include "net/url_request/url_request_context.h" |
76 #include "net/url_request/url_request_context_getter.h" | 76 #include "net/url_request/url_request_context_getter.h" |
77 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h" | 77 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h" |
78 | 78 |
79 #if defined(OS_CHROMEOS) | 79 #if defined(OS_CHROMEOS) |
80 #include "chrome/browser/chromeos/login/user_manager.h" | |
81 #include "chromeos/chromeos_switches.h" | 80 #include "chromeos/chromeos_switches.h" |
| 81 #include "chromeos/login/login_state.h" |
82 #endif // defined(OS_CHROMEOS) | 82 #endif // defined(OS_CHROMEOS) |
83 | 83 |
84 using WebKit::WebFindOptions; | 84 using WebKit::WebFindOptions; |
85 using base::Time; | 85 using base::Time; |
86 using content::BrowserThread; | 86 using content::BrowserThread; |
87 using content::DownloadItem; | 87 using content::DownloadItem; |
88 using content::NavigationController; | 88 using content::NavigationController; |
89 using content::RenderViewHost; | 89 using content::RenderViewHost; |
90 using content::TraceController; | 90 using content::TraceController; |
91 using content::WebContents; | 91 using content::WebContents; |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 this, | 212 this, |
213 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); | 213 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); |
214 channel_->AddFilter(automation_resource_message_filter_); | 214 channel_->AddFilter(automation_resource_message_filter_); |
215 | 215 |
216 #if defined(OS_CHROMEOS) | 216 #if defined(OS_CHROMEOS) |
217 if (use_initial_load_observers_) { | 217 if (use_initial_load_observers_) { |
218 // Wait for webui login to be ready. | 218 // Wait for webui login to be ready. |
219 // Observer will delete itself. | 219 // Observer will delete itself. |
220 if (CommandLine::ForCurrentProcess()->HasSwitch( | 220 if (CommandLine::ForCurrentProcess()->HasSwitch( |
221 chromeos::switches::kLoginManager) && | 221 chromeos::switches::kLoginManager) && |
222 !chromeos::UserManager::Get()->IsUserLoggedIn()) { | 222 !chromeos::LoginState::Get()->IsUserLoggedIn()) { |
223 login_webui_ready_ = false; | 223 login_webui_ready_ = false; |
224 new OOBEWebuiReadyObserver(this); | 224 new OOBEWebuiReadyObserver(this); |
225 } | 225 } |
226 | 226 |
227 // Wait for the network manager to initialize. | 227 // Wait for the network manager to initialize. |
228 // The observer will delete itself when done. | 228 // The observer will delete itself when done. |
229 network_library_initialized_ = false; | 229 network_library_initialized_ = false; |
230 NetworkManagerInitObserver* observer = new NetworkManagerInitObserver(this); | 230 NetworkManagerInitObserver* observer = new NetworkManagerInitObserver(this); |
231 if (!observer->Init()) | 231 if (!observer->Init()) |
232 delete observer; | 232 delete observer; |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
825 | 825 |
826 return NULL; | 826 return NULL; |
827 } | 827 } |
828 | 828 |
829 void AutomationProvider::SaveAsAsync(int tab_handle) { | 829 void AutomationProvider::SaveAsAsync(int tab_handle) { |
830 NavigationController* tab = NULL; | 830 NavigationController* tab = NULL; |
831 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); | 831 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); |
832 if (web_contents) | 832 if (web_contents) |
833 web_contents->OnSavePage(); | 833 web_contents->OnSavePage(); |
834 } | 834 } |
OLD | NEW |