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_STEP_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_AUTO_ENROLLMENT_CHECK_STEP_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_AUTO_ENROLLMENT_CHECK_STEP_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_AUTO_ENROLLMENT_CHECK_STEP_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" |
(...skipping 24 matching lines...) Expand all Loading... |
35 virtual void OnPortalDetectionCompleted( | 35 virtual void OnPortalDetectionCompleted( |
36 const NetworkState* network, | 36 const NetworkState* network, |
37 const NetworkPortalDetector::CaptivePortalState& state) OVERRIDE; | 37 const NetworkPortalDetector::CaptivePortalState& state) OVERRIDE; |
38 | 38 |
39 private: | 39 private: |
40 // Handles update notifications regarding the auto-enrollment check. | 40 // Handles update notifications regarding the auto-enrollment check. |
41 void OnAutoEnrollmentCheckProgressed(policy::AutoEnrollmentState state); | 41 void OnAutoEnrollmentCheckProgressed(policy::AutoEnrollmentState state); |
42 | 42 |
43 // Handles a state update, updating the UI and saving the state. | 43 // Handles a state update, updating the UI and saving the state. |
44 void UpdateState( | 44 void UpdateState( |
45 NetworkPortalDetector::CaptivePortalStatus new_captive_portal_status, | 45 captive_portal::CaptivePortalStatus new_captive_portal_status, |
46 policy::AutoEnrollmentState new_auto_enrollment_state); | 46 policy::AutoEnrollmentState new_auto_enrollment_state); |
47 | 47 |
48 // Configures the UI to reflect |new_captive_portal_status|. Returns true if | 48 // Configures the UI to reflect |new_captive_portal_status|. Returns true if |
49 // and only if a UI change has been made. | 49 // and only if a UI change has been made. |
50 bool UpdateCaptivePortalStatus( | 50 bool UpdateCaptivePortalStatus( |
51 NetworkPortalDetector::CaptivePortalStatus new_captive_portal_status); | 51 captive_portal::CaptivePortalStatus new_captive_portal_status); |
52 | 52 |
53 // Configures the UI to reflect |auto_enrollment_state|. Returns true if and | 53 // Configures the UI to reflect |auto_enrollment_state|. Returns true if and |
54 // only if a UI change has been made. | 54 // only if a UI change has been made. |
55 bool UpdateAutoEnrollmentState( | 55 bool UpdateAutoEnrollmentState( |
56 policy::AutoEnrollmentState auto_enrollment_state); | 56 policy::AutoEnrollmentState auto_enrollment_state); |
57 | 57 |
58 // Configures the error screen. | 58 // Configures the error screen. |
59 void ShowErrorScreen(ErrorScreen::ErrorState error_state); | 59 void ShowErrorScreen(ErrorScreen::ErrorState error_state); |
60 | 60 |
61 // Signals completion. No further code should run after a call to this | 61 // Signals completion. No further code should run after a call to this |
62 // function as the owner might destroy |this| in response. | 62 // function as the owner might destroy |this| in response. |
63 void SignalCompletion(); | 63 void SignalCompletion(); |
64 | 64 |
65 ScreenObserver* screen_observer_; | 65 ScreenObserver* screen_observer_; |
66 AutoEnrollmentController* auto_enrollment_controller_; | 66 AutoEnrollmentController* auto_enrollment_controller_; |
67 | 67 |
68 scoped_ptr<AutoEnrollmentController::ProgressCallbackList::Subscription> | 68 scoped_ptr<AutoEnrollmentController::ProgressCallbackList::Subscription> |
69 auto_enrollment_progress_subscription_; | 69 auto_enrollment_progress_subscription_; |
70 | 70 |
71 NetworkPortalDetector::CaptivePortalStatus captive_portal_status_; | 71 captive_portal::CaptivePortalStatus captive_portal_status_; |
72 policy::AutoEnrollmentState auto_enrollment_state_; | 72 policy::AutoEnrollmentState auto_enrollment_state_; |
73 | 73 |
74 DISALLOW_COPY_AND_ASSIGN(AutoEnrollmentCheckStep); | 74 DISALLOW_COPY_AND_ASSIGN(AutoEnrollmentCheckStep); |
75 }; | 75 }; |
76 | 76 |
77 } // namespace chromeos | 77 } // namespace chromeos |
78 | 78 |
79 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_AUTO_ENROLLMENT_CHECK_STEP_H
_ | 79 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_AUTO_ENROLLMENT_CHECK_STEP_H
_ |
OLD | NEW |