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

Side by Side Diff: chrome/browser/chromeos/login/wizard_controller.cc

Issue 1142005: Mocks for all libcros elements (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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
« no previous file with comments | « chrome/browser/chromeos/login/utils.cc ('k') | chrome/browser/chromeos/network_list.cc » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/chromeos/login/wizard_controller.h" 5 #include "chrome/browser/chromeos/login/wizard_controller.h"
6 6
7 #include <gdk/gdk.h> 7 #include <gdk/gdk.h>
8 #include <signal.h> 8 #include <signal.h>
9 #include <sys/types.h> 9 #include <sys/types.h>
10 10
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 return this; 403 return this;
404 } 404 }
405 405
406 namespace browser { 406 namespace browser {
407 407
408 // Declared in browser_dialogs.h so that others don't need to depend on our .h. 408 // Declared in browser_dialogs.h so that others don't need to depend on our .h.
409 void ShowLoginWizard(const std::string& first_screen_name, 409 void ShowLoginWizard(const std::string& first_screen_name,
410 const gfx::Size& size) { 410 const gfx::Size& size) {
411 gfx::Rect screen_bounds(CalculateScreenBounds(size)); 411 gfx::Rect screen_bounds(CalculateScreenBounds(size));
412 412
413 if (first_screen_name.empty() && chromeos::CrosLibrary::EnsureLoaded() && 413 if (first_screen_name.empty() &&
414 chromeos::CrosLibrary::Get()->EnsureLoaded() &&
414 CommandLine::ForCurrentProcess()->HasSwitch( 415 CommandLine::ForCurrentProcess()->HasSwitch(
415 switches::kEnableLoginImages)) { 416 switches::kEnableLoginImages)) {
416 std::vector<chromeos::UserManager::User> users = 417 std::vector<chromeos::UserManager::User> users =
417 chromeos::UserManager::Get()->GetUsers(); 418 chromeos::UserManager::Get()->GetUsers();
418 if (!users.empty()) { 419 if (!users.empty()) {
419 // ExistingUserController deletes itself. 420 // ExistingUserController deletes itself.
420 (new chromeos::ExistingUserController(users, screen_bounds))->Init(); 421 (new chromeos::ExistingUserController(users, screen_bounds))->Init();
421 return; 422 return;
422 } 423 }
423 } 424 }
424 425
425 WizardController* controller = new WizardController(); 426 WizardController* controller = new WizardController();
426 controller->ShowBackground(screen_bounds); 427 controller->ShowBackground(screen_bounds);
427 controller->Init(first_screen_name, screen_bounds, true); 428 controller->Init(first_screen_name, screen_bounds, true);
428 controller->Show(); 429 controller->Show();
429 if (chromeos::CrosLibrary::EnsureLoaded()) 430 if (chromeos::CrosLibrary::Get()->EnsureLoaded())
430 chromeos::LoginLibrary::Get()->EmitLoginPromptReady(); 431 chromeos::CrosLibrary::Get()->GetLoginLibrary()->EmitLoginPromptReady();
431 } 432 }
432 433
433 } // namespace browser 434 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/utils.cc ('k') | chrome/browser/chromeos/network_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698