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

Side by Side Diff: chrome/browser/chromeos/login/wizard_controller.h

Issue 898453002: HID-detection screen moved to screenContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 10 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 unified diff | Download patch
OLDNEW
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/base_screen_delegate.h" 23 #include "chrome/browser/chromeos/login/screens/base_screen_delegate.h"
24 #include "chrome/browser/chromeos/login/screens/controller_pairing_screen.h" 24 #include "chrome/browser/chromeos/login/screens/controller_pairing_screen.h"
25 #include "chrome/browser/chromeos/login/screens/eula_screen.h" 25 #include "chrome/browser/chromeos/login/screens/eula_screen.h"
26 #include "chrome/browser/chromeos/login/screens/hid_detection_screen.h"
26 #include "chrome/browser/chromeos/login/screens/host_pairing_screen.h" 27 #include "chrome/browser/chromeos/login/screens/host_pairing_screen.h"
27 #include "chrome/browser/chromeos/login/screens/network_screen.h" 28 #include "chrome/browser/chromeos/login/screens/network_screen.h"
28 #include "chrome/browser/chromeos/login/screens/reset_screen.h" 29 #include "chrome/browser/chromeos/login/screens/reset_screen.h"
29 #include "chrome/browser/chromeos/policy/enrollment_config.h" 30 #include "chrome/browser/chromeos/policy/enrollment_config.h"
30 31
31 class PrefRegistrySimple; 32 class PrefRegistrySimple;
32 class PrefService; 33 class PrefService;
33 34
34 namespace pairing_chromeos { 35 namespace pairing_chromeos {
35 class ControllerPairingController; 36 class ControllerPairingController;
(...skipping 17 matching lines...) Expand all
53 class UpdateScreen; 54 class UpdateScreen;
54 class UserImageScreen; 55 class UserImageScreen;
55 56
56 // Class that manages control flow between wizard screens. Wizard controller 57 // Class that manages control flow between wizard screens. Wizard controller
57 // interacts with screen controllers to move the user between screens. 58 // interacts with screen controllers to move the user between screens.
58 class WizardController : public BaseScreenDelegate, 59 class WizardController : public BaseScreenDelegate,
59 public ScreenManager, 60 public ScreenManager,
60 public EulaScreen::Delegate, 61 public EulaScreen::Delegate,
61 public ControllerPairingScreen::Delegate, 62 public ControllerPairingScreen::Delegate,
62 public HostPairingScreen::Delegate, 63 public HostPairingScreen::Delegate,
63 public NetworkScreen::Delegate { 64 public NetworkScreen::Delegate,
65 public HIDDetectionScreen::Delegate {
64 public: 66 public:
65 // Observes screen changes. 67 // Observes screen changes.
66 class Observer { 68 class Observer {
67 public: 69 public:
68 // Called before a screen change happens. 70 // Called before a screen change happens.
69 virtual void OnScreenChanged(BaseScreen* next_screen) = 0; 71 virtual void OnScreenChanged(BaseScreen* next_screen) = 0;
70 72
71 // Called after the browser session has started. 73 // Called after the browser session has started.
72 virtual void OnSessionStart() = 0; 74 virtual void OnSessionStart() = 0;
73 }; 75 };
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 void ShowAutoEnrollmentCheckScreen(); 177 void ShowAutoEnrollmentCheckScreen();
176 void ShowSupervisedUserCreationScreen(); 178 void ShowSupervisedUserCreationScreen();
177 void ShowHIDDetectionScreen(); 179 void ShowHIDDetectionScreen();
178 void ShowControllerPairingScreen(); 180 void ShowControllerPairingScreen();
179 void ShowHostPairingScreen(); 181 void ShowHostPairingScreen();
180 void ShowDeviceDisabledScreen(); 182 void ShowDeviceDisabledScreen();
181 183
182 // Shows images login screen. 184 // Shows images login screen.
183 void ShowLoginScreen(const LoginScreenContext& context); 185 void ShowLoginScreen(const LoginScreenContext& context);
184 186
185 // Invokes corresponding first OOBE screen.
186 void OnHIDScreenNecessityCheck(bool screen_needed);
187
188 // Exit handlers: 187 // Exit handlers:
189 void OnHIDDetectionCompleted(); 188 void OnHIDDetectionCompleted();
190 void OnNetworkConnected(); 189 void OnNetworkConnected();
191 void OnNetworkOffline(); 190 void OnNetworkOffline();
192 void OnConnectionFailed(); 191 void OnConnectionFailed();
193 void OnUpdateCompleted(); 192 void OnUpdateCompleted();
194 void OnEulaAccepted(); 193 void OnEulaAccepted();
195 void OnUpdateErrorCheckingForUpdate(); 194 void OnUpdateErrorCheckingForUpdate();
196 void OnUpdateErrorUpdating(); 195 void OnUpdateErrorUpdating();
197 void OnUserImageSelected(); 196 void OnUserImageSelected();
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 // Override from HostPairingScreen::Delegate: 250 // Override from HostPairingScreen::Delegate:
252 void ConfigureHost(bool accepted_eula, 251 void ConfigureHost(bool accepted_eula,
253 const std::string& lang, 252 const std::string& lang,
254 const std::string& timezone, 253 const std::string& timezone,
255 bool send_reports, 254 bool send_reports,
256 const std::string& keyboard_layout) override; 255 const std::string& keyboard_layout) override;
257 256
258 // Override from NetworkScreen::Delegate: 257 // Override from NetworkScreen::Delegate:
259 void OnEnableDebuggingScreenRequested() override; 258 void OnEnableDebuggingScreenRequested() override;
260 259
260 // Override from HIDDetectionScreen::Delegate
261 void OnHIDScreenNecessityCheck(bool screen_needed) override;
262
261 // Notification of a change in the state of an accessibility setting. 263 // Notification of a change in the state of an accessibility setting.
262 void OnAccessibilityStatusChanged( 264 void OnAccessibilityStatusChanged(
263 const AccessibilityStatusEventDetails& details); 265 const AccessibilityStatusEventDetails& details);
264 266
265 // Switches from one screen to another. 267 // Switches from one screen to another.
266 void SetCurrentScreen(BaseScreen* screen); 268 void SetCurrentScreen(BaseScreen* screen);
267 269
268 // Switches from one screen to another with delay before showing. Calling 270 // Switches from one screen to another with delay before showing. Calling
269 // ShowCurrentScreen directly forces screen to be shown immediately. 271 // ShowCurrentScreen directly forces screen to be shown immediately.
270 void SetCurrentScreenSmooth(BaseScreen* screen, bool use_smoothing); 272 void SetCurrentScreenSmooth(BaseScreen* screen, bool use_smoothing);
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 416
415 // True if shark device initiated connection to this device. 417 // True if shark device initiated connection to this device.
416 bool shark_controller_detected_; 418 bool shark_controller_detected_;
417 419
418 // Listens for incoming connection from a shark controller if a regular (not 420 // Listens for incoming connection from a shark controller if a regular (not
419 // pairing) remora OOBE is active. If connection is established, wizard 421 // pairing) remora OOBE is active. If connection is established, wizard
420 // conroller swithces to a pairing OOBE. 422 // conroller swithces to a pairing OOBE.
421 scoped_ptr<pairing_chromeos::SharkConnectionListener> 423 scoped_ptr<pairing_chromeos::SharkConnectionListener>
422 shark_connection_listener_; 424 shark_connection_listener_;
423 425
426 BaseScreen* hid_screen_;
427
424 base::WeakPtrFactory<WizardController> weak_factory_; 428 base::WeakPtrFactory<WizardController> weak_factory_;
425 429
426 DISALLOW_COPY_AND_ASSIGN(WizardController); 430 DISALLOW_COPY_AND_ASSIGN(WizardController);
427 }; 431 };
428 432
429 } // namespace chromeos 433 } // namespace chromeos
430 434
431 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ 435 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/ui/oobe_display.h ('k') | chrome/browser/chromeos/login/wizard_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698