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

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

Issue 8102019: redesign and reimplement proxy config service and tracker, revise proxy ui on cros (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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
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/testing_automation_provider.h" 5 #include "chrome/browser/automation/testing_automation_provider.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 2330 matching lines...) Expand 10 before | Expand all | Expand 10 after
2341 handler_map["UnlockScreen"] = &TestingAutomationProvider::UnlockScreen; 2341 handler_map["UnlockScreen"] = &TestingAutomationProvider::UnlockScreen;
2342 handler_map["SignoutInScreenLocker"] = 2342 handler_map["SignoutInScreenLocker"] =
2343 &TestingAutomationProvider::SignoutInScreenLocker; 2343 &TestingAutomationProvider::SignoutInScreenLocker;
2344 2344
2345 handler_map["GetBatteryInfo"] = &TestingAutomationProvider::GetBatteryInfo; 2345 handler_map["GetBatteryInfo"] = &TestingAutomationProvider::GetBatteryInfo;
2346 2346
2347 handler_map["GetNetworkInfo"] = &TestingAutomationProvider::GetNetworkInfo; 2347 handler_map["GetNetworkInfo"] = &TestingAutomationProvider::GetNetworkInfo;
2348 handler_map["NetworkScan"] = &TestingAutomationProvider::NetworkScan; 2348 handler_map["NetworkScan"] = &TestingAutomationProvider::NetworkScan;
2349 handler_map["ToggleNetworkDevice"] = 2349 handler_map["ToggleNetworkDevice"] =
2350 &TestingAutomationProvider::ToggleNetworkDevice; 2350 &TestingAutomationProvider::ToggleNetworkDevice;
2351 handler_map["GetProxySettings"] =
2352 &TestingAutomationProvider::GetProxySettings;
2353 handler_map["SetProxySettings"] =
2354 &TestingAutomationProvider::SetProxySettings;
2355 handler_map["ConnectToCellularNetwork"] = 2351 handler_map["ConnectToCellularNetwork"] =
2356 &TestingAutomationProvider::ConnectToCellularNetwork; 2352 &TestingAutomationProvider::ConnectToCellularNetwork;
2357 handler_map["DisconnectFromCellularNetwork"] = 2353 handler_map["DisconnectFromCellularNetwork"] =
2358 &TestingAutomationProvider::DisconnectFromCellularNetwork; 2354 &TestingAutomationProvider::DisconnectFromCellularNetwork;
2359 handler_map["ConnectToWifiNetwork"] = 2355 handler_map["ConnectToWifiNetwork"] =
2360 &TestingAutomationProvider::ConnectToWifiNetwork; 2356 &TestingAutomationProvider::ConnectToWifiNetwork;
2361 handler_map["ConnectToHiddenWifiNetwork"] = 2357 handler_map["ConnectToHiddenWifiNetwork"] =
2362 &TestingAutomationProvider::ConnectToHiddenWifiNetwork; 2358 &TestingAutomationProvider::ConnectToHiddenWifiNetwork;
2363 handler_map["DisconnectFromWifiNetwork"] = 2359 handler_map["DisconnectFromWifiNetwork"] =
2364 &TestingAutomationProvider::DisconnectFromWifiNetwork; 2360 &TestingAutomationProvider::DisconnectFromWifiNetwork;
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
2540 browser_handler_map["KillRendererProcess"] = 2536 browser_handler_map["KillRendererProcess"] =
2541 &TestingAutomationProvider::KillRendererProcess; 2537 &TestingAutomationProvider::KillRendererProcess;
2542 2538
2543 browser_handler_map["LaunchApp"] = &TestingAutomationProvider::LaunchApp; 2539 browser_handler_map["LaunchApp"] = &TestingAutomationProvider::LaunchApp;
2544 browser_handler_map["SetAppLaunchType"] = 2540 browser_handler_map["SetAppLaunchType"] =
2545 &TestingAutomationProvider::SetAppLaunchType; 2541 &TestingAutomationProvider::SetAppLaunchType;
2546 #if defined(OS_CHROMEOS) 2542 #if defined(OS_CHROMEOS)
2547 browser_handler_map["CaptureProfilePhoto"] = 2543 browser_handler_map["CaptureProfilePhoto"] =
2548 &TestingAutomationProvider::CaptureProfilePhoto; 2544 &TestingAutomationProvider::CaptureProfilePhoto;
2549 browser_handler_map["GetTimeInfo"] = &TestingAutomationProvider::GetTimeInfo; 2545 browser_handler_map["GetTimeInfo"] = &TestingAutomationProvider::GetTimeInfo;
2546 browser_handler_map["GetProxySettings"] =
2547 &TestingAutomationProvider::GetProxySettings;
2548 browser_handler_map["SetProxySettings"] =
2549 &TestingAutomationProvider::SetProxySettings;
2550 #endif // defined(OS_CHROMEOS) 2550 #endif // defined(OS_CHROMEOS)
2551 2551
2552 // Look for command in handlers that take a Browser handle. 2552 // Look for command in handlers that take a Browser handle.
2553 if (browser_handler_map.find(std::string(command)) != 2553 if (browser_handler_map.find(std::string(command)) !=
2554 browser_handler_map.end()) { 2554 browser_handler_map.end()) {
2555 Browser* browser = NULL; 2555 Browser* browser = NULL;
2556 // Get Browser object associated with handle. 2556 // Get Browser object associated with handle.
2557 if (!browser_tracker_->ContainsHandle(handle) || 2557 if (!browser_tracker_->ContainsHandle(handle) ||
2558 !(browser = browser_tracker_->GetResource(handle))) { 2558 !(browser = browser_tracker_->GetResource(handle))) {
2559 // Browser not found; attempt to fallback to non-Browser handlers. 2559 // Browser not found; attempt to fallback to non-Browser handlers.
(...skipping 3825 matching lines...) Expand 10 before | Expand all | Expand 10 after
6385 6385
6386 Send(reply_message_); 6386 Send(reply_message_);
6387 redirect_query_ = 0; 6387 redirect_query_ = 0;
6388 reply_message_ = NULL; 6388 reply_message_ = NULL;
6389 } 6389 }
6390 6390
6391 void TestingAutomationProvider::OnRemoveProvider() { 6391 void TestingAutomationProvider::OnRemoveProvider() {
6392 if (g_browser_process) 6392 if (g_browser_process)
6393 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); 6393 g_browser_process->GetAutomationProviderList()->RemoveProvider(this);
6394 } 6394 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698