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

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

Issue 6760013: GetBatteryInfo() battery automation hook. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 2068 matching lines...) Expand 10 before | Expand all | Expand 10 after
2079 #if defined(OS_CHROMEOS) 2079 #if defined(OS_CHROMEOS)
2080 handler_map["GetLoginInfo"] = &TestingAutomationProvider::GetLoginInfo; 2080 handler_map["GetLoginInfo"] = &TestingAutomationProvider::GetLoginInfo;
2081 handler_map["LoginAsGuest"] = &TestingAutomationProvider::LoginAsGuest; 2081 handler_map["LoginAsGuest"] = &TestingAutomationProvider::LoginAsGuest;
2082 handler_map["Login"] = &TestingAutomationProvider::Login; 2082 handler_map["Login"] = &TestingAutomationProvider::Login;
2083 2083
2084 handler_map["LockScreen"] = &TestingAutomationProvider::LockScreen; 2084 handler_map["LockScreen"] = &TestingAutomationProvider::LockScreen;
2085 handler_map["UnlockScreen"] = &TestingAutomationProvider::UnlockScreen; 2085 handler_map["UnlockScreen"] = &TestingAutomationProvider::UnlockScreen;
2086 handler_map["SignoutInScreenLocker"] = 2086 handler_map["SignoutInScreenLocker"] =
2087 &TestingAutomationProvider::SignoutInScreenLocker; 2087 &TestingAutomationProvider::SignoutInScreenLocker;
2088 2088
2089 handler_map["GetBatteryInfo"] = &TestingAutomationProvider::GetBatteryInfo;
2090
2089 handler_map["GetNetworkInfo"] = &TestingAutomationProvider::GetNetworkInfo; 2091 handler_map["GetNetworkInfo"] = &TestingAutomationProvider::GetNetworkInfo;
2090 handler_map["NetworkScan"] = &TestingAutomationProvider::NetworkScan; 2092 handler_map["NetworkScan"] = &TestingAutomationProvider::NetworkScan;
2091 handler_map["ConnectToWifiNetwork"] = 2093 handler_map["ConnectToWifiNetwork"] =
2092 &TestingAutomationProvider::ConnectToWifiNetwork; 2094 &TestingAutomationProvider::ConnectToWifiNetwork;
2093 handler_map["DisconnectFromWifiNetwork"] = 2095 handler_map["DisconnectFromWifiNetwork"] =
2094 &TestingAutomationProvider::DisconnectFromWifiNetwork; 2096 &TestingAutomationProvider::DisconnectFromWifiNetwork;
2095 #endif // defined(OS_CHROMEOS) 2097 #endif // defined(OS_CHROMEOS)
2096 2098
2097 std::map<std::string, BrowserJsonHandler> browser_handler_map; 2099 std::map<std::string, BrowserJsonHandler> browser_handler_map;
2098 browser_handler_map["DisablePlugin"] = 2100 browser_handler_map["DisablePlugin"] =
(...skipping 3106 matching lines...) Expand 10 before | Expand all | Expand 10 after
5205 // If you change this, update Observer for NotificationType::SESSION_END 5207 // If you change this, update Observer for NotificationType::SESSION_END
5206 // below. 5208 // below.
5207 MessageLoop::current()->PostTask(FROM_HERE, 5209 MessageLoop::current()->PostTask(FROM_HERE,
5208 NewRunnableMethod(this, &TestingAutomationProvider::OnRemoveProvider)); 5210 NewRunnableMethod(this, &TestingAutomationProvider::OnRemoveProvider));
5209 } 5211 }
5210 } 5212 }
5211 5213
5212 void TestingAutomationProvider::OnRemoveProvider() { 5214 void TestingAutomationProvider::OnRemoveProvider() {
5213 AutomationProviderList::GetInstance()->RemoveProvider(this); 5215 AutomationProviderList::GetInstance()->RemoveProvider(this);
5214 } 5216 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698