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" |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 | 273 |
274 chromeos::ExistingUserController* controller = | 274 chromeos::ExistingUserController* controller = |
275 chromeos::ExistingUserController::current_controller(); | 275 chromeos::ExistingUserController::current_controller(); |
276 | 276 |
277 // Set up an observer (it will delete itself). | 277 // Set up an observer (it will delete itself). |
278 new LoginObserver(controller, this, reply_message); | 278 new LoginObserver(controller, this, reply_message); |
279 | 279 |
280 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kWebUILogin)) { | 280 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kWebUILogin)) { |
281 // WebUI login. | 281 // WebUI login. |
282 chromeos::WebUILoginDisplay* webui_login_display = | 282 chromeos::WebUILoginDisplay* webui_login_display = |
283 chromeos::WebUILoginDisplay::GetInstance(); | 283 static_cast<chromeos::WebUILoginDisplay*>(controller->login_display()); |
284 webui_login_display->ShowSigninScreenForCreds(username, password); | 284 webui_login_display->ShowSigninScreenForCreds(username, password); |
285 } else { | 285 } else { |
286 // Native UI login. | 286 // Native UI login. |
287 controller->login_display()->SelectPod(0); | 287 controller->login_display()->SelectPod(0); |
288 controller->Login(username, password); | 288 controller->Login(username, password); |
289 } | 289 } |
290 } | 290 } |
291 | 291 |
292 void TestingAutomationProvider::LockScreen(DictionaryValue* args, | 292 void TestingAutomationProvider::LockScreen(DictionaryValue* args, |
293 IPC::Message* reply_message) { | 293 IPC::Message* reply_message) { |
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1201 views::Widget* window = browser::CreateViewsWindow( | 1201 views::Widget* window = browser::CreateViewsWindow( |
1202 browser->window()->GetNativeHandle(), take_photo_dialog); | 1202 browser->window()->GetNativeHandle(), take_photo_dialog); |
1203 window->SetAlwaysOnTop(true); | 1203 window->SetAlwaysOnTop(true); |
1204 window->Show(); | 1204 window->Show(); |
1205 } | 1205 } |
1206 | 1206 |
1207 void TestingAutomationProvider::PowerChanged( | 1207 void TestingAutomationProvider::PowerChanged( |
1208 const chromeos::PowerSupplyStatus& status) { | 1208 const chromeos::PowerSupplyStatus& status) { |
1209 power_status = status; | 1209 power_status = status; |
1210 } | 1210 } |
OLD | NEW |