OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_UI_WEBUI_LOGIN_DISPLAY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEBUI_LOGIN_DISPLAY_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEBUI_LOGIN_DISPLAY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEBUI_LOGIN_DISPLAY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/timer/timer.h" | |
13 #include "chrome/browser/chromeos/login/screens/gaia_screen.h" | 12 #include "chrome/browser/chromeos/login/screens/gaia_screen.h" |
14 #include "chrome/browser/chromeos/login/screens/user_selection_screen.h" | 13 #include "chrome/browser/chromeos/login/screens/user_selection_screen.h" |
15 #include "chrome/browser/chromeos/login/ui/login_display.h" | 14 #include "chrome/browser/chromeos/login/ui/login_display.h" |
16 #include "chrome/browser/chromeos/login/users/user.h" | 15 #include "chrome/browser/chromeos/login/users/user.h" |
17 #include "chrome/browser/ui/webui/chromeos/login/native_window_delegate.h" | 16 #include "chrome/browser/ui/webui/chromeos/login/native_window_delegate.h" |
18 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" | 17 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
19 #include "ui/views/widget/widget.h" | 18 #include "ui/views/widget/widget.h" |
20 #include "ui/wm/core/user_activity_observer.h" | 19 #include "ui/wm/core/user_activity_observer.h" |
21 | 20 |
22 namespace chromeos { | 21 namespace chromeos { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 virtual void ShowKioskEnableScreen() OVERRIDE; | 69 virtual void ShowKioskEnableScreen() OVERRIDE; |
71 virtual void ShowKioskAutolaunchScreen() OVERRIDE; | 70 virtual void ShowKioskAutolaunchScreen() OVERRIDE; |
72 virtual void ShowWrongHWIDScreen() OVERRIDE; | 71 virtual void ShowWrongHWIDScreen() OVERRIDE; |
73 virtual void SetWebUIHandler( | 72 virtual void SetWebUIHandler( |
74 LoginDisplayWebUIHandler* webui_handler) OVERRIDE; | 73 LoginDisplayWebUIHandler* webui_handler) OVERRIDE; |
75 virtual void ShowSigninScreenForCreds(const std::string& username, | 74 virtual void ShowSigninScreenForCreds(const std::string& username, |
76 const std::string& password); | 75 const std::string& password); |
77 virtual const UserList& GetUsers() const OVERRIDE; | 76 virtual const UserList& GetUsers() const OVERRIDE; |
78 virtual bool IsShowGuest() const OVERRIDE; | 77 virtual bool IsShowGuest() const OVERRIDE; |
79 virtual bool IsShowUsers() const OVERRIDE; | 78 virtual bool IsShowUsers() const OVERRIDE; |
80 virtual bool IsShowNewUser() const OVERRIDE; | |
81 virtual bool IsSigninInProgress() const OVERRIDE; | 79 virtual bool IsSigninInProgress() const OVERRIDE; |
82 virtual bool IsUserSigninCompleted() const OVERRIDE; | 80 virtual bool IsUserSigninCompleted() const OVERRIDE; |
83 virtual void SetDisplayEmail(const std::string& email) OVERRIDE; | 81 virtual void SetDisplayEmail(const std::string& email) OVERRIDE; |
84 virtual void Signout() OVERRIDE; | 82 virtual void Signout() OVERRIDE; |
85 virtual void LoginAsKioskApp(const std::string& app_id, | 83 virtual void LoginAsKioskApp(const std::string& app_id, |
86 bool diagnostic_mode) OVERRIDE; | 84 bool diagnostic_mode) OVERRIDE; |
| 85 virtual void HandleGetUsers() OVERRIDE; |
| 86 virtual void SetAuthType( |
| 87 const std::string& username, |
| 88 ScreenlockBridge::LockHandler::AuthType auth_type) OVERRIDE; |
| 89 virtual ScreenlockBridge::LockHandler::AuthType GetAuthType( |
| 90 const std::string& username) const OVERRIDE; |
87 | 91 |
88 // wm::UserActivityDetector implementation: | 92 // wm::UserActivityDetector implementation: |
89 virtual void OnUserActivity(const ui::Event* event) OVERRIDE; | 93 virtual void OnUserActivity(const ui::Event* event) OVERRIDE; |
90 | 94 |
91 private: | 95 private: |
92 void StartPasswordClearTimer(); | |
93 void OnPasswordClearTimerExpired(); | |
94 | 96 |
95 // Whether to show guest login. | 97 // Whether to show guest login. |
96 bool show_guest_; | 98 bool show_guest_; |
97 | 99 |
98 // Weather to show the user pods or a GAIA sign in. | 100 // Weather to show the user pods or a GAIA sign in. |
99 // Public sessions are always shown. | 101 // Public sessions are always shown. |
100 bool show_users_; | 102 bool show_users_; |
101 | 103 |
102 // Whether to show add new user. | 104 // Whether to show add new user. |
103 bool show_new_user_; | 105 bool show_new_user_; |
104 | 106 |
105 // Timer for measuring idle state duration before password clear. | |
106 base::OneShotTimer<WebUILoginDisplay> password_clear_timer_; | |
107 | |
108 // Reference to the WebUI handling layer for the login screen | 107 // Reference to the WebUI handling layer for the login screen |
109 LoginDisplayWebUIHandler* webui_handler_; | 108 LoginDisplayWebUIHandler* webui_handler_; |
110 | 109 |
111 scoped_ptr<GaiaScreen> gaia_screen_; | 110 scoped_ptr<GaiaScreen> gaia_screen_; |
112 scoped_ptr<UserSelectionScreen> user_selection_screen_; | 111 scoped_ptr<UserSelectionScreen> user_selection_screen_; |
113 | 112 |
114 DISALLOW_COPY_AND_ASSIGN(WebUILoginDisplay); | 113 DISALLOW_COPY_AND_ASSIGN(WebUILoginDisplay); |
115 }; | 114 }; |
116 | 115 |
117 } // namespace chromeos | 116 } // namespace chromeos |
118 | 117 |
119 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEBUI_LOGIN_DISPLAY_H_ | 118 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEBUI_LOGIN_DISPLAY_H_ |
OLD | NEW |