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_LOGIN_DISPLAY_HOST_IMPL_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_DISPLAY_HOST_IMPL_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_DISPLAY_HOST_IMPL_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_DISPLAY_HOST_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 return default_host_; | 46 return default_host_; |
47 } | 47 } |
48 | 48 |
49 // LoginDisplayHost implementation: | 49 // LoginDisplayHost implementation: |
50 virtual LoginDisplay* CreateLoginDisplay( | 50 virtual LoginDisplay* CreateLoginDisplay( |
51 LoginDisplay::Delegate* delegate) OVERRIDE; | 51 LoginDisplay::Delegate* delegate) OVERRIDE; |
52 virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE; | 52 virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE; |
53 virtual WebUILoginView* GetWebUILoginView() const OVERRIDE; | 53 virtual WebUILoginView* GetWebUILoginView() const OVERRIDE; |
54 virtual views::Widget* GetWidget() const OVERRIDE; | 54 virtual views::Widget* GetWidget() const OVERRIDE; |
55 virtual void BeforeSessionStart() OVERRIDE; | 55 virtual void BeforeSessionStart() OVERRIDE; |
56 virtual void OnSessionStart() OVERRIDE; | 56 virtual void Finalize() OVERRIDE; |
57 virtual void OnCompleteLogin() OVERRIDE; | 57 virtual void OnCompleteLogin() OVERRIDE; |
58 virtual void OpenProxySettings() OVERRIDE; | 58 virtual void OpenProxySettings() OVERRIDE; |
59 virtual void SetOobeProgressBarVisible(bool visible) OVERRIDE; | 59 virtual void SetOobeProgressBarVisible(bool visible) OVERRIDE; |
60 virtual void SetShutdownButtonEnabled(bool enable) OVERRIDE; | 60 virtual void SetShutdownButtonEnabled(bool enable) OVERRIDE; |
61 virtual void SetStatusAreaVisible(bool visible) OVERRIDE; | 61 virtual void SetStatusAreaVisible(bool visible) OVERRIDE; |
62 virtual void CheckForAutoEnrollment() OVERRIDE; | 62 virtual void CheckForAutoEnrollment() OVERRIDE; |
63 virtual void StartWizard( | 63 virtual void StartWizard( |
64 const std::string& first_screen_name, | 64 const std::string& first_screen_name, |
65 scoped_ptr<DictionaryValue> screen_parameters) OVERRIDE; | 65 scoped_ptr<DictionaryValue> screen_parameters) OVERRIDE; |
66 virtual WizardController* GetWizardController() OVERRIDE; | 66 virtual WizardController* GetWizardController() OVERRIDE; |
| 67 virtual void StartUserAdding( |
| 68 const base::Closure& completion_callback) OVERRIDE; |
67 virtual void StartSignInScreen() OVERRIDE; | 69 virtual void StartSignInScreen() OVERRIDE; |
68 virtual void ResumeSignInScreen() OVERRIDE; | 70 virtual void ResumeSignInScreen() OVERRIDE; |
69 virtual void OnPreferencesChanged() OVERRIDE; | 71 virtual void OnPreferencesChanged() OVERRIDE; |
70 | 72 |
71 // Creates WizardController instance. | 73 // Creates WizardController instance. |
72 WizardController* CreateWizardController(); | 74 WizardController* CreateWizardController(); |
73 | 75 |
74 // Called when the first browser window is created, but before it's shown. | 76 // Called when the first browser window is created, but before it's shown. |
75 void OnBrowserCreated(); | 77 void OnBrowserCreated(); |
76 | 78 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 // Starts postponed WebUI (OOBE/sign in) if it was waiting for | 117 // Starts postponed WebUI (OOBE/sign in) if it was waiting for |
116 // wallpaper animation end. | 118 // wallpaper animation end. |
117 void StartPostponedWebUI(); | 119 void StartPostponedWebUI(); |
118 | 120 |
119 // Initializes |login_window_| and |login_view_| fields if needed. | 121 // Initializes |login_window_| and |login_view_| fields if needed. |
120 void InitLoginWindowAndView(); | 122 void InitLoginWindowAndView(); |
121 | 123 |
122 // Closes |login_window_| and resets |login_window_| and |login_view_| fields. | 124 // Closes |login_window_| and resets |login_window_| and |login_view_| fields. |
123 void ResetLoginWindowAndView(); | 125 void ResetLoginWindowAndView(); |
124 | 126 |
| 127 // Returns true if hosr running UI for adding users into session. |
| 128 bool IsRunningUserAdding(); |
| 129 |
125 // Used to calculate position of the screens and background. | 130 // Used to calculate position of the screens and background. |
126 gfx::Rect background_bounds_; | 131 gfx::Rect background_bounds_; |
127 | 132 |
128 content::NotificationRegistrar registrar_; | 133 content::NotificationRegistrar registrar_; |
129 | 134 |
130 base::WeakPtrFactory<LoginDisplayHostImpl> pointer_factory_; | 135 base::WeakPtrFactory<LoginDisplayHostImpl> pointer_factory_; |
131 | 136 |
132 // Default LoginDisplayHost. | 137 // Default LoginDisplayHost. |
133 static LoginDisplayHost* default_host_; | 138 static LoginDisplayHost* default_host_; |
134 | 139 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 // pods to load. | 191 // pods to load. |
187 bool waiting_for_user_pods_; | 192 bool waiting_for_user_pods_; |
188 | 193 |
189 // How many times renderer has crashed. | 194 // How many times renderer has crashed. |
190 int crash_count_; | 195 int crash_count_; |
191 | 196 |
192 // Way to restore if renderer have crashed. | 197 // Way to restore if renderer have crashed. |
193 enum { | 198 enum { |
194 RESTORE_UNKNOWN, | 199 RESTORE_UNKNOWN, |
195 RESTORE_WIZARD, | 200 RESTORE_WIZARD, |
196 RESTORE_SIGN_IN | 201 RESTORE_SIGN_IN, |
| 202 RESTORE_ADD_USER_INTO_SESSION, |
197 } restore_path_; | 203 } restore_path_; |
198 | 204 |
199 // Stored parameters for StartWizard, required to restore in case of crash. | 205 // Stored parameters for StartWizard, required to restore in case of crash. |
200 std::string wizard_first_screen_name_; | 206 std::string wizard_first_screen_name_; |
201 scoped_ptr<DictionaryValue> wizard_screen_parameters_; | 207 scoped_ptr<DictionaryValue> wizard_screen_parameters_; |
202 | 208 |
203 // Old value of the ash::internal::kIgnoreSoloWindowFramePainterPolicy | 209 // Old value of the ash::internal::kIgnoreSoloWindowFramePainterPolicy |
204 // property of the root window for |login_window_|. | 210 // property of the root window for |login_window_|. |
205 bool old_ignore_solo_window_frame_painter_policy_value_; | 211 bool old_ignore_solo_window_frame_painter_policy_value_; |
206 | 212 |
| 213 // Called before host deletion. |
| 214 base::Closure completion_callback_; |
| 215 |
207 DISALLOW_COPY_AND_ASSIGN(LoginDisplayHostImpl); | 216 DISALLOW_COPY_AND_ASSIGN(LoginDisplayHostImpl); |
208 }; | 217 }; |
209 | 218 |
210 } // namespace chromeos | 219 } // namespace chromeos |
211 | 220 |
212 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_DISPLAY_HOST_IMPL_H_ | 221 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_DISPLAY_HOST_IMPL_H_ |
OLD | NEW |