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

Unified Diff: chrome/browser/chromeos/login/screens/user_selection_screen.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: Update tests again Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/screens/user_selection_screen.h
diff --git a/chrome/browser/chromeos/login/screens/user_selection_screen.h b/chrome/browser/chromeos/login/screens/user_selection_screen.h
index 03dfe7d63f6cf8291b3844a7bf1d1d957ea4a50b..b5daa3c0bb97949b2f7022cee5a6533a4f11488a 100644
--- a/chrome/browser/chromeos/login/screens/user_selection_screen.h
+++ b/chrome/browser/chromeos/login/screens/user_selection_screen.h
@@ -5,36 +5,74 @@
#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_SELECTION_SCREEN_H_
#define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_SELECTION_SCREEN_H_
+#include <map>
#include <string>
#include "base/bind.h"
#include "base/compiler_specific.h"
+#include "base/timer/timer.h"
+#include "base/values.h"
#include "chrome/browser/chromeos/login/users/user.h"
+#include "chrome/browser/signin/screenlock_bridge.h"
+#include "ui/wm/core/user_activity_observer.h"
namespace chromeos {
class LoginDisplayWebUIHandler;
// This class represents User Selection screen: user pod-based login screen.
-class UserSelectionScreen {
+class UserSelectionScreen : public wm::UserActivityObserver {
public:
UserSelectionScreen();
virtual ~UserSelectionScreen();
void SetHandler(LoginDisplayWebUIHandler* handler);
- void Init(const UserList& users);
+ void Init(const UserList& users, bool show_guest);
const UserList& GetUsers() const;
void OnUserImageChanged(const User& user);
void OnBeforeUserRemoved(const std::string& username);
void OnUserRemoved(const std::string& username);
+ void OnPasswordClearTimerExpired();
+ void SendUserList(bool animated);
+ void HandleGetUsers();
+ void SetAuthType(const std::string& username,
+ ScreenlockBridge::LockHandler::AuthType auth_type);
+ ScreenlockBridge::LockHandler::AuthType GetAuthType(
+ const std::string& username) const;
+
+ // wm::UserActivityDetector implementation:
+ virtual void OnUserActivity(const ui::Event* event) OVERRIDE;
+
+ // Fills |user_dict| with information about |user|.
+ static void FillUserDictionary(
+ User* user,
+ bool is_owner,
+ bool is_signin_to_add,
+ ScreenlockBridge::LockHandler::AuthType auth_type,
+ base::DictionaryValue* user_dict);
+
+ // Determines if user auth status requires online sign in.
+ static bool ShouldForceOnlineSignIn(const User* user);
+
private:
LoginDisplayWebUIHandler* handler_;
// Set of Users that are visible.
UserList users_;
+ // Whether to show guest login.
+ bool show_guest_;
+
+ // Map of usernames to their current authentication type. If a user is not
+ // contained in the map, it is using the default authentication type.
+ std::map<std::string, ScreenlockBridge::LockHandler::AuthType>
+ user_auth_type_map_;
+
+ // Timer for measuring idle state duration before password clear.
+ base::OneShotTimer<UserSelectionScreen> password_clear_timer_;
+
DISALLOW_COPY_AND_ASSIGN(UserSelectionScreen);
};
« no previous file with comments | « chrome/browser/chromeos/login/kiosk_browsertest.cc ('k') | chrome/browser/chromeos/login/screens/user_selection_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698