| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/signin_screen_controller.h" | 5 #include "chrome/browser/chromeos/login/signin_screen_controller.h" |
| 6 | 6 |
| 7 #include "chrome/browser/chrome_notification_types.h" | 7 #include "chrome/browser/chrome_notification_types.h" |
| 8 #include "chrome/browser/chromeos/login/lock/screen_locker.h" | 8 #include "chrome/browser/chromeos/login/lock/screen_locker.h" |
| 9 #include "chrome/browser/chromeos/login/lock/webui_screen_locker.h" | 9 #include "chrome/browser/chromeos/login/lock/webui_screen_locker.h" |
| 10 #include "chrome/browser/chromeos/login/screens/chrome_user_selection_screen.h" | 10 #include "chrome/browser/chromeos/login/screens/chrome_user_selection_screen.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 } | 42 } |
| 43 | 43 |
| 44 SignInScreenController::~SignInScreenController() { | 44 SignInScreenController::~SignInScreenController() { |
| 45 if (user_board_view_) | 45 if (user_board_view_) |
| 46 user_board_view_->Unbind(); | 46 user_board_view_->Unbind(); |
| 47 | 47 |
| 48 user_manager::UserManager::Get()->RemoveObserver(this); | 48 user_manager::UserManager::Get()->RemoveObserver(this); |
| 49 instance_ = nullptr; | 49 instance_ = nullptr; |
| 50 } | 50 } |
| 51 | 51 |
| 52 void SignInScreenController::Init(const user_manager::UserList& users, | 52 void SignInScreenController::Init(const user_manager::UserList& users) { |
| 53 bool show_guest) { | |
| 54 // TODO(antrim) : This dependency should be inverted, screen should ask about | 53 // TODO(antrim) : This dependency should be inverted, screen should ask about |
| 55 // users. | 54 // users. |
| 56 user_selection_screen_->Init(users, show_guest); | 55 user_selection_screen_->Init(users); |
| 57 } | 56 } |
| 58 | 57 |
| 59 void SignInScreenController::OnSigninScreenReady() { | 58 void SignInScreenController::OnSigninScreenReady() { |
| 60 gaia_screen_->MaybePreloadAuthExtension(); | 59 gaia_screen_->MaybePreloadAuthExtension(); |
| 61 user_selection_screen_->InitEasyUnlock(); | 60 user_selection_screen_->InitEasyUnlock(); |
| 62 if (ScreenLocker::default_screen_locker()) | 61 if (ScreenLocker::default_screen_locker()) |
| 63 ScreenLocker::default_screen_locker()->delegate()->OnLockWebUIReady(); | 62 ScreenLocker::default_screen_locker()->delegate()->OnLockWebUIReady(); |
| 64 } | 63 } |
| 65 | 64 |
| 66 void SignInScreenController::RemoveUser(const AccountId& account_id) { | 65 void SignInScreenController::RemoveUser(const AccountId& account_id) { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 101 |
| 103 // Stop listening to any notification once session has started. | 102 // Stop listening to any notification once session has started. |
| 104 // Sign in screen objects are marked for deletion with DeleteSoon so | 103 // Sign in screen objects are marked for deletion with DeleteSoon so |
| 105 // make sure no object would be used after session has started. | 104 // make sure no object would be used after session has started. |
| 106 // http://crbug.com/125276 | 105 // http://crbug.com/125276 |
| 107 registrar_.RemoveAll(); | 106 registrar_.RemoveAll(); |
| 108 user_manager::UserManager::Get()->RemoveObserver(this); | 107 user_manager::UserManager::Get()->RemoveObserver(this); |
| 109 } | 108 } |
| 110 | 109 |
| 111 } // namespace chromeos | 110 } // namespace chromeos |
| OLD | NEW |