OLD | NEW |
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 Loading... |
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 |
OLD | NEW |