| 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/existing_user_controller.h" | 5 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 do_auto_enrollment_ = true; | 209 do_auto_enrollment_ = true; |
| 210 } | 210 } |
| 211 | 211 |
| 212 void ExistingUserController::ResumeLogin() { | 212 void ExistingUserController::ResumeLogin() { |
| 213 // This means the user signed-in, then auto-enrollment used his credentials | 213 // This means the user signed-in, then auto-enrollment used his credentials |
| 214 // to enroll and succeeded. | 214 // to enroll and succeeded. |
| 215 resume_login_callback_.Run(); | 215 resume_login_callback_.Run(); |
| 216 resume_login_callback_.Reset(); | 216 resume_login_callback_.Reset(); |
| 217 } | 217 } |
| 218 | 218 |
| 219 void ExistingUserController::PrepareKioskAppLaunch() { | |
| 220 // Disable login UI while waiting for the kiosk app launch. There is no | |
| 221 // balanced UI enable call because this very login screen will not be | |
| 222 // accessed again. If app is launched, it will be destroyed. If app fails to | |
| 223 // launch, chrome is restarted to go back to a new login screen. | |
| 224 login_display_->SetUIEnabled(false); | |
| 225 } | |
| 226 | |
| 227 //////////////////////////////////////////////////////////////////////////////// | 219 //////////////////////////////////////////////////////////////////////////////// |
| 228 // ExistingUserController, content::NotificationObserver implementation: | 220 // ExistingUserController, content::NotificationObserver implementation: |
| 229 // | 221 // |
| 230 | 222 |
| 231 void ExistingUserController::Observe( | 223 void ExistingUserController::Observe( |
| 232 int type, | 224 int type, |
| 233 const content::NotificationSource& source, | 225 const content::NotificationSource& source, |
| 234 const content::NotificationDetails& details) { | 226 const content::NotificationDetails& details) { |
| 235 if (type == chrome::NOTIFICATION_SESSION_STARTED) { | 227 if (type == chrome::NOTIFICATION_SESSION_STARTED) { |
| 236 // Stop listening to any notification once session has started. | 228 // Stop listening to any notification once session has started. |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 void ExistingUserController::ShowWrongHWIDScreen() { | 620 void ExistingUserController::ShowWrongHWIDScreen() { |
| 629 scoped_ptr<DictionaryValue> params; | 621 scoped_ptr<DictionaryValue> params; |
| 630 host_->StartWizard(WizardController::kWrongHWIDScreenName, params.Pass()); | 622 host_->StartWizard(WizardController::kWrongHWIDScreenName, params.Pass()); |
| 631 login_display_->OnFadeOut(); | 623 login_display_->OnFadeOut(); |
| 632 } | 624 } |
| 633 | 625 |
| 634 void ExistingUserController::Signout() { | 626 void ExistingUserController::Signout() { |
| 635 NOTREACHED(); | 627 NOTREACHED(); |
| 636 } | 628 } |
| 637 | 629 |
| 630 void ExistingUserController::LaunchKioskApp(const std::string& app_id) { |
| 631 host_->StartAppLaunch(app_id); |
| 632 } |
| 633 |
| 638 void ExistingUserController::OnConsumerKioskModeCheckCompleted( | 634 void ExistingUserController::OnConsumerKioskModeCheckCompleted( |
| 639 KioskAppManager::ConsumerKioskModeStatus status) { | 635 KioskAppManager::ConsumerKioskModeStatus status) { |
| 640 if (status == KioskAppManager::CONSUMER_KIOSK_MODE_CONFIGURABLE) | 636 if (status == KioskAppManager::CONSUMER_KIOSK_MODE_CONFIGURABLE) |
| 641 ShowKioskEnableScreen(); | 637 ShowKioskEnableScreen(); |
| 642 } | 638 } |
| 643 | 639 |
| 644 void ExistingUserController::OnEnrollmentOwnershipCheckCompleted( | 640 void ExistingUserController::OnEnrollmentOwnershipCheckCompleted( |
| 645 DeviceSettingsService::OwnershipStatus status, | 641 DeviceSettingsService::OwnershipStatus status, |
| 646 bool current_user_is_owner) { | 642 bool current_user_is_owner) { |
| 647 if (status == DeviceSettingsService::OWNERSHIP_NONE) { | 643 if (status == DeviceSettingsService::OWNERSHIP_NONE) { |
| (...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1116 // changed. | 1112 // changed. |
| 1117 UserManager::Get()->SaveUserOAuthStatus( | 1113 UserManager::Get()->SaveUserOAuthStatus( |
| 1118 username, | 1114 username, |
| 1119 User::OAUTH2_TOKEN_STATUS_INVALID); | 1115 User::OAUTH2_TOKEN_STATUS_INVALID); |
| 1120 | 1116 |
| 1121 login_display_->SetUIEnabled(true); | 1117 login_display_->SetUIEnabled(true); |
| 1122 login_display_->ShowGaiaPasswordChanged(username); | 1118 login_display_->ShowGaiaPasswordChanged(username); |
| 1123 } | 1119 } |
| 1124 | 1120 |
| 1125 } // namespace chromeos | 1121 } // namespace chromeos |
| OLD | NEW |