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/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
171 : IPC::Channel::MODE_CLIENT, | 171 : IPC::Channel::MODE_CLIENT, |
172 this, | 172 this, |
173 g_browser_process->io_thread()->message_loop(), | 173 g_browser_process->io_thread()->message_loop(), |
174 true, g_browser_process->shutdown_event())); | 174 true, g_browser_process->shutdown_event())); |
175 channel_->AddFilter(automation_resource_message_filter_); | 175 channel_->AddFilter(automation_resource_message_filter_); |
176 | 176 |
177 #if defined(OS_CHROMEOS) | 177 #if defined(OS_CHROMEOS) |
178 // Wait for the network manager to initialize. | 178 // Wait for the network manager to initialize. |
179 // The observer will delete itself when done. | 179 // The observer will delete itself when done. |
180 network_library_initialized_ = false; | 180 network_library_initialized_ = false; |
181 new NetworkManagerInitObserver(this); | 181 NetworkManagerInitObserver* observer = new NetworkManagerInitObserver(this); |
182 if (!observer->Init()) | |
183 delete observer; | |
stevenjb
2011/03/25 23:08:51
return false or report failure here?
| |
182 #endif | 184 #endif |
183 | 185 |
184 TRACE_EVENT_END("AutomationProvider::InitializeChannel", 0, ""); | 186 TRACE_EVENT_END("AutomationProvider::InitializeChannel", 0, ""); |
185 | 187 |
186 return true; | 188 return true; |
187 } | 189 } |
188 | 190 |
189 std::string AutomationProvider::GetProtocolVersion() { | 191 std::string AutomationProvider::GetProtocolVersion() { |
190 chrome::VersionInfo version_info; | 192 chrome::VersionInfo version_info; |
191 return version_info.Version().c_str(); | 193 return version_info.Version().c_str(); |
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1021 } | 1023 } |
1022 } | 1024 } |
1023 } | 1025 } |
1024 | 1026 |
1025 void AutomationProvider::SaveAsAsync(int tab_handle) { | 1027 void AutomationProvider::SaveAsAsync(int tab_handle) { |
1026 NavigationController* tab = NULL; | 1028 NavigationController* tab = NULL; |
1027 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); | 1029 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); |
1028 if (tab_contents) | 1030 if (tab_contents) |
1029 tab_contents->OnSavePage(); | 1031 tab_contents->OnSavePage(); |
1030 } | 1032 } |
OLD | NEW |