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/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 2055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2066 #if defined(OS_CHROMEOS) | 2066 #if defined(OS_CHROMEOS) |
2067 handler_map["GetLoginInfo"] = &TestingAutomationProvider::GetLoginInfo; | 2067 handler_map["GetLoginInfo"] = &TestingAutomationProvider::GetLoginInfo; |
2068 handler_map["LoginAsGuest"] = &TestingAutomationProvider::LoginAsGuest; | 2068 handler_map["LoginAsGuest"] = &TestingAutomationProvider::LoginAsGuest; |
2069 handler_map["Login"] = &TestingAutomationProvider::Login; | 2069 handler_map["Login"] = &TestingAutomationProvider::Login; |
2070 | 2070 |
2071 handler_map["LockScreen"] = &TestingAutomationProvider::LockScreen; | 2071 handler_map["LockScreen"] = &TestingAutomationProvider::LockScreen; |
2072 handler_map["UnlockScreen"] = &TestingAutomationProvider::UnlockScreen; | 2072 handler_map["UnlockScreen"] = &TestingAutomationProvider::UnlockScreen; |
2073 handler_map["SignoutInScreenLocker"] = | 2073 handler_map["SignoutInScreenLocker"] = |
2074 &TestingAutomationProvider::SignoutInScreenLocker; | 2074 &TestingAutomationProvider::SignoutInScreenLocker; |
2075 | 2075 |
| 2076 handler_map["GetBatteryInfo"] = &TestingAutomationProvider::GetBatteryInfo; |
| 2077 |
2076 handler_map["GetNetworkInfo"] = &TestingAutomationProvider::GetNetworkInfo; | 2078 handler_map["GetNetworkInfo"] = &TestingAutomationProvider::GetNetworkInfo; |
2077 handler_map["NetworkScan"] = &TestingAutomationProvider::NetworkScan; | 2079 handler_map["NetworkScan"] = &TestingAutomationProvider::NetworkScan; |
2078 handler_map["ConnectToWifiNetwork"] = | 2080 handler_map["ConnectToWifiNetwork"] = |
2079 &TestingAutomationProvider::ConnectToWifiNetwork; | 2081 &TestingAutomationProvider::ConnectToWifiNetwork; |
2080 handler_map["DisconnectFromWifiNetwork"] = | 2082 handler_map["DisconnectFromWifiNetwork"] = |
2081 &TestingAutomationProvider::DisconnectFromWifiNetwork; | 2083 &TestingAutomationProvider::DisconnectFromWifiNetwork; |
2082 #endif // defined(OS_CHROMEOS) | 2084 #endif // defined(OS_CHROMEOS) |
2083 | 2085 |
2084 std::map<std::string, BrowserJsonHandler> browser_handler_map; | 2086 std::map<std::string, BrowserJsonHandler> browser_handler_map; |
2085 browser_handler_map["DisablePlugin"] = | 2087 browser_handler_map["DisablePlugin"] = |
(...skipping 3154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5240 // If you change this, update Observer for NotificationType::SESSION_END | 5242 // If you change this, update Observer for NotificationType::SESSION_END |
5241 // below. | 5243 // below. |
5242 MessageLoop::current()->PostTask(FROM_HERE, | 5244 MessageLoop::current()->PostTask(FROM_HERE, |
5243 NewRunnableMethod(this, &TestingAutomationProvider::OnRemoveProvider)); | 5245 NewRunnableMethod(this, &TestingAutomationProvider::OnRemoveProvider)); |
5244 } | 5246 } |
5245 } | 5247 } |
5246 | 5248 |
5247 void TestingAutomationProvider::OnRemoveProvider() { | 5249 void TestingAutomationProvider::OnRemoveProvider() { |
5248 AutomationProviderList::GetInstance()->RemoveProvider(this); | 5250 AutomationProviderList::GetInstance()->RemoveProvider(this); |
5249 } | 5251 } |
OLD | NEW |