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

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

Issue 8395042: [cros,de-hack] Get rid of singleton for the WebUILoginScreen. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: comment nit 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/base_login_display_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/base_login_display_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698