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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 const std::string& error_text, | 55 const std::string& error_text, |
56 const std::string& help_link_text, | 56 const std::string& help_link_text, |
57 HelpAppLauncher::HelpTopic help_topic_id) = 0; | 57 HelpAppLauncher::HelpTopic help_topic_id) = 0; |
58 virtual void ShowErrorScreen(LoginDisplay::SigninError error_id) = 0; | 58 virtual void ShowErrorScreen(LoginDisplay::SigninError error_id) = 0; |
59 virtual void ShowGaiaPasswordChanged(const std::string& username) = 0; | 59 virtual void ShowGaiaPasswordChanged(const std::string& username) = 0; |
60 virtual void ShowSigninUI(const std::string& email) = 0; | 60 virtual void ShowSigninUI(const std::string& email) = 0; |
61 virtual void ShowPasswordChangedDialog(bool show_password_error) = 0; | 61 virtual void ShowPasswordChangedDialog(bool show_password_error) = 0; |
62 // Show sign-in screen for the given credentials. | 62 // Show sign-in screen for the given credentials. |
63 virtual void ShowSigninScreenForCreds(const std::string& username, | 63 virtual void ShowSigninScreenForCreds(const std::string& username, |
64 const std::string& password) = 0; | 64 const std::string& password) = 0; |
| 65 virtual void SetGaiaOriginForTesting(const std::string& arg) = 0; |
65 protected: | 66 protected: |
66 virtual ~LoginDisplayWebUIHandler() {} | 67 virtual ~LoginDisplayWebUIHandler() {} |
67 }; | 68 }; |
68 | 69 |
69 // An interface for SigninScreenHandler to call WebUILoginDisplay. | 70 // An interface for SigninScreenHandler to call WebUILoginDisplay. |
70 class SigninScreenHandlerDelegate { | 71 class SigninScreenHandlerDelegate { |
71 public: | 72 public: |
72 // Cancels current password changed flow. | 73 // Cancels current password changed flow. |
73 virtual void CancelPasswordChangedFlow() = 0; | 74 virtual void CancelPasswordChangedFlow() = 0; |
74 | 75 |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 virtual void ShowError(int login_attempts, | 243 virtual void ShowError(int login_attempts, |
243 const std::string& error_text, | 244 const std::string& error_text, |
244 const std::string& help_link_text, | 245 const std::string& help_link_text, |
245 HelpAppLauncher::HelpTopic help_topic_id) OVERRIDE; | 246 HelpAppLauncher::HelpTopic help_topic_id) OVERRIDE; |
246 virtual void ShowGaiaPasswordChanged(const std::string& username) OVERRIDE; | 247 virtual void ShowGaiaPasswordChanged(const std::string& username) OVERRIDE; |
247 virtual void ShowSigninUI(const std::string& email) OVERRIDE; | 248 virtual void ShowSigninUI(const std::string& email) OVERRIDE; |
248 virtual void ShowPasswordChangedDialog(bool show_password_error) OVERRIDE; | 249 virtual void ShowPasswordChangedDialog(bool show_password_error) OVERRIDE; |
249 virtual void ShowErrorScreen(LoginDisplay::SigninError error_id) OVERRIDE; | 250 virtual void ShowErrorScreen(LoginDisplay::SigninError error_id) OVERRIDE; |
250 virtual void ShowSigninScreenForCreds(const std::string& username, | 251 virtual void ShowSigninScreenForCreds(const std::string& username, |
251 const std::string& password) OVERRIDE; | 252 const std::string& password) OVERRIDE; |
| 253 virtual void SetGaiaOriginForTesting(const std::string& arg) OVERRIDE; |
252 | 254 |
253 // BrowsingDataRemover::Observer overrides. | 255 // BrowsingDataRemover::Observer overrides. |
254 virtual void OnBrowsingDataRemoverDone() OVERRIDE; | 256 virtual void OnBrowsingDataRemoverDone() OVERRIDE; |
255 | 257 |
256 // SystemKeyEventListener::CapsLockObserver overrides. | 258 // SystemKeyEventListener::CapsLockObserver overrides. |
257 virtual void OnCapsLockChange(bool enabled) OVERRIDE; | 259 virtual void OnCapsLockChange(bool enabled) OVERRIDE; |
258 | 260 |
259 // content::NotificationObserver implementation: | 261 // content::NotificationObserver implementation: |
260 virtual void Observe(int type, | 262 virtual void Observe(int type, |
261 const content::NotificationSource& source, | 263 const content::NotificationSource& source, |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 base::CancelableClosure update_state_closure_; | 430 base::CancelableClosure update_state_closure_; |
429 base::CancelableClosure connecting_closure_; | 431 base::CancelableClosure connecting_closure_; |
430 | 432 |
431 content::NotificationRegistrar registrar_; | 433 content::NotificationRegistrar registrar_; |
432 | 434 |
433 // Whether there is an auth UI pending. This flag is set on receiving | 435 // 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 | 436 // NOTIFICATION_AUTH_NEEDED and reset on either NOTIFICATION_AUTH_SUPPLIED or |
435 // NOTIFICATION_AUTH_CANCELLED. | 437 // NOTIFICATION_AUTH_CANCELLED. |
436 bool has_pending_auth_ui_; | 438 bool has_pending_auth_ui_; |
437 | 439 |
| 440 // Testing helper, specifies new value for gaia url. |
| 441 std::string gaia_origin_for_test_; |
| 442 |
438 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); | 443 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); |
439 }; | 444 }; |
440 | 445 |
441 } // namespace chromeos | 446 } // namespace chromeos |
442 | 447 |
443 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ | 448 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
OLD | NEW |