Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Side by Side Diff: chrome/browser/automation/automation_provider.cc

Issue 6732040: PyAuto automation hooks: blocking wifi connect, disconnect, and network scan. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes per comments. Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/automation/automation_provider_observers.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/automation/automation_provider_observers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698