| 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 0766f24670d9671c0695c4a854fb617281707e08..2af4979adfdf872173d79a2f5e1fbe8f9c8c5a6f 100644
|
| --- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h
|
| +++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h
|
| @@ -7,7 +7,7 @@
|
| #pragma once
|
|
|
| #include "chrome/browser/ui/webui/chromeos/login/login_ui.h"
|
| -#include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
|
| +#include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h"
|
| #include "content/browser/webui/web_ui.h"
|
|
|
| namespace base {
|
| @@ -17,9 +17,39 @@ class ListValue;
|
|
|
| namespace chromeos {
|
|
|
| -// Signin screen handler.
|
| -class SigninScreenHandler : public OobeMessageHandler,
|
| - public BaseLoginUIHandler {
|
| +// An interface for WebUILoginDisplay to call SigninScreenHandler.
|
| +class LoginDisplayWebUIHandler {
|
| + public:
|
| + virtual void ClearAndEnablePassword() = 0;
|
| + virtual void ShowError(const std::string& error_text,
|
| + const std::string& help_link_text,
|
| + HelpAppLauncher::HelpTopic help_topic_id) = 0;
|
| +};
|
| +
|
| +// An interface for SigninScreenHandler to call WebUILoginDisplay.
|
| +class SigninScreenHandlerDelegate {
|
| + public:
|
| + // Confirms sign up by provided |username| and |password| specified.
|
| + // Used for new user login via GAIA extension.
|
| + virtual void CompleteLogin(const std::string& username,
|
| + const std::string& password) = 0;
|
| +
|
| + // Sign in using |username| and |password| specified.
|
| + // Used for both known and new users.
|
| + virtual void Login(const std::string& username,
|
| + const std::string& password) = 0;
|
| +
|
| + // Sign in into Guest session.
|
| + virtual void LoginAsGuest() = 0;
|
| +
|
| + // Let the delegate know about the handler it is supposed to be using.
|
| + virtual void SetWebUIHandler(LoginDisplayWebUIHandler* webui_handler) = 0;
|
| +};
|
| +
|
| +// A class that handles the WebUI hooks in sign-in screen in OobeDisplay
|
| +// and LoginDisplay.
|
| +class SigninScreenHandler : public BaseScreenHandler,
|
| + public LoginDisplayWebUIHandler {
|
| public:
|
| SigninScreenHandler();
|
|
|
| @@ -27,7 +57,7 @@ class SigninScreenHandler : public OobeMessageHandler,
|
| void Show();
|
|
|
| private:
|
| - // OobeMessageHandler implementation:
|
| + // BaseScreenHandler implementation:
|
| virtual void GetLocalizedStrings(
|
| base::DictionaryValue* localized_strings) OVERRIDE;
|
| virtual void Initialize() OVERRIDE;
|
| @@ -44,13 +74,26 @@ class SigninScreenHandler : public OobeMessageHandler,
|
| // Handles confirmation message of user authentication that was performed by
|
| // the authentication extension.
|
| void HandleCompleteLogin(const base::ListValue* args);
|
| - // Handles authenticate user request from javascript.
|
| +
|
| + // Handles get existing user list request when populating account picker.
|
| + void HandleGetUsers(const base::ListValue* args);
|
| +
|
| + // Handles authentication request when signing in an existing user.
|
| void HandleAuthenticateUser(const base::ListValue* args);
|
|
|
| + // Handles entering bwsi mode request.
|
| + void HandleLaunchIncognito(const base::ListValue* args);
|
| +
|
| + // Handles system shutdown request.
|
| + void HandleShutdownSystem(const base::ListValue* args);
|
| +
|
| + // Handles remove user request.
|
| + void HandleRemoveUser(const base::ListValue* args);
|
| +
|
| // A delegate that glues this handler with backend LoginDisplay.
|
| - LoginUIHandlerDelegate* delegate_;
|
| + SigninScreenHandlerDelegate* delegate_;
|
|
|
| - // Keeps whether screen should be shown right after initialization.
|
| + // Whether screen should be shown right after initialization.
|
| bool show_on_init_;
|
|
|
| // True if new user sign in flow is driven by the extension.
|
|
|