Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: chrome/browser/chromeos/login/ui/webui_login_display.h

Issue 296823009: ChromeOS login webui refactoring: split user selection/gaia login screens. (Closed) Base URL: http://git.chromium.org/chromium/src.git@refactoring-1
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 virtual void ShowKioskEnableScreen() OVERRIDE; 79 virtual void ShowKioskEnableScreen() OVERRIDE;
81 virtual void ShowKioskAutolaunchScreen() OVERRIDE; 80 virtual void ShowKioskAutolaunchScreen() OVERRIDE;
82 virtual void ShowWrongHWIDScreen() OVERRIDE; 81 virtual void ShowWrongHWIDScreen() OVERRIDE;
83 virtual void SetWebUIHandler( 82 virtual void SetWebUIHandler(
84 LoginDisplayWebUIHandler* webui_handler) OVERRIDE; 83 LoginDisplayWebUIHandler* webui_handler) OVERRIDE;
85 virtual void ShowSigninScreenForCreds(const std::string& username, 84 virtual void ShowSigninScreenForCreds(const std::string& username,
86 const std::string& password); 85 const std::string& password);
87 virtual const UserList& GetUsers() const OVERRIDE; 86 virtual const UserList& GetUsers() const OVERRIDE;
88 virtual bool IsShowGuest() const OVERRIDE; 87 virtual bool IsShowGuest() const OVERRIDE;
89 virtual bool IsShowUsers() const OVERRIDE; 88 virtual bool IsShowUsers() const OVERRIDE;
90 virtual bool IsShowNewUser() const OVERRIDE;
91 virtual bool IsSigninInProgress() const OVERRIDE; 89 virtual bool IsSigninInProgress() const OVERRIDE;
92 virtual bool IsUserSigninCompleted() const OVERRIDE; 90 virtual bool IsUserSigninCompleted() const OVERRIDE;
93 virtual void SetDisplayEmail(const std::string& email) OVERRIDE; 91 virtual void SetDisplayEmail(const std::string& email) OVERRIDE;
94 virtual void Signout() OVERRIDE; 92 virtual void Signout() OVERRIDE;
95 virtual void LoginAsKioskApp(const std::string& app_id, 93 virtual void LoginAsKioskApp(const std::string& app_id,
96 bool diagnostic_mode) OVERRIDE; 94 bool diagnostic_mode) OVERRIDE;
97 95 virtual void HandleCustomButtonClicked(const std::string& user_id) OVERRIDE;
96 virtual void HandleGetUsers() OVERRIDE;
98 // wm::UserActivityDetector implementation: 97 // wm::UserActivityDetector implementation:
99 virtual void OnUserActivity(const ui::Event* event) OVERRIDE; 98 virtual void OnUserActivity(const ui::Event* event) OVERRIDE;
100 99
101 private: 100 private:
102 void StartPasswordClearTimer();
103 void OnPasswordClearTimerExpired();
104 101
105 // Whether to show guest login. 102 // Whether to show guest login.
106 bool show_guest_; 103 bool show_guest_;
107 104
108 // Weather to show the user pods or a GAIA sign in. 105 // Weather to show the user pods or a GAIA sign in.
109 // Public sessions are always shown. 106 // Public sessions are always shown.
110 bool show_users_; 107 bool show_users_;
111 108
112 // Whether to show add new user. 109 // Whether to show add new user.
113 bool show_new_user_; 110 bool show_new_user_;
114 111
115 // Timer for measuring idle state duration before password clear.
116 base::OneShotTimer<WebUILoginDisplay> password_clear_timer_;
117
118 // Reference to the WebUI handling layer for the login screen 112 // Reference to the WebUI handling layer for the login screen
119 LoginDisplayWebUIHandler* webui_handler_; 113 LoginDisplayWebUIHandler* webui_handler_;
120 114
121 scoped_ptr<GaiaScreen> gaia_screen_; 115 scoped_ptr<GaiaScreen> gaia_screen_;
122 scoped_ptr<UserSelectionScreen> user_selection_screen_; 116 scoped_ptr<UserSelectionScreen> user_selection_screen_;
123 117
124 DISALLOW_COPY_AND_ASSIGN(WebUILoginDisplay); 118 DISALLOW_COPY_AND_ASSIGN(WebUILoginDisplay);
125 }; 119 };
126 120
127 } // namespace chromeos 121 } // namespace chromeos
128 122
129 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEBUI_LOGIN_DISPLAY_H_ 123 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEBUI_LOGIN_DISPLAY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698