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 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 num_login_attempts_ = 0; | 573 num_login_attempts_ = 0; |
574 } | 574 } |
575 | 575 |
576 void ExistingUserController::OnStartEnterpriseEnrollment() { | 576 void ExistingUserController::OnStartEnterpriseEnrollment() { |
577 DeviceSettingsService::Get()->GetOwnershipStatusAsync( | 577 DeviceSettingsService::Get()->GetOwnershipStatusAsync( |
578 base::Bind(&ExistingUserController::OnEnrollmentOwnershipCheckCompleted, | 578 base::Bind(&ExistingUserController::OnEnrollmentOwnershipCheckCompleted, |
579 weak_factory_.GetWeakPtr())); | 579 weak_factory_.GetWeakPtr())); |
580 } | 580 } |
581 | 581 |
582 void ExistingUserController::OnStartKioskEnableScreen() { | 582 void ExistingUserController::OnStartKioskEnableScreen() { |
583 KioskAppManager::Get()->GetConsumerKioskModeStatus( | 583 KioskAppManager::Get()->GetConsumerKioskAutoLaunchStatus( |
584 base::Bind(&ExistingUserController::OnConsumerKioskModeCheckCompleted, | 584 base::Bind( |
585 weak_factory_.GetWeakPtr())); | 585 &ExistingUserController::OnConsumerKioskAutoLaunchCheckCompleted, |
| 586 weak_factory_.GetWeakPtr())); |
586 } | 587 } |
587 | 588 |
588 void ExistingUserController::OnStartDeviceReset() { | 589 void ExistingUserController::OnStartDeviceReset() { |
589 ShowResetScreen(); | 590 ShowResetScreen(); |
590 } | 591 } |
591 | 592 |
592 void ExistingUserController::OnStartKioskAutolaunchScreen() { | 593 void ExistingUserController::OnStartKioskAutolaunchScreen() { |
593 ShowKioskAutolaunchScreen(); | 594 ShowKioskAutolaunchScreen(); |
594 } | 595 } |
595 | 596 |
(...skipping 10 matching lines...) Expand all Loading... |
606 void ExistingUserController::ShowWrongHWIDScreen() { | 607 void ExistingUserController::ShowWrongHWIDScreen() { |
607 scoped_ptr<base::DictionaryValue> params; | 608 scoped_ptr<base::DictionaryValue> params; |
608 host_->StartWizard(WizardController::kWrongHWIDScreenName, params.Pass()); | 609 host_->StartWizard(WizardController::kWrongHWIDScreenName, params.Pass()); |
609 login_display_->OnFadeOut(); | 610 login_display_->OnFadeOut(); |
610 } | 611 } |
611 | 612 |
612 void ExistingUserController::Signout() { | 613 void ExistingUserController::Signout() { |
613 NOTREACHED(); | 614 NOTREACHED(); |
614 } | 615 } |
615 | 616 |
616 void ExistingUserController::OnConsumerKioskModeCheckCompleted( | 617 void ExistingUserController::OnConsumerKioskAutoLaunchCheckCompleted( |
617 KioskAppManager::ConsumerKioskModeStatus status) { | 618 KioskAppManager::ConsumerKioskAutoLaunchStatus status) { |
618 if (status == KioskAppManager::CONSUMER_KIOSK_MODE_CONFIGURABLE) | 619 if (status == KioskAppManager::CONSUMER_KIOSK_AUTO_LAUNCH_CONFIGURABLE) |
619 ShowKioskEnableScreen(); | 620 ShowKioskEnableScreen(); |
620 } | 621 } |
621 | 622 |
622 void ExistingUserController::OnEnrollmentOwnershipCheckCompleted( | 623 void ExistingUserController::OnEnrollmentOwnershipCheckCompleted( |
623 DeviceSettingsService::OwnershipStatus status) { | 624 DeviceSettingsService::OwnershipStatus status) { |
624 if (status == DeviceSettingsService::OWNERSHIP_NONE) { | 625 if (status == DeviceSettingsService::OWNERSHIP_NONE) { |
625 ShowEnrollmentScreen(false, std::string()); | 626 ShowEnrollmentScreen(false, std::string()); |
626 } else if (status == DeviceSettingsService::OWNERSHIP_TAKEN) { | 627 } else if (status == DeviceSettingsService::OWNERSHIP_TAKEN) { |
627 // On a device that is already owned we might want to allow users to | 628 // On a device that is already owned we might want to allow users to |
628 // re-enroll if the policy information is invalid. | 629 // re-enroll if the policy information is invalid. |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1109 } | 1110 } |
1110 | 1111 |
1111 void ExistingUserController::SendAccessibilityAlert( | 1112 void ExistingUserController::SendAccessibilityAlert( |
1112 const std::string& alert_text) { | 1113 const std::string& alert_text) { |
1113 AccessibilityAlertInfo event(ProfileHelper::GetSigninProfile(), alert_text); | 1114 AccessibilityAlertInfo event(ProfileHelper::GetSigninProfile(), alert_text); |
1114 SendControlAccessibilityNotification( | 1115 SendControlAccessibilityNotification( |
1115 ui::AccessibilityTypes::EVENT_VALUE_CHANGED, &event); | 1116 ui::AccessibilityTypes::EVENT_VALUE_CHANGED, &event); |
1116 } | 1117 } |
1117 | 1118 |
1118 } // namespace chromeos | 1119 } // namespace chromeos |
OLD | NEW |