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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/i18n/time_formatting.h" | 8 #include "base/i18n/time_formatting.h" |
9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
12 #include "chrome/browser/automation/automation_provider_json.h" | 12 #include "chrome/browser/automation/automation_provider_json.h" |
13 #include "chrome/browser/automation/automation_provider_observers.h" | 13 #include "chrome/browser/automation/automation_provider_observers.h" |
14 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
15 #include "chrome/browser/chromeos/audio_handler.h" | 15 #include "chrome/browser/chromeos/audio_handler.h" |
16 #include "chrome/browser/chromeos/cros/cros_library.h" | 16 #include "chrome/browser/chromeos/cros/cros_library.h" |
17 #include "chrome/browser/chromeos/cros/network_library.h" | 17 #include "chrome/browser/chromeos/cros/network_library.h" |
| 18 #include "chrome/browser/chromeos/cros/screen_lock_library.h" |
18 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | 19 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
19 #include "chrome/browser/chromeos/dbus/power_manager_client.h" | |
20 #include "chrome/browser/chromeos/dbus/update_engine_client.h" | 20 #include "chrome/browser/chromeos/dbus/update_engine_client.h" |
21 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_screen.
h" | 21 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_screen.
h" |
22 #include "chrome/browser/chromeos/login/existing_user_controller.h" | 22 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
23 #include "chrome/browser/chromeos/login/login_display.h" | 23 #include "chrome/browser/chromeos/login/login_display.h" |
24 #include "chrome/browser/chromeos/login/login_display_host.h" | 24 #include "chrome/browser/chromeos/login/login_display_host.h" |
25 #include "chrome/browser/chromeos/login/screen_locker.h" | 25 #include "chrome/browser/chromeos/login/screen_locker.h" |
26 #include "chrome/browser/chromeos/login/webui_login_display.h" | 26 #include "chrome/browser/chromeos/login/webui_login_display.h" |
27 #include "chrome/browser/chromeos/login/wizard_controller.h" | 27 #include "chrome/browser/chromeos/login/wizard_controller.h" |
28 #include "chrome/browser/chromeos/options/take_photo_dialog.h" | 28 #include "chrome/browser/chromeos/options/take_photo_dialog.h" |
29 #include "chrome/browser/chromeos/proxy_cros_settings_parser.h" | 29 #include "chrome/browser/chromeos/proxy_cros_settings_parser.h" |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 | 269 |
270 // WebUI login. | 270 // WebUI login. |
271 chromeos::WebUILoginDisplay* webui_login_display = | 271 chromeos::WebUILoginDisplay* webui_login_display = |
272 static_cast<chromeos::WebUILoginDisplay*>(controller->login_display()); | 272 static_cast<chromeos::WebUILoginDisplay*>(controller->login_display()); |
273 webui_login_display->ShowSigninScreenForCreds(username, password); | 273 webui_login_display->ShowSigninScreenForCreds(username, password); |
274 } | 274 } |
275 | 275 |
276 void TestingAutomationProvider::LockScreen(DictionaryValue* args, | 276 void TestingAutomationProvider::LockScreen(DictionaryValue* args, |
277 IPC::Message* reply_message) { | 277 IPC::Message* reply_message) { |
278 new ScreenLockUnlockObserver(this, reply_message, true); | 278 new ScreenLockUnlockObserver(this, reply_message, true); |
279 DBusThreadManager::Get()->GetPowerManagerClient()-> | 279 CrosLibrary::Get()->GetScreenLockLibrary()-> |
280 NotifyScreenLockRequested(); | 280 NotifyScreenLockRequested(); |
281 } | 281 } |
282 | 282 |
283 void TestingAutomationProvider::UnlockScreen(DictionaryValue* args, | 283 void TestingAutomationProvider::UnlockScreen(DictionaryValue* args, |
284 IPC::Message* reply_message) { | 284 IPC::Message* reply_message) { |
285 std::string password; | 285 std::string password; |
286 if (!args->GetString("password", &password)) { | 286 if (!args->GetString("password", &password)) { |
287 AutomationJSONReply(this, reply_message).SendError( | 287 AutomationJSONReply(this, reply_message).SendError( |
288 "Invalid or missing args."); | 288 "Invalid or missing args."); |
289 return; | 289 return; |
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1129 power_status = status; | 1129 power_status = status; |
1130 } | 1130 } |
1131 | 1131 |
1132 void TestingAutomationProvider::LockScreen() { | 1132 void TestingAutomationProvider::LockScreen() { |
1133 // Not used, but defined to make clang happy with the overloaded name. | 1133 // Not used, but defined to make clang happy with the overloaded name. |
1134 } | 1134 } |
1135 | 1135 |
1136 void TestingAutomationProvider::UnlockScreen() { | 1136 void TestingAutomationProvider::UnlockScreen() { |
1137 // Not used, but defined to make clang happy with the overloaded name. | 1137 // Not used, but defined to make clang happy with the overloaded name. |
1138 } | 1138 } |
OLD | NEW |