OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_CHROMEOS_LOGIN_WEBUI_LOGIN_DISPLAY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_DISPLAY_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_DISPLAY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_DISPLAY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "ash/wm/user_activity_observer.h" | |
12 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
13 #include "base/timer/timer.h" | 12 #include "base/timer/timer.h" |
14 #include "chrome/browser/chromeos/login/login_display.h" | 13 #include "chrome/browser/chromeos/login/login_display.h" |
15 #include "chrome/browser/chromeos/login/user.h" | 14 #include "chrome/browser/chromeos/login/user.h" |
16 #include "chrome/browser/ui/webui/chromeos/login/native_window_delegate.h" | 15 #include "chrome/browser/ui/webui/chromeos/login/native_window_delegate.h" |
17 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" | 16 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
18 #include "ui/views/widget/widget.h" | 17 #include "ui/views/widget/widget.h" |
| 18 #include "ui/wm/core/user_activity_observer.h" |
19 | 19 |
20 namespace chromeos { | 20 namespace chromeos { |
21 // WebUI-based login UI implementation. | 21 // WebUI-based login UI implementation. |
22 class WebUILoginDisplay : public LoginDisplay, | 22 class WebUILoginDisplay : public LoginDisplay, |
23 public NativeWindowDelegate, | 23 public NativeWindowDelegate, |
24 public SigninScreenHandlerDelegate, | 24 public SigninScreenHandlerDelegate, |
25 public ash::UserActivityObserver { | 25 public wm::UserActivityObserver { |
26 public: | 26 public: |
27 explicit WebUILoginDisplay(LoginDisplay::Delegate* delegate); | 27 explicit WebUILoginDisplay(LoginDisplay::Delegate* delegate); |
28 virtual ~WebUILoginDisplay(); | 28 virtual ~WebUILoginDisplay(); |
29 | 29 |
30 // LoginDisplay implementation: | 30 // LoginDisplay implementation: |
31 virtual void ClearAndEnablePassword() OVERRIDE; | 31 virtual void ClearAndEnablePassword() OVERRIDE; |
32 virtual void Init(const UserList& users, | 32 virtual void Init(const UserList& users, |
33 bool show_guest, | 33 bool show_guest, |
34 bool show_users, | 34 bool show_users, |
35 bool show_new_user) OVERRIDE; | 35 bool show_new_user) OVERRIDE; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 virtual bool IsShowGuest() const OVERRIDE; | 89 virtual bool IsShowGuest() const OVERRIDE; |
90 virtual bool IsShowUsers() const OVERRIDE; | 90 virtual bool IsShowUsers() const OVERRIDE; |
91 virtual bool IsShowNewUser() const OVERRIDE; | 91 virtual bool IsShowNewUser() const OVERRIDE; |
92 virtual bool IsSigninInProgress() const OVERRIDE; | 92 virtual bool IsSigninInProgress() const OVERRIDE; |
93 virtual bool IsUserSigninCompleted() const OVERRIDE; | 93 virtual bool IsUserSigninCompleted() const OVERRIDE; |
94 virtual void SetDisplayEmail(const std::string& email) OVERRIDE; | 94 virtual void SetDisplayEmail(const std::string& email) OVERRIDE; |
95 virtual void Signout() OVERRIDE; | 95 virtual void Signout() OVERRIDE; |
96 virtual void LoginAsKioskApp(const std::string& app_id, | 96 virtual void LoginAsKioskApp(const std::string& app_id, |
97 bool diagnostic_mode) OVERRIDE; | 97 bool diagnostic_mode) OVERRIDE; |
98 | 98 |
99 // UserActivityDetector implementation: | 99 // wm::UserActivityDetector implementation: |
100 virtual void OnUserActivity(const ui::Event* event) OVERRIDE; | 100 virtual void OnUserActivity(const ui::Event* event) OVERRIDE; |
101 | 101 |
102 private: | 102 private: |
103 void StartPasswordClearTimer(); | 103 void StartPasswordClearTimer(); |
104 void OnPasswordClearTimerExpired(); | 104 void OnPasswordClearTimerExpired(); |
105 | 105 |
106 // Set of Users that are visible. | 106 // Set of Users that are visible. |
107 UserList users_; | 107 UserList users_; |
108 | 108 |
109 // Whether to show guest login. | 109 // Whether to show guest login. |
(...skipping 10 matching lines...) Expand all Loading... |
120 | 120 |
121 // Reference to the WebUI handling layer for the login screen | 121 // Reference to the WebUI handling layer for the login screen |
122 LoginDisplayWebUIHandler* webui_handler_; | 122 LoginDisplayWebUIHandler* webui_handler_; |
123 | 123 |
124 DISALLOW_COPY_AND_ASSIGN(WebUILoginDisplay); | 124 DISALLOW_COPY_AND_ASSIGN(WebUILoginDisplay); |
125 }; | 125 }; |
126 | 126 |
127 } // namespace chromeos | 127 } // namespace chromeos |
128 | 128 |
129 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_DISPLAY_H_ | 129 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_DISPLAY_H_ |
OLD | NEW |