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