Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Unified Diff: chrome/browser/chromeos/login/enrollment/auto_enrollment_check_screen.h

Issue 289133002: Add a enterprise enrollment check screen to OOBE in ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Improved wording. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/enrollment/auto_enrollment_check_screen.h
diff --git a/chrome/browser/chromeos/login/enrollment/auto_enrollment_check_step.h b/chrome/browser/chromeos/login/enrollment/auto_enrollment_check_screen.h
similarity index 74%
rename from chrome/browser/chromeos/login/enrollment/auto_enrollment_check_step.h
rename to chrome/browser/chromeos/login/enrollment/auto_enrollment_check_screen.h
index baa3931735a6afd3118e04997fbc695b54444c5f..175eb54f77e6a57e365202fb3af37579f0e83d87 100644
--- a/chrome/browser/chromeos/login/enrollment/auto_enrollment_check_step.h
+++ b/chrome/browser/chromeos/login/enrollment/auto_enrollment_check_screen.h
@@ -2,12 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_AUTO_ENROLLMENT_CHECK_STEP_H_
-#define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_AUTO_ENROLLMENT_CHECK_STEP_H_
+#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_AUTO_ENROLLMENT_CHECK_SCREEN_H_
+#define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_AUTO_ENROLLMENT_CHECK_SCREEN_H_
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
+#include "chrome/browser/chromeos/login/enrollment/auto_enrollment_check_screen_actor.h"
#include "chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h"
#include "chrome/browser/chromeos/login/screens/error_screen.h"
#include "chrome/browser/chromeos/net/network_portal_detector.h"
@@ -21,16 +22,31 @@ class ScreenObserver;
// keeping track of current auto-enrollment state and displaying and updating
// the error screen upon failures. Similar to a screen controller, but it
// doesn't actually drive a dedicated screen.
-class AutoEnrollmentCheckStep : NetworkPortalDetector::Observer {
+class AutoEnrollmentCheckScreen
+ : public AutoEnrollmentCheckScreenActor::Delegate,
+ public WizardScreen,
+ public NetworkPortalDetector::Observer {
public:
- AutoEnrollmentCheckStep(ScreenObserver* screen_observer,
- AutoEnrollmentController* auto_enrollment_controller);
- virtual ~AutoEnrollmentCheckStep();
+ AutoEnrollmentCheckScreen(
+ ScreenObserver* observer,
+ AutoEnrollmentCheckScreenActor* actor,
+ AutoEnrollmentController* auto_enrollment_controller);
+ virtual ~AutoEnrollmentCheckScreen();
// Hands over OOBE control to this AutoEnrollmentCheckStep. It'll return the
// flow back to the caller via the |screen_observer_|'s OnExit function.
void Start();
+ // WizardScreen implementation:
+ virtual void PrepareToShow() OVERRIDE;
+ virtual void Show() OVERRIDE;
+ virtual void Hide() OVERRIDE;
+ virtual std::string GetName() const OVERRIDE;
+
+ // AutoEnrollmentCheckScreenActor::Delegate implementation:
+ virtual void OnExit() OVERRIDE;
+ virtual void OnActorDestroyed(AutoEnrollmentCheckScreenActor* actor) OVERRIDE;
+
// NetworkPortalDetector::Observer implementation:
virtual void OnPortalDetectionCompleted(
const NetworkState* network,
@@ -62,7 +78,7 @@ class AutoEnrollmentCheckStep : NetworkPortalDetector::Observer {
// function as the owner might destroy |this| in response.
void SignalCompletion();
- ScreenObserver* screen_observer_;
+ AutoEnrollmentCheckScreenActor* actor_;
AutoEnrollmentController* auto_enrollment_controller_;
scoped_ptr<AutoEnrollmentController::ProgressCallbackList::Subscription>
@@ -71,9 +87,9 @@ class AutoEnrollmentCheckStep : NetworkPortalDetector::Observer {
NetworkPortalDetector::CaptivePortalStatus captive_portal_status_;
policy::AutoEnrollmentState auto_enrollment_state_;
- DISALLOW_COPY_AND_ASSIGN(AutoEnrollmentCheckStep);
+ DISALLOW_COPY_AND_ASSIGN(AutoEnrollmentCheckScreen);
};
} // namespace chromeos
-#endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_AUTO_ENROLLMENT_CHECK_STEP_H_
+#endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_AUTO_ENROLLMENT_CHECK_SCREEN_H_

Powered by Google App Engine
This is Rietveld 408576698