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