Index: chrome/browser/chromeos/login/webui_login_display.h |
diff --git a/chrome/browser/chromeos/login/webui_login_display.h b/chrome/browser/chromeos/login/webui_login_display.h |
index bb149f84fc54126187f51753bb58c8bb2a3096ea..913201c440ddc3149d8820c3899a2a85fd5fd3dc 100644 |
--- a/chrome/browser/chromeos/login/webui_login_display.h |
+++ b/chrome/browser/chromeos/login/webui_login_display.h |
@@ -8,7 +8,9 @@ |
#include <string> |
#include <vector> |
+#include "ash/wm/user_activity_observer.h" |
#include "base/compiler_specific.h" |
+#include "base/timer.h" |
#include "chrome/browser/chromeos/login/login_display.h" |
#include "chrome/browser/chromeos/login/user.h" |
#include "chrome/browser/ui/webui/chromeos/login/native_window_delegate.h" |
@@ -19,7 +21,8 @@ namespace chromeos { |
// WebUI-based login UI implementation. |
class WebUILoginDisplay : public LoginDisplay, |
public NativeWindowDelegate, |
- public SigninScreenHandlerDelegate { |
+ public SigninScreenHandlerDelegate, |
+ public ash::UserActivityObserver { |
public: |
explicit WebUILoginDisplay(LoginDisplay::Delegate* delegate); |
virtual ~WebUILoginDisplay(); |
@@ -78,7 +81,13 @@ class WebUILoginDisplay : public LoginDisplay, |
virtual void SetDisplayEmail(const std::string& email) OVERRIDE; |
virtual void Signout() OVERRIDE; |
+ // UserActivityDetector implementation: |
+ virtual void OnUserActivity() OVERRIDE; |
+ |
private: |
+ void StartPasswordClearTimer(); |
+ void OnPasswordClearTimerExpired(); |
+ |
// Set of Users that are visible. |
UserList users_; |
@@ -91,6 +100,9 @@ class WebUILoginDisplay : public LoginDisplay, |
// Whether to show add new user. |
bool show_new_user_; |
+ // Timer for measuring idle state duration before password clear. |
+ base::OneShotTimer<WebUILoginDisplay> password_clear_timer_; |
+ |
// Reference to the WebUI handling layer for the login screen |
LoginDisplayWebUIHandler* webui_handler_; |