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

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: 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 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 9a5c35dee196272be5af0162eeb2e4d663caaee2..1a9dd0395045b18c4b56da3ce5879b97e01e758e 100644
--- a/chrome/browser/chromeos/login/screens/user_selection_screen.h
+++ b/chrome/browser/chromeos/login/screens/user_selection_screen.h
@@ -5,25 +5,29 @@
#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 "chrome/browser/chromeos/login/ui/login_display.h"
#include "chrome/browser/chromeos/login/users/user.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);
@@ -33,12 +37,43 @@ class UserSelectionScreen {
const base::Closure& click_callback);
void HideUserPodButton(const std::string& username);
+ void OnPasswordClearTimerExpired();
+ void SendUserList(bool animated);
+ void SetAuthType(const std::string& user_id,
+ LoginDisplay::AuthType auth_type,
+ const std::string& initial_value);
+ LoginDisplay::AuthType GetAuthType(const std::string& user_id) const;
+ void HandleCustomButtonClicked(const std::string& user_id);
+ void HandleGetUsers();
+
+ // wm::UserActivityDetector implementation:
+ virtual void OnUserActivity(const ui::Event* event) OVERRIDE;
+
+ static void FillUserDictionary(User* user,
+ bool is_owner,
+ bool is_signin_to_add,
+ LoginDisplay::AuthType auth_type,
+ base::DictionaryValue* user_dict);
+ static bool ShouldForceOnlineSignIn(const User* user);
+
private:
LoginDisplayWebUIHandler* handler_;
// Set of Users that are visible.
UserList users_;
+ bool show_guest_;
Nikita (slow) 2014/05/23 15:52:15 nit: Copy comment as well.
Denis Kuznetsov (DE-MUC) 2014/05/27 17:35:28 Done.
+
+ // Map of callbacks run when the custom button on a user pod is clicked.
+ std::map<std::string, base::Closure> user_pod_button_callback_map_;
+
+ // 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, LoginDisplay::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);
};

Powered by Google App Engine
This is Rietveld 408576698