OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WIZARD_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 class Observer { | 65 class Observer { |
66 public: | 66 public: |
67 // Called before a screen change happens. | 67 // Called before a screen change happens. |
68 virtual void OnScreenChanged(BaseScreen* next_screen) = 0; | 68 virtual void OnScreenChanged(BaseScreen* next_screen) = 0; |
69 | 69 |
70 // Called after the browser session has started. | 70 // Called after the browser session has started. |
71 virtual void OnSessionStart() = 0; | 71 virtual void OnSessionStart() = 0; |
72 }; | 72 }; |
73 | 73 |
74 WizardController(LoginDisplayHost* host, OobeDisplay* oobe_display); | 74 WizardController(LoginDisplayHost* host, OobeDisplay* oobe_display); |
75 virtual ~WizardController(); | 75 ~WizardController() override; |
76 | 76 |
77 // Returns the default wizard controller if it has been created. | 77 // Returns the default wizard controller if it has been created. |
78 static WizardController* default_controller() { | 78 static WizardController* default_controller() { |
79 return default_controller_; | 79 return default_controller_; |
80 } | 80 } |
81 | 81 |
82 // Whether to skip any screens that may normally be shown after login | 82 // Whether to skip any screens that may normally be shown after login |
83 // (registration, Terms of Service, user image selection). | 83 // (registration, Terms of Service, user image selection). |
84 static bool skip_post_login_screens() { | 84 static bool skip_post_login_screens() { |
85 return skip_post_login_screens_; | 85 return skip_post_login_screens_; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 void EnableUserImageScreenReturnToPreviousHack(); | 123 void EnableUserImageScreenReturnToPreviousHack(); |
124 | 124 |
125 // Returns a pointer to the current screen or NULL if there's no such | 125 // Returns a pointer to the current screen or NULL if there's no such |
126 // screen. | 126 // screen. |
127 BaseScreen* current_screen() const { return current_screen_; } | 127 BaseScreen* current_screen() const { return current_screen_; } |
128 | 128 |
129 // Returns true if the current wizard instance has reached the login screen. | 129 // Returns true if the current wizard instance has reached the login screen. |
130 bool login_screen_started() const { return login_screen_started_; } | 130 bool login_screen_started() const { return login_screen_started_; } |
131 | 131 |
132 // ScreenManager implementation. | 132 // ScreenManager implementation. |
133 virtual BaseScreen* CreateScreen(const std::string& screen_name) override; | 133 BaseScreen* CreateScreen(const std::string& screen_name) override; |
134 | 134 |
135 static const char kNetworkScreenName[]; | 135 static const char kNetworkScreenName[]; |
136 static const char kLoginScreenName[]; | 136 static const char kLoginScreenName[]; |
137 static const char kUpdateScreenName[]; | 137 static const char kUpdateScreenName[]; |
138 static const char kUserImageScreenName[]; | 138 static const char kUserImageScreenName[]; |
139 static const char kOutOfBoxScreenName[]; | 139 static const char kOutOfBoxScreenName[]; |
140 static const char kTestNoScreenName[]; | 140 static const char kTestNoScreenName[]; |
141 static const char kEulaScreenName[]; | 141 static const char kEulaScreenName[]; |
142 static const char kEnableDebuggingScreenName[]; | 142 static const char kEnableDebuggingScreenName[]; |
143 static const char kEnrollmentScreenName[]; | 143 static const char kEnrollmentScreenName[]; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 void InitiateOOBEUpdate(); | 225 void InitiateOOBEUpdate(); |
226 | 226 |
227 // Actions that should be done right after EULA is accepted, | 227 // Actions that should be done right after EULA is accepted, |
228 // before update check. | 228 // before update check. |
229 void PerformPostEulaActions(); | 229 void PerformPostEulaActions(); |
230 | 230 |
231 // Actions that should be done right after update stage is finished. | 231 // Actions that should be done right after update stage is finished. |
232 void PerformOOBECompletedActions(); | 232 void PerformOOBECompletedActions(); |
233 | 233 |
234 // Overridden from BaseScreenDelegate: | 234 // Overridden from BaseScreenDelegate: |
235 virtual void OnExit(BaseScreen& screen, | 235 void OnExit(BaseScreen& screen, |
236 ExitCodes exit_code, | 236 ExitCodes exit_code, |
237 const ::login::ScreenContext* context) override; | 237 const ::login::ScreenContext* context) override; |
238 virtual void ShowCurrentScreen() override; | 238 void ShowCurrentScreen() override; |
239 virtual ErrorScreen* GetErrorScreen() override; | 239 ErrorScreen* GetErrorScreen() override; |
240 virtual void ShowErrorScreen() override; | 240 void ShowErrorScreen() override; |
241 virtual void HideErrorScreen(BaseScreen* parent_screen) override; | 241 void HideErrorScreen(BaseScreen* parent_screen) override; |
242 | 242 |
243 // Overridden from EulaScreen::Delegate: | 243 // Overridden from EulaScreen::Delegate: |
244 virtual void SetUsageStatisticsReporting(bool val) override; | 244 void SetUsageStatisticsReporting(bool val) override; |
245 virtual bool GetUsageStatisticsReporting() const override; | 245 bool GetUsageStatisticsReporting() const override; |
246 | 246 |
247 // Override from ControllerPairingScreen::Delegate: | 247 // Override from ControllerPairingScreen::Delegate: |
248 virtual void SetHostConfiguration() override; | 248 void SetHostConfiguration() override; |
249 | 249 |
250 // Override from HostPairingScreen::Delegate: | 250 // Override from HostPairingScreen::Delegate: |
251 virtual void ConfigureHost(bool accepted_eula, | 251 void ConfigureHost(bool accepted_eula, |
252 const std::string& lang, | 252 const std::string& lang, |
253 const std::string& timezone, | 253 const std::string& timezone, |
254 bool send_reports, | 254 bool send_reports, |
255 const std::string& keyboard_layout) override; | 255 const std::string& keyboard_layout) override; |
256 | 256 |
257 // Override from NetworkScreen::Delegate: | 257 // Override from NetworkScreen::Delegate: |
258 virtual void OnEnableDebuggingScreenRequested() override; | 258 void OnEnableDebuggingScreenRequested() override; |
259 | 259 |
260 // Notification of a change in the state of an accessibility setting. | 260 // Notification of a change in the state of an accessibility setting. |
261 void OnAccessibilityStatusChanged( | 261 void OnAccessibilityStatusChanged( |
262 const AccessibilityStatusEventDetails& details); | 262 const AccessibilityStatusEventDetails& details); |
263 | 263 |
264 // Switches from one screen to another. | 264 // Switches from one screen to another. |
265 void SetCurrentScreen(BaseScreen* screen); | 265 void SetCurrentScreen(BaseScreen* screen); |
266 | 266 |
267 // Switches from one screen to another with delay before showing. Calling | 267 // Switches from one screen to another with delay before showing. Calling |
268 // ShowCurrentScreen directly forces screen to be shown immediately. | 268 // ShowCurrentScreen directly forces screen to be shown immediately. |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 shark_connection_listener_; | 421 shark_connection_listener_; |
422 | 422 |
423 base::WeakPtrFactory<WizardController> weak_factory_; | 423 base::WeakPtrFactory<WizardController> weak_factory_; |
424 | 424 |
425 DISALLOW_COPY_AND_ASSIGN(WizardController); | 425 DISALLOW_COPY_AND_ASSIGN(WizardController); |
426 }; | 426 }; |
427 | 427 |
428 } // namespace chromeos | 428 } // namespace chromeos |
429 | 429 |
430 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ | 430 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ |
OLD | NEW |