OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 | 178 |
179 // NetworkStateInformerDelegate implementation: | 179 // NetworkStateInformerDelegate implementation: |
180 virtual void OnNetworkReady() OVERRIDE; | 180 virtual void OnNetworkReady() OVERRIDE; |
181 | 181 |
182 // NetworkStateInformer::NetworkStateInformerObserver implementation: | 182 // NetworkStateInformer::NetworkStateInformerObserver implementation: |
183 virtual void UpdateState(NetworkStateInformer::State state, | 183 virtual void UpdateState(NetworkStateInformer::State state, |
184 const std::string& service_path, | 184 const std::string& service_path, |
185 ConnectionType connection_type, | 185 ConnectionType connection_type, |
186 const std::string& reason) OVERRIDE; | 186 const std::string& reason) OVERRIDE; |
187 | 187 |
| 188 // Use http:// for gaia url because our test http server does not |
| 189 // supporl ssl. |
| 190 static void UseHttpForGaiaForTesting() { http_for_gaia_ = true; } |
| 191 |
188 private: | 192 private: |
189 enum UIState { | 193 enum UIState { |
190 UI_STATE_UNKNOWN = 0, | 194 UI_STATE_UNKNOWN = 0, |
191 UI_STATE_GAIA_SIGNIN, | 195 UI_STATE_GAIA_SIGNIN, |
192 UI_STATE_ACCOUNT_PICKER, | 196 UI_STATE_ACCOUNT_PICKER, |
193 UI_STATE_LOCALLY_MANAGED_USER_CREATION | 197 UI_STATE_LOCALLY_MANAGED_USER_CREATION |
194 }; | 198 }; |
195 | 199 |
196 typedef base::hash_set<std::string> WebUIObservers; | 200 typedef base::hash_set<std::string> WebUIObservers; |
197 | 201 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 virtual void ShowError(int login_attempts, | 246 virtual void ShowError(int login_attempts, |
243 const std::string& error_text, | 247 const std::string& error_text, |
244 const std::string& help_link_text, | 248 const std::string& help_link_text, |
245 HelpAppLauncher::HelpTopic help_topic_id) OVERRIDE; | 249 HelpAppLauncher::HelpTopic help_topic_id) OVERRIDE; |
246 virtual void ShowGaiaPasswordChanged(const std::string& username) OVERRIDE; | 250 virtual void ShowGaiaPasswordChanged(const std::string& username) OVERRIDE; |
247 virtual void ShowSigninUI(const std::string& email) OVERRIDE; | 251 virtual void ShowSigninUI(const std::string& email) OVERRIDE; |
248 virtual void ShowPasswordChangedDialog(bool show_password_error) OVERRIDE; | 252 virtual void ShowPasswordChangedDialog(bool show_password_error) OVERRIDE; |
249 virtual void ShowErrorScreen(LoginDisplay::SigninError error_id) OVERRIDE; | 253 virtual void ShowErrorScreen(LoginDisplay::SigninError error_id) OVERRIDE; |
250 virtual void ShowSigninScreenForCreds(const std::string& username, | 254 virtual void ShowSigninScreenForCreds(const std::string& username, |
251 const std::string& password) OVERRIDE; | 255 const std::string& password) OVERRIDE; |
252 | |
253 // BrowsingDataRemover::Observer overrides. | 256 // BrowsingDataRemover::Observer overrides. |
254 virtual void OnBrowsingDataRemoverDone() OVERRIDE; | 257 virtual void OnBrowsingDataRemoverDone() OVERRIDE; |
255 | 258 |
256 // SystemKeyEventListener::CapsLockObserver overrides. | 259 // SystemKeyEventListener::CapsLockObserver overrides. |
257 virtual void OnCapsLockChange(bool enabled) OVERRIDE; | 260 virtual void OnCapsLockChange(bool enabled) OVERRIDE; |
258 | 261 |
259 // content::NotificationObserver implementation: | 262 // content::NotificationObserver implementation: |
260 virtual void Observe(int type, | 263 virtual void Observe(int type, |
261 const content::NotificationSource& source, | 264 const content::NotificationSource& source, |
262 const content::NotificationDetails& details) OVERRIDE; | 265 const content::NotificationDetails& details) OVERRIDE; |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 base::CancelableClosure update_state_closure_; | 431 base::CancelableClosure update_state_closure_; |
429 base::CancelableClosure connecting_closure_; | 432 base::CancelableClosure connecting_closure_; |
430 | 433 |
431 content::NotificationRegistrar registrar_; | 434 content::NotificationRegistrar registrar_; |
432 | 435 |
433 // Whether there is an auth UI pending. This flag is set on receiving | 436 // Whether there is an auth UI pending. This flag is set on receiving |
434 // NOTIFICATION_AUTH_NEEDED and reset on either NOTIFICATION_AUTH_SUPPLIED or | 437 // NOTIFICATION_AUTH_NEEDED and reset on either NOTIFICATION_AUTH_SUPPLIED or |
435 // NOTIFICATION_AUTH_CANCELLED. | 438 // NOTIFICATION_AUTH_CANCELLED. |
436 bool has_pending_auth_ui_; | 439 bool has_pending_auth_ui_; |
437 | 440 |
| 441 // Testing flag, true when we want to use http:// for gaia |
| 442 // url. Because our test http server does not supporl ssl. |
| 443 static bool http_for_gaia_; |
| 444 |
438 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); | 445 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); |
439 }; | 446 }; |
440 | 447 |
441 } // namespace chromeos | 448 } // namespace chromeos |
442 | 449 |
443 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ | 450 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
OLD | NEW |