Chromium Code Reviews| Index: chrome/browser/chromeos/login/existing_user_controller.h |
| diff --git a/chrome/browser/chromeos/login/existing_user_controller.h b/chrome/browser/chromeos/login/existing_user_controller.h |
| index 51df654c8b1c03a247ee54767416bba94b474bbb..0fd9edd0dc776f0eebb7664a4e031570ed4707be 100644 |
| --- a/chrome/browser/chromeos/login/existing_user_controller.h |
| +++ b/chrome/browser/chromeos/login/existing_user_controller.h |
| @@ -7,6 +7,7 @@ |
| #include <string> |
| +#include "ash/wm/user_activity_observer.h" |
| #include "base/callback_forward.h" |
| #include "base/compiler_specific.h" |
| #include "base/gtest_prod_util.h" |
| @@ -42,7 +43,8 @@ class ExistingUserController : public LoginDisplay::Delegate, |
| public content::NotificationObserver, |
| public LoginPerformer::Delegate, |
| public LoginUtils::Delegate, |
| - public PasswordChangedView::Delegate { |
| + public PasswordChangedView::Delegate, |
| + public ash::UserActivityObserver { |
| public: |
| // All UI initialization is deferred till Init() call. |
| explicit ExistingUserController(LoginDisplayHost* host); |
| @@ -63,6 +65,15 @@ class ExistingUserController : public LoginDisplay::Delegate, |
| // Tells the controller to resume a pending login. |
| void ResumeLogin(); |
| + // Start the public session auto-login timer. |
| + void StartPublicSessionAutoLoginTimer(); |
| + |
| + // Stop the public session auto-login timer when a login attempt begins. |
| + void StopPublicSessionAutoLoginTimer(); |
| + |
| + // UserActivityObserver::Observer implementation |
|
bartfab (slow)
2013/02/11 17:30:27
Nit: Colon at the end of the line.
dconnelly
2013/02/12 12:19:41
Done.
|
| + virtual void OnUserActivity() OVERRIDE; |
| + |
| // LoginDisplay::Delegate: implementation |
| virtual void CancelPasswordChangedFlow() OVERRIDE; |
| virtual void CreateAccount() OVERRIDE; |
| @@ -77,6 +88,7 @@ class ExistingUserController : public LoginDisplay::Delegate, |
| virtual void LoginAsRetailModeUser() OVERRIDE; |
| virtual void LoginAsGuest() OVERRIDE; |
| virtual void LoginAsPublicAccount(const std::string& username) OVERRIDE; |
| + virtual void OnSigninScreenReady() OVERRIDE; |
| virtual void OnUserSelected(const std::string& username) OVERRIDE; |
| virtual void OnStartEnterpriseEnrollment() OVERRIDE; |
| virtual void OnStartDeviceReset() OVERRIDE; |
| @@ -110,6 +122,9 @@ class ExistingUserController : public LoginDisplay::Delegate, |
| friend class ExistingUserControllerTest; |
| friend class MockLoginPerformerDelegate; |
| + // Retrieve public session auto-login policy and update the timer. |
| + void ConfigurePublicSessionAutoLogin(); |
| + |
| // LoginPerformer::Delegate implementation: |
| virtual void OnLoginFailure(const LoginFailure& error) OVERRIDE; |
| virtual void OnLoginSuccess( |
| @@ -194,6 +209,15 @@ class ExistingUserController : public LoginDisplay::Delegate, |
| // Updates the |login_display_| attached to this controller. |
| void UpdateLoginDisplay(const UserList& users); |
| + // Public session auto-login timer. |
| + base::OneShotTimer<ExistingUserController> auto_login_timer_; |
| + |
| + // Public session auto-login timeout, in milliseconds. |
| + int public_session_auto_login_delay_; |
| + |
| + // Username for public session auto-login. |
| + std::string public_session_auto_login_username_; |
| + |
| // Used to execute login operations. |
| scoped_ptr<LoginPerformer> login_performer_; |
| @@ -254,6 +278,9 @@ class ExistingUserController : public LoginDisplay::Delegate, |
| // session. |
| bool do_auto_enrollment_; |
| + // Whether the sign-in UI is finished loading. |
| + bool signin_screen_ready_; |
| + |
| // The username used for auto-enrollment, if it was triggered. |
| std::string auto_enrollment_username_; |