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

Unified Diff: chrome/browser/ui/webui/chromeos/login/signin_screen_handler.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/ui/webui/chromeos/login/signin_screen_handler.h
diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h
index e8ef60d1ceb13bb14aa4df9777a12209d54cece8..81bc7ddfdfce56f7a0e573851df71a4c810eacfc 100644
--- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h
+++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h
@@ -76,14 +76,12 @@ class LoginDisplayWebUIHandler {
virtual void ResetSigninScreenHandlerDelegate() = 0;
virtual void ShowBannerMessage(const std::string& message) = 0;
virtual void ShowUserPodButton(const std::string& username,
- const std::string& iconURL,
- const base::Closure& click_callback) = 0;
+ const std::string& iconURL) = 0;
+ virtual void ShowEasyUnlockBubble() = 0;
virtual void HideUserPodButton(const std::string& username) = 0;
virtual void SetAuthType(const std::string& username,
LoginDisplay::AuthType auth_type,
const std::string& initial_value) = 0;
- virtual LoginDisplay::AuthType GetAuthType(const std::string& username)
- const = 0;
virtual void ShowError(int login_attempts,
const std::string& error_text,
const std::string& help_link_text,
@@ -96,6 +94,10 @@ class LoginDisplayWebUIHandler {
// Show sign-in screen for the given credentials.
virtual void ShowSigninScreenForCreds(const std::string& username,
const std::string& password) = 0;
+ virtual void LoadUsers(const base::ListValue& users_list,
+ bool animated,
+ bool show_guest) = 0;
+
protected:
virtual ~LoginDisplayWebUIHandler() {}
};
@@ -174,9 +176,6 @@ class SigninScreenHandlerDelegate {
// Public sessions are always shown.
virtual bool IsShowUsers() const = 0;
- // Whether new user pod is available.
- virtual bool IsShowNewUser() const = 0;
-
// Returns true if sign in is in progress.
virtual bool IsSigninInProgress() const = 0;
@@ -194,6 +193,12 @@ class SigninScreenHandlerDelegate {
virtual void LoginAsKioskApp(const std::string& app_id,
bool diagnostic_mode) = 0;
+ // User have clicked the custom unlock button.
+ virtual void HandleCustomButtonClicked(const std::string& user_id) = 0;
+
+ // Request to (re)load user list.
+ virtual void HandleGetUsers() = 0;
+
protected:
virtual ~SigninScreenHandlerDelegate() {}
};
@@ -280,14 +285,12 @@ class SigninScreenHandler
virtual void ResetSigninScreenHandlerDelegate() OVERRIDE;
virtual void ShowBannerMessage(const std::string& message) OVERRIDE;
virtual void ShowUserPodButton(const std::string& username,
- const std::string& iconURL,
- const base::Closure& click_callback) OVERRIDE;
+ const std::string& iconURL) OVERRIDE;
+ virtual void ShowEasyUnlockBubble() OVERRIDE;
virtual void HideUserPodButton(const std::string& username) OVERRIDE;
virtual void SetAuthType(const std::string& username,
LoginDisplay::AuthType auth_type,
const std::string& initial_value) OVERRIDE;
- virtual LoginDisplay::AuthType GetAuthType(const std::string& username)
- const OVERRIDE;
virtual void ShowError(int login_attempts,
const std::string& error_text,
const std::string& help_link_text,
@@ -299,6 +302,9 @@ class SigninScreenHandler
virtual void ShowErrorScreen(LoginDisplay::SigninError error_id) OVERRIDE;
virtual void ShowSigninScreenForCreds(const std::string& username,
const std::string& password) OVERRIDE;
+ virtual void LoadUsers(const base::ListValue& users_list,
+ bool animated,
+ bool show_guest) OVERRIDE;
// ui::EventHandler implementation:
virtual void OnKeyEvent(ui::KeyEvent* key) OVERRIDE;
@@ -381,8 +387,6 @@ class SigninScreenHandler
LoginDisplay::AuthType auth_type,
base::DictionaryValue* user_dict);
- // Sends user list to account picker.
- void SendUserList(bool animated);
// Kick off cookie / local storage cleanup.
void StartClearingCookies(const base::Closure& on_clear_callback);
@@ -531,12 +535,6 @@ class SigninScreenHandler
base::Closure kiosk_enable_flow_aborted_callback_for_test_;
- // 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_;
// Non-owning ptr.
// TODO (ygorshenin@): remove this dependency.

Powered by Google App Engine
This is Rietveld 408576698