| 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/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/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 channel_.reset(new IPC::ChannelProxy( | 163 channel_.reset(new IPC::ChannelProxy( |
| 164 effective_channel_id, | 164 effective_channel_id, |
| 165 GetChannelMode(use_named_interface), | 165 GetChannelMode(use_named_interface), |
| 166 this, | 166 this, |
| 167 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); | 167 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); |
| 168 channel_->AddFilter(automation_resource_message_filter_); | 168 channel_->AddFilter(automation_resource_message_filter_); |
| 169 | 169 |
| 170 #if defined(OS_CHROMEOS) | 170 #if defined(OS_CHROMEOS) |
| 171 // Wait for webui login to be ready. | 171 // Wait for webui login to be ready. |
| 172 // Observer will delete itself. | 172 // Observer will delete itself. |
| 173 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kWebUILogin) && | 173 if (!chromeos::UserManager::Get()->user_is_logged_in()) { |
| 174 !chromeos::UserManager::Get()->user_is_logged_in()) { | |
| 175 login_webui_ready_ = false; | 174 login_webui_ready_ = false; |
| 176 new LoginWebuiReadyObserver(this); | 175 new LoginWebuiReadyObserver(this); |
| 177 } | 176 } |
| 178 | 177 |
| 179 // Wait for the network manager to initialize. | 178 // Wait for the network manager to initialize. |
| 180 // The observer will delete itself when done. | 179 // The observer will delete itself when done. |
| 181 network_library_initialized_ = false; | 180 network_library_initialized_ = false; |
| 182 NetworkManagerInitObserver* observer = new NetworkManagerInitObserver(this); | 181 NetworkManagerInitObserver* observer = new NetworkManagerInitObserver(this); |
| 183 if (!observer->Init()) | 182 if (!observer->Init()) |
| 184 delete observer; | 183 delete observer; |
| (...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1014 } | 1013 } |
| 1015 } | 1014 } |
| 1016 } | 1015 } |
| 1017 | 1016 |
| 1018 void AutomationProvider::SaveAsAsync(int tab_handle) { | 1017 void AutomationProvider::SaveAsAsync(int tab_handle) { |
| 1019 NavigationController* tab = NULL; | 1018 NavigationController* tab = NULL; |
| 1020 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); | 1019 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); |
| 1021 if (tab_contents) | 1020 if (tab_contents) |
| 1022 tab_contents->OnSavePage(); | 1021 tab_contents->OnSavePage(); |
| 1023 } | 1022 } |
| OLD | NEW |