| 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 "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "chrome/browser/chromeos/login/enrollment/auto_enrollment_check_screen_
actor.h" | 12 #include "chrome/browser/chromeos/login/enrollment/auto_enrollment_check_screen_
actor.h" |
| 13 #include "chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h" | 13 #include "chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h" |
| 14 #include "chrome/browser/chromeos/login/screens/error_screen.h" | 14 #include "chrome/browser/chromeos/login/screens/base_screen.h" |
| 15 #include "chrome/browser/chromeos/login/screens/network_error.h" |
| 15 #include "chromeos/network/portal_detector/network_portal_detector.h" | 16 #include "chromeos/network/portal_detector/network_portal_detector.h" |
| 16 | 17 |
| 17 namespace chromeos { | 18 namespace chromeos { |
| 18 | 19 |
| 19 class BaseScreenDelegate; | 20 class BaseScreenDelegate; |
| 20 class ErrorScreensHistogramHelper; | 21 class ErrorScreensHistogramHelper; |
| 21 class ScreenManager; | 22 class ScreenManager; |
| 22 | 23 |
| 23 // Handles the control flow after OOBE auto-update completes to wait for the | 24 // Handles the control flow after OOBE auto-update completes to wait for the |
| 24 // enterprise auto-enrollment check that happens as part of OOBE. This includes | 25 // enterprise auto-enrollment check that happens as part of OOBE. This includes |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 // and only if a UI change has been made. | 70 // and only if a UI change has been made. |
| 70 bool UpdateCaptivePortalStatus( | 71 bool UpdateCaptivePortalStatus( |
| 71 NetworkPortalDetector::CaptivePortalStatus new_captive_portal_status); | 72 NetworkPortalDetector::CaptivePortalStatus new_captive_portal_status); |
| 72 | 73 |
| 73 // Configures the UI to reflect |auto_enrollment_state|. Returns true if and | 74 // Configures the UI to reflect |auto_enrollment_state|. Returns true if and |
| 74 // only if a UI change has been made. | 75 // only if a UI change has been made. |
| 75 bool UpdateAutoEnrollmentState( | 76 bool UpdateAutoEnrollmentState( |
| 76 policy::AutoEnrollmentState auto_enrollment_state); | 77 policy::AutoEnrollmentState auto_enrollment_state); |
| 77 | 78 |
| 78 // Configures the error screen. | 79 // Configures the error screen. |
| 79 void ShowErrorScreen(ErrorScreen::ErrorState error_state); | 80 void ShowErrorScreen(NetworkError::ErrorState error_state); |
| 80 | 81 |
| 81 // Asynchronously signals completion. The owner might destroy |this| in | 82 // Asynchronously signals completion. The owner might destroy |this| in |
| 82 // response, so no code should be run after the completion of a message loop | 83 // response, so no code should be run after the completion of a message loop |
| 83 // task, in which this function was called. | 84 // task, in which this function was called. |
| 84 void SignalCompletion(); | 85 void SignalCompletion(); |
| 85 | 86 |
| 86 // Returns whether enrollment check was completed and decision was made. | 87 // Returns whether enrollment check was completed and decision was made. |
| 87 bool IsCompleted() const; | 88 bool IsCompleted() const; |
| 88 | 89 |
| 89 AutoEnrollmentCheckScreenActor* actor_; | 90 AutoEnrollmentCheckScreenActor* actor_; |
| 90 AutoEnrollmentController* auto_enrollment_controller_; | 91 AutoEnrollmentController* auto_enrollment_controller_; |
| 91 | 92 |
| 92 scoped_ptr<AutoEnrollmentController::ProgressCallbackList::Subscription> | 93 scoped_ptr<AutoEnrollmentController::ProgressCallbackList::Subscription> |
| 93 auto_enrollment_progress_subscription_; | 94 auto_enrollment_progress_subscription_; |
| 94 | 95 |
| 95 NetworkPortalDetector::CaptivePortalStatus captive_portal_status_; | 96 NetworkPortalDetector::CaptivePortalStatus captive_portal_status_; |
| 96 policy::AutoEnrollmentState auto_enrollment_state_; | 97 policy::AutoEnrollmentState auto_enrollment_state_; |
| 97 | 98 |
| 98 scoped_ptr<ErrorScreensHistogramHelper> histogram_helper_; | 99 scoped_ptr<ErrorScreensHistogramHelper> histogram_helper_; |
| 99 | 100 |
| 100 base::WeakPtrFactory<AutoEnrollmentCheckScreen> weak_ptr_factory_; | 101 base::WeakPtrFactory<AutoEnrollmentCheckScreen> weak_ptr_factory_; |
| 101 | 102 |
| 102 DISALLOW_COPY_AND_ASSIGN(AutoEnrollmentCheckScreen); | 103 DISALLOW_COPY_AND_ASSIGN(AutoEnrollmentCheckScreen); |
| 103 }; | 104 }; |
| 104 | 105 |
| 105 } // namespace chromeos | 106 } // namespace chromeos |
| 106 | 107 |
| 107 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_AUTO_ENROLLMENT_CHECK_SCREEN
_H_ | 108 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_AUTO_ENROLLMENT_CHECK_SCREEN
_H_ |
| OLD | NEW |