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 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/containers/hash_tables.h" | 13 #include "base/containers/hash_tables.h" |
14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
15 #include "base/memory/linked_ptr.h" | 15 #include "base/memory/linked_ptr.h" |
16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
18 #include "base/observer_list.h" | 18 #include "base/observer_list.h" |
19 #include "base/time/time.h" | 19 #include "base/time/time.h" |
20 #include "base/timer/timer.h" | 20 #include "base/timer/timer.h" |
21 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 21 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
22 #include "chrome/browser/chromeos/login/screen_manager.h" | 22 #include "chrome/browser/chromeos/login/screen_manager.h" |
23 #include "chrome/browser/chromeos/login/screens/controller_pairing_screen.h" | |
23 #include "chrome/browser/chromeos/login/screens/eula_screen.h" | 24 #include "chrome/browser/chromeos/login/screens/eula_screen.h" |
25 #include "chrome/browser/chromeos/login/screens/host_pairing_screen.h" | |
24 #include "chrome/browser/chromeos/login/screens/screen_observer.h" | 26 #include "chrome/browser/chromeos/login/screens/screen_observer.h" |
25 | 27 |
26 class PrefRegistrySimple; | 28 class PrefRegistrySimple; |
27 class PrefService; | 29 class PrefService; |
28 | 30 |
29 namespace base { | 31 namespace base { |
30 class DictionaryValue; | 32 class DictionaryValue; |
31 } | 33 } |
32 | 34 |
33 namespace pairing_chromeos { | 35 namespace pairing_chromeos { |
(...skipping 16 matching lines...) Expand all Loading... | |
50 class SupervisedUserCreationScreen; | 52 class SupervisedUserCreationScreen; |
51 class TimeZoneProvider; | 53 class TimeZoneProvider; |
52 struct TimeZoneResponseData; | 54 struct TimeZoneResponseData; |
53 class UpdateScreen; | 55 class UpdateScreen; |
54 class UserImageScreen; | 56 class UserImageScreen; |
55 | 57 |
56 // Class that manages control flow between wizard screens. Wizard controller | 58 // Class that manages control flow between wizard screens. Wizard controller |
57 // interacts with screen controllers to move the user between screens. | 59 // interacts with screen controllers to move the user between screens. |
58 class WizardController : public ScreenObserver, | 60 class WizardController : public ScreenObserver, |
59 public ScreenManager, | 61 public ScreenManager, |
60 public EulaScreen::Delegate { | 62 public EulaScreen::Delegate, |
63 public ControllerPairingScreen::Delegate, | |
64 public HostPairingScreen::Delegate { | |
61 public: | 65 public: |
62 // Observes screen changes. | 66 // Observes screen changes. |
63 class Observer { | 67 class Observer { |
64 public: | 68 public: |
65 // Called before a screen change happens. | 69 // Called before a screen change happens. |
66 virtual void OnScreenChanged(BaseScreen* next_screen) = 0; | 70 virtual void OnScreenChanged(BaseScreen* next_screen) = 0; |
67 | 71 |
68 // Called after the browser session has started. | 72 // Called after the browser session has started. |
69 virtual void OnSessionStart() = 0; | 73 virtual void OnSessionStart() = 0; |
70 }; | 74 }; |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
233 // Actions that should be done right after EULA is accepted, | 237 // Actions that should be done right after EULA is accepted, |
234 // before update check. | 238 // before update check. |
235 void PerformPostEulaActions(); | 239 void PerformPostEulaActions(); |
236 | 240 |
237 // Actions that should be done right after update stage is finished. | 241 // Actions that should be done right after update stage is finished. |
238 void PerformOOBECompletedActions(); | 242 void PerformOOBECompletedActions(); |
239 | 243 |
240 // Overridden from ScreenObserver: | 244 // Overridden from ScreenObserver: |
241 virtual void OnExit(ExitCodes exit_code) override; | 245 virtual void OnExit(ExitCodes exit_code) override; |
242 virtual void ShowCurrentScreen() override; | 246 virtual void ShowCurrentScreen() override; |
243 virtual void SetHostConfiguration() override; | |
244 virtual void ConfigureHost(bool accepted_eula, | |
245 const std::string& lang, | |
246 const std::string& timezone, | |
247 bool send_reports, | |
248 const std::string& keyboard_layout) override; | |
249 virtual ErrorScreen* GetErrorScreen() override; | 247 virtual ErrorScreen* GetErrorScreen() override; |
250 virtual void ShowErrorScreen() override; | 248 virtual void ShowErrorScreen() override; |
251 virtual void HideErrorScreen(BaseScreen* parent_screen) override; | 249 virtual void HideErrorScreen(BaseScreen* parent_screen) override; |
252 | 250 |
253 // Overridden from EulaScreen::Delegate: | 251 // Overridden from EulaScreen::Delegate: |
254 virtual void SetUsageStatisticsReporting(bool val) override; | 252 virtual void SetUsageStatisticsReporting(bool val) override; |
255 virtual bool GetUsageStatisticsReporting() const override; | 253 virtual bool GetUsageStatisticsReporting() const override; |
256 | 254 |
255 // Override from ControllerPairingScreen::Delegate: | |
achuithb
2014/10/27 18:50:57
I'd say Overridden just to be consistent with surr
| |
256 virtual void SetHostConfiguration() override; | |
257 | |
258 // Override from HostPairingScreen::Delegate: | |
achuithb
2014/10/27 18:50:57
same
| |
259 virtual void ConfigureHost(bool accepted_eula, | |
260 const std::string& lang, | |
261 const std::string& timezone, | |
262 bool send_reports, | |
263 const std::string& keyboard_layout) override; | |
264 | |
257 // Notification of a change in the state of an accessibility setting. | 265 // Notification of a change in the state of an accessibility setting. |
258 void OnAccessibilityStatusChanged( | 266 void OnAccessibilityStatusChanged( |
259 const AccessibilityStatusEventDetails& details); | 267 const AccessibilityStatusEventDetails& details); |
260 | 268 |
261 // Switches from one screen to another. | 269 // Switches from one screen to another. |
262 void SetCurrentScreen(BaseScreen* screen); | 270 void SetCurrentScreen(BaseScreen* screen); |
263 | 271 |
264 // Switches from one screen to another with delay before showing. Calling | 272 // Switches from one screen to another with delay before showing. Calling |
265 // ShowCurrentScreen directly forces screen to be shown immediately. | 273 // ShowCurrentScreen directly forces screen to be shown immediately. |
266 void SetCurrentScreenSmooth(BaseScreen* screen, bool use_smoothing); | 274 void SetCurrentScreenSmooth(BaseScreen* screen, bool use_smoothing); |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
420 shark_connection_listener_; | 428 shark_connection_listener_; |
421 | 429 |
422 base::WeakPtrFactory<WizardController> weak_factory_; | 430 base::WeakPtrFactory<WizardController> weak_factory_; |
423 | 431 |
424 DISALLOW_COPY_AND_ASSIGN(WizardController); | 432 DISALLOW_COPY_AND_ASSIGN(WizardController); |
425 }; | 433 }; |
426 | 434 |
427 } // namespace chromeos | 435 } // namespace chromeos |
428 | 436 |
429 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ | 437 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ |
OLD | NEW |