| 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/wizard_controller.h" | 5 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 6 | 6 |
| 7 #include <signal.h> | 7 #include <signal.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdlib.h> | 9 #include <stdlib.h> |
| 10 #include <sys/types.h> | 10 #include <sys/types.h> |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 635 StartupUtils::MarkEulaAccepted(); | 635 StartupUtils::MarkEulaAccepted(); |
| 636 PerformPostEulaActions(); | 636 PerformPostEulaActions(); |
| 637 OnDeviceDisabledChecked(false /* device_disabled */); | 637 OnDeviceDisabledChecked(false /* device_disabled */); |
| 638 } | 638 } |
| 639 | 639 |
| 640 pairing_chromeos::SharkConnectionListener* | 640 pairing_chromeos::SharkConnectionListener* |
| 641 WizardController::GetSharkConnectionListenerForTesting() { | 641 WizardController::GetSharkConnectionListenerForTesting() { |
| 642 return shark_connection_listener_.get(); | 642 return shark_connection_listener_.get(); |
| 643 } | 643 } |
| 644 | 644 |
| 645 void WizardController::AddObserver(Observer* observer) { | |
| 646 observer_list_.AddObserver(observer); | |
| 647 } | |
| 648 | |
| 649 void WizardController::RemoveObserver(Observer* observer) { | |
| 650 observer_list_.RemoveObserver(observer); | |
| 651 } | |
| 652 | |
| 653 void WizardController::OnSessionStart() { | |
| 654 for (auto& observer : observer_list_) | |
| 655 observer.OnSessionStart(); | |
| 656 } | |
| 657 | |
| 658 void WizardController::SkipUpdateEnrollAfterEula() { | 645 void WizardController::SkipUpdateEnrollAfterEula() { |
| 659 skip_update_enroll_after_eula_ = true; | 646 skip_update_enroll_after_eula_ = true; |
| 660 } | 647 } |
| 661 | 648 |
| 662 /////////////////////////////////////////////////////////////////////////////// | 649 /////////////////////////////////////////////////////////////////////////////// |
| 663 // WizardController, ExitHandlers: | 650 // WizardController, ExitHandlers: |
| 664 void WizardController::OnHIDDetectionCompleted() { | 651 void WizardController::OnHIDDetectionCompleted() { |
| 665 // Check for tests configuration. | 652 // Check for tests configuration. |
| 666 if (!StartupUtils::IsOobeCompleted()) | 653 if (!StartupUtils::IsOobeCompleted()) |
| 667 ShowNetworkScreen(); | 654 ShowNetworkScreen(); |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 955 return; | 942 return; |
| 956 | 943 |
| 957 // First remember how far have we reached so that we can resume if needed. | 944 // First remember how far have we reached so that we can resume if needed. |
| 958 if (is_out_of_box_ && IsResumableScreen(current_screen_->screen_id())) { | 945 if (is_out_of_box_ && IsResumableScreen(current_screen_->screen_id())) { |
| 959 StartupUtils::SaveOobePendingScreen( | 946 StartupUtils::SaveOobePendingScreen( |
| 960 GetOobeScreenName(current_screen_->screen_id())); | 947 GetOobeScreenName(current_screen_->screen_id())); |
| 961 } | 948 } |
| 962 | 949 |
| 963 smooth_show_timer_.Stop(); | 950 smooth_show_timer_.Stop(); |
| 964 | 951 |
| 965 for (auto& observer : observer_list_) | |
| 966 observer.OnScreenChanged(current_screen_); | |
| 967 | |
| 968 current_screen_->Show(); | 952 current_screen_->Show(); |
| 969 } | 953 } |
| 970 | 954 |
| 971 void WizardController::SetCurrentScreenSmooth(BaseScreen* new_current, | 955 void WizardController::SetCurrentScreenSmooth(BaseScreen* new_current, |
| 972 bool use_smoothing) { | 956 bool use_smoothing) { |
| 973 if (current_screen_ == new_current || new_current == nullptr || | 957 if (current_screen_ == new_current || new_current == nullptr || |
| 974 oobe_ui_ == nullptr) { | 958 oobe_ui_ == nullptr) { |
| 975 return; | 959 return; |
| 976 } | 960 } |
| 977 | 961 |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1508 : policy::EnrollmentConfig::MODE_MANUAL_REENROLLMENT; | 1492 : policy::EnrollmentConfig::MODE_MANUAL_REENROLLMENT; |
| 1509 } | 1493 } |
| 1510 | 1494 |
| 1511 EnrollmentScreen* screen = EnrollmentScreen::Get(this); | 1495 EnrollmentScreen* screen = EnrollmentScreen::Get(this); |
| 1512 screen->SetParameters(effective_config, shark_controller_.get()); | 1496 screen->SetParameters(effective_config, shark_controller_.get()); |
| 1513 SetStatusAreaVisible(true); | 1497 SetStatusAreaVisible(true); |
| 1514 SetCurrentScreen(screen); | 1498 SetCurrentScreen(screen); |
| 1515 } | 1499 } |
| 1516 | 1500 |
| 1517 } // namespace chromeos | 1501 } // namespace chromeos |
| OLD | NEW |