• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_OOBE_DISPLAY_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_OOBE_DISPLAY_H_
7 
8 #include <string>
9 
10 #include "base/basictypes.h"
11 #include "base/callback.h"
12 
13 namespace chromeos {
14 
15 class AppLaunchSplashScreenActor;
16 class EnrollmentScreenActor;
17 class ErrorScreenActor;
18 class EulaScreenActor;
19 class KioskAutolaunchScreenActor;
20 class KioskEnableScreenActor;
21 class NetworkScreenActor;
22 class ResetScreenActor;
23 class TermsOfServiceScreenActor;
24 class UpdateScreenActor;
25 class UserImageScreenActor;
26 // TODO(altimofeev): use real actors instead
27 class ViewScreenDelegate;
28 class WizardScreen;
29 class WrongHWIDScreenActor;
30 class LocallyManagedUserCreationScreenHandler;
31 
32 // Interface which is used by WizardController to do actual OOBE screens
33 // showing. Also it provides actors for the OOBE screens.
34 class OobeDisplay {
35  public:
36   enum Screen {
37     SCREEN_OOBE_NETWORK = 0,
38     SCREEN_OOBE_EULA,
39     SCREEN_OOBE_UPDATE,
40     SCREEN_OOBE_ENROLLMENT,
41     SCREEN_GAIA_SIGNIN,
42     SCREEN_ACCOUNT_PICKER,
43     SCREEN_KIOSK_AUTOLAUNCH,
44     SCREEN_KIOSK_ENABLE,
45     SCREEN_ERROR_MESSAGE,
46     SCREEN_USER_IMAGE_PICKER,
47     SCREEN_TPM_ERROR,
48     SCREEN_PASSWORD_CHANGED,
49     SCREEN_CREATE_MANAGED_USER_DIALOG,
50     SCREEN_CREATE_MANAGED_USER_FLOW,
51     SCREEN_TERMS_OF_SERVICE,
52     SCREEN_WRONG_HWID,
53     SCREEN_APP_LAUNCH_SPLASH,
54     SCREEN_CONFIRM_PASSWORD,
55     SCREEN_MESSAGE_BOX,
56     SCREEN_UNKNOWN
57   };
58 
~OobeDisplay()59   virtual ~OobeDisplay() {}
60 
61   // Shows the given screen.
62   virtual void ShowScreen(WizardScreen* screen) = 0;
63 
64   // Hides the given screen.
65   virtual void HideScreen(WizardScreen* screen) = 0;
66 
67   // Pointers to actors which should be used by the specific screens. Actors
68   // must be owned by the OobeDisplay implementation.
69   virtual UpdateScreenActor* GetUpdateScreenActor() = 0;
70   virtual NetworkScreenActor* GetNetworkScreenActor() = 0;
71   virtual EulaScreenActor* GetEulaScreenActor() = 0;
72   virtual EnrollmentScreenActor* GetEnrollmentScreenActor() = 0;
73   virtual ResetScreenActor* GetResetScreenActor() = 0;
74   virtual KioskAutolaunchScreenActor* GetKioskAutolaunchScreenActor() = 0;
75   virtual KioskEnableScreenActor* GetKioskEnableScreenActor() = 0;
76   virtual TermsOfServiceScreenActor* GetTermsOfServiceScreenActor() = 0;
77   virtual UserImageScreenActor* GetUserImageScreenActor() = 0;
78   virtual ErrorScreenActor* GetErrorScreenActor() = 0;
79   virtual WrongHWIDScreenActor* GetWrongHWIDScreenActor() = 0;
80   virtual LocallyManagedUserCreationScreenHandler*
81       GetLocallyManagedUserCreationScreenActor() = 0;
82   virtual AppLaunchSplashScreenActor* GetAppLaunchSplashScreenActor() = 0;
83 
84   // Returns if JS side is fully loaded and ready to accept messages.
85   // If |false| is returned, then |display_is_ready_callback| is stored
86   // and will be called once display is ready.
87   virtual bool IsJSReady(const base::Closure& display_is_ready_callback) = 0;
88 };
89 
90 }  // namespace chromeos
91 
92 #endif  // CHROME_BROWSER_CHROMEOS_LOGIN_OOBE_DISPLAY_H_
93