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

Unified Diff: chrome/browser/chromeos/login/wizard_controller.h

Issue 539483002: Move all typecasting code to individual screens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes Created 6 years, 3 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/wizard_controller.h
diff --git a/chrome/browser/chromeos/login/wizard_controller.h b/chrome/browser/chromeos/login/wizard_controller.h
index ee03e9e786fba160c2e9ad570562c8bfe8359075..379571263e111eaf8df06901f05442aba8866038 100644
--- a/chrome/browser/chromeos/login/wizard_controller.h
+++ b/chrome/browser/chromeos/login/wizard_controller.h
@@ -19,6 +19,7 @@
#include "base/time/time.h"
#include "base/timer/timer.h"
#include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
+#include "chrome/browser/chromeos/login/screen_manager.h"
#include "chrome/browser/chromeos/login/screens/screen_observer.h"
class PrefRegistrySimple;
@@ -47,7 +48,7 @@ class UserImageScreen;
// Class that manages control flow between wizard screens. Wizard controller
// interacts with screen controllers to move the user between screens.
-class WizardController : public ScreenObserver {
+class WizardController : public ScreenObserver, public ScreenManager {
public:
// Observes screen changes.
class Observer {
@@ -121,17 +122,6 @@ class WizardController : public ScreenObserver {
// reworked at hackaton.
void EnableUserImageScreenReturnToPreviousHack();
- // Lazy initializers and getters for screens.
- WizardScreen* GetScreen(const std::string& screen_name);
- WizardScreen* CreateScreen(const std::string& screen_name);
-
- // Typed getters for the screens.
- NetworkScreen* GetNetworkScreen();
- UpdateScreen* GetUpdateScreen();
- UserImageScreen* GetUserImageScreen();
- EnrollmentScreen* GetEnrollmentScreen();
- AutoEnrollmentCheckScreen* GetAutoEnrollmentCheckScreen();
- SupervisedUserCreationScreen* GetSupervisedUserCreationScreen();
// Returns a pointer to the current screen or NULL if there's no such
// screen.
@@ -140,6 +130,9 @@ class WizardController : public ScreenObserver {
// Returns true if the current wizard instance has reached the login screen.
bool login_screen_started() const { return login_screen_started_; }
+ // ScreenManager implementation.
+ virtual WizardScreen* CreateScreen(const std::string& screen_name) OVERRIDE;
+
static const char kNetworkScreenName[];
static const char kLoginScreenName[];
static const char kUpdateScreenName[];

Powered by Google App Engine
This is Rietveld 408576698