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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
189 // pods to load. | 194 // pods to load. |
190 bool waiting_for_user_pods_; | 195 bool waiting_for_user_pods_; |
191 | 196 |
192 // How many times renderer has crashed. | 197 // How many times renderer has crashed. |
193 int crash_count_; | 198 int crash_count_; |
194 | 199 |
195 // Way to restore if renderer have crashed. | 200 // Way to restore if renderer have crashed. |
196 enum { | 201 enum { |
197 RESTORE_UNKNOWN, | 202 RESTORE_UNKNOWN, |
198 RESTORE_WIZARD, | 203 RESTORE_WIZARD, |
199 RESTORE_SIGN_IN | 204 RESTORE_SIGN_IN, |
205 RESTORE_USER_ADDING, | |
Nikita (slow)
2013/05/28 11:34:22
nit: Let's rename it to something more specific li
dzhioev (left Google)
2013/05/29 13:05:04
Done.
| |
200 } restore_path_; | 206 } restore_path_; |
201 | 207 |
202 // Stored parameters for StartWizard, required to restore in case of crash. | 208 // Stored parameters for StartWizard, required to restore in case of crash. |
203 std::string wizard_first_screen_name_; | 209 std::string wizard_first_screen_name_; |
204 scoped_ptr<DictionaryValue> wizard_screen_parameters_; | 210 scoped_ptr<DictionaryValue> wizard_screen_parameters_; |
205 | 211 |
206 // Old value of the ash::internal::kIgnoreSoloWindowFramePainterPolicy | 212 // Old value of the ash::internal::kIgnoreSoloWindowFramePainterPolicy |
207 // property of the root window for |login_window_|. | 213 // property of the root window for |login_window_|. |
208 bool old_ignore_solo_window_frame_painter_policy_value_; | 214 bool old_ignore_solo_window_frame_painter_policy_value_; |
209 | 215 |
216 // Called before host deletion. | |
217 base::Closure completion_callback_; | |
218 | |
210 DISALLOW_COPY_AND_ASSIGN(LoginDisplayHostImpl); | 219 DISALLOW_COPY_AND_ASSIGN(LoginDisplayHostImpl); |
211 }; | 220 }; |
212 | 221 |
213 } // namespace chromeos | 222 } // namespace chromeos |
214 | 223 |
215 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_DISPLAY_HOST_IMPL_H_ | 224 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_DISPLAY_HOST_IMPL_H_ |
OLD | NEW |