Chromium Code Reviews| 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 { | |
| 254 gaia_origin_for_test_ = arg; | |
| 255 } | |
| 252 | 256 |
| 253 // BrowsingDataRemover::Observer overrides. | 257 // BrowsingDataRemover::Observer overrides. |
| 254 virtual void OnBrowsingDataRemoverDone() OVERRIDE; | 258 virtual void OnBrowsingDataRemoverDone() OVERRIDE; |
| 255 | 259 |
| 256 // SystemKeyEventListener::CapsLockObserver overrides. | 260 // SystemKeyEventListener::CapsLockObserver overrides. |
| 257 virtual void OnCapsLockChange(bool enabled) OVERRIDE; | 261 virtual void OnCapsLockChange(bool enabled) OVERRIDE; |
| 258 | 262 |
| 259 // content::NotificationObserver implementation: | 263 // content::NotificationObserver implementation: |
| 260 virtual void Observe(int type, | 264 virtual void Observe(int type, |
| 261 const content::NotificationSource& source, | 265 const content::NotificationSource& source, |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 428 base::CancelableClosure update_state_closure_; | 432 base::CancelableClosure update_state_closure_; |
| 429 base::CancelableClosure connecting_closure_; | 433 base::CancelableClosure connecting_closure_; |
| 430 | 434 |
| 431 content::NotificationRegistrar registrar_; | 435 content::NotificationRegistrar registrar_; |
| 432 | 436 |
| 433 // Whether there is an auth UI pending. This flag is set on receiving | 437 // 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 | 438 // NOTIFICATION_AUTH_NEEDED and reset on either NOTIFICATION_AUTH_SUPPLIED or |
| 435 // NOTIFICATION_AUTH_CANCELLED. | 439 // NOTIFICATION_AUTH_CANCELLED. |
| 436 bool has_pending_auth_ui_; | 440 bool has_pending_auth_ui_; |
| 437 | 441 |
| 442 // Testing flag, true when we want to use http:// for gaia | |
|
Nikita (slow)
2013/04/08 19:56:41
nit: Update comment.
glotov
2013/04/10 13:03:24
Done.
| |
| 443 // url. Because our test http server does not supporl ssl. | |
| 444 std::string gaia_origin_for_test_; | |
| 445 | |
| 438 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); | 446 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); |
| 439 }; | 447 }; |
| 440 | 448 |
| 441 } // namespace chromeos | 449 } // namespace chromeos |
| 442 | 450 |
| 443 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ | 451 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
| OLD | NEW |