| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_AUTO_ENROLLMENT_CHECK_SCREEN_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_AUTO_ENROLLMENT_CHECK_SCREEN_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_AUTO_ENROLLMENT_CHECK_SCREEN_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_AUTO_ENROLLMENT_CHECK_SCREEN_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "chrome/browser/chromeos/login/enrollment/auto_enrollment_check_screen_
actor.h" | 11 #include "chrome/browser/chromeos/login/enrollment/auto_enrollment_check_screen_
actor.h" |
| 12 #include "chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h" | 12 #include "chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h" |
| 13 #include "chrome/browser/chromeos/login/screens/error_screen.h" | 13 #include "chrome/browser/chromeos/login/screens/error_screen.h" |
| 14 #include "chromeos/network/portal_detector/network_portal_detector.h" | 14 #include "chromeos/network/portal_detector/network_portal_detector.h" |
| 15 | 15 |
| 16 namespace chromeos { | 16 namespace chromeos { |
| 17 | 17 |
| 18 class ScreenManager; |
| 18 class ScreenObserver; | 19 class ScreenObserver; |
| 19 | 20 |
| 20 // Handles the control flow after OOBE auto-update completes to wait for the | 21 // Handles the control flow after OOBE auto-update completes to wait for the |
| 21 // enterprise auto-enrollment check that happens as part of OOBE. This includes | 22 // enterprise auto-enrollment check that happens as part of OOBE. This includes |
| 22 // keeping track of current auto-enrollment state and displaying and updating | 23 // keeping track of current auto-enrollment state and displaying and updating |
| 23 // the error screen upon failures. Similar to a screen controller, but it | 24 // the error screen upon failures. Similar to a screen controller, but it |
| 24 // doesn't actually drive a dedicated screen. | 25 // doesn't actually drive a dedicated screen. |
| 25 class AutoEnrollmentCheckScreen | 26 class AutoEnrollmentCheckScreen |
| 26 : public AutoEnrollmentCheckScreenActor::Delegate, | 27 : public AutoEnrollmentCheckScreenActor::Delegate, |
| 27 public WizardScreen, | 28 public WizardScreen, |
| 28 public NetworkPortalDetector::Observer { | 29 public NetworkPortalDetector::Observer { |
| 29 public: | 30 public: |
| 30 AutoEnrollmentCheckScreen( | 31 AutoEnrollmentCheckScreen( |
| 31 ScreenObserver* observer, | 32 ScreenObserver* observer, |
| 32 AutoEnrollmentCheckScreenActor* actor); | 33 AutoEnrollmentCheckScreenActor* actor); |
| 33 virtual ~AutoEnrollmentCheckScreen(); | 34 virtual ~AutoEnrollmentCheckScreen(); |
| 34 | 35 |
| 36 static AutoEnrollmentCheckScreen* Get(ScreenManager* manager); |
| 37 |
| 35 // Hands over OOBE control to this AutoEnrollmentCheckStep. It'll return the | 38 // Hands over OOBE control to this AutoEnrollmentCheckStep. It'll return the |
| 36 // flow back to the caller via the |screen_observer_|'s OnExit function. | 39 // flow back to the caller via the |screen_observer_|'s OnExit function. |
| 37 void Start(); | 40 void Start(); |
| 38 | 41 |
| 39 void set_auto_enrollment_controller( | 42 void set_auto_enrollment_controller( |
| 40 AutoEnrollmentController* auto_enrollment_controller) { | 43 AutoEnrollmentController* auto_enrollment_controller) { |
| 41 auto_enrollment_controller_ = auto_enrollment_controller; | 44 auto_enrollment_controller_ = auto_enrollment_controller; |
| 42 } | 45 } |
| 43 | 46 |
| 44 // WizardScreen implementation: | 47 // WizardScreen implementation: |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 97 |
| 95 NetworkPortalDetector::CaptivePortalStatus captive_portal_status_; | 98 NetworkPortalDetector::CaptivePortalStatus captive_portal_status_; |
| 96 policy::AutoEnrollmentState auto_enrollment_state_; | 99 policy::AutoEnrollmentState auto_enrollment_state_; |
| 97 | 100 |
| 98 DISALLOW_COPY_AND_ASSIGN(AutoEnrollmentCheckScreen); | 101 DISALLOW_COPY_AND_ASSIGN(AutoEnrollmentCheckScreen); |
| 99 }; | 102 }; |
| 100 | 103 |
| 101 } // namespace chromeos | 104 } // namespace chromeos |
| 102 | 105 |
| 103 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_AUTO_ENROLLMENT_CHECK_SCREEN
_H_ | 106 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_AUTO_ENROLLMENT_CHECK_SCREEN
_H_ |
| OLD | NEW |