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

Unified Diff: chrome/browser/ui/webui/chromeos/login/login_ui.h

Issue 7382001: [ChromeOS] WebUI OOBE/Login refactoring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync and address comments in set #1 Created 9 years, 5 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/login_ui.h
diff --git a/chrome/browser/ui/webui/chromeos/login/login_ui.h b/chrome/browser/ui/webui/chromeos/login/login_ui.h
index 240bf5d3448ff31b2ae7d1841fa4c2b1b296fad1..1e5be35056dfa2cb8c9a10b21493b8941c7ab2e2 100644
--- a/chrome/browser/ui/webui/chromeos/login/login_ui.h
+++ b/chrome/browser/ui/webui/chromeos/login/login_ui.h
@@ -10,97 +10,13 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/chromeos/login/help_app_launcher.h"
-#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
#include "chrome/browser/ui/webui/chrome_web_ui.h"
+class RefCountedMemory;
class Profile;
namespace chromeos {
-class HTMLOperationsInterface;
-
-// Boilerplate class that is used to associate the LoginUI code with the URL
-// "chrome://login"
-class LoginUIHTMLSource : public ChromeURLDataManager::DataSource {
- public:
- explicit LoginUIHTMLSource(MessageLoop* message_loop);
- virtual ~LoginUIHTMLSource();
-
- virtual void StartDataRequest(const std::string& path,
- bool is_incognito,
- int request_id);
- virtual std::string GetMimeType(const std::string&) const;
-
- private:
- scoped_ptr<HTMLOperationsInterface> html_operations_;
-
- DISALLOW_COPY_AND_ASSIGN(LoginUIHTMLSource);
-};
-
-// An interface between WebUILoginDisplay and LoginUIHandler.
-class BaseLoginUIHandler {
- 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;
-};
-
-class LoginUIHandlerDelegate {
- public:
- LoginUIHandlerDelegate()
- : login_handler_(NULL) { }
-
- // 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 set_login_handler(BaseLoginUIHandler* login_handler);
-
- protected:
- // Reference to the WebUI handling layer for the login screen
- BaseLoginUIHandler* login_handler_;
-
- virtual ~LoginUIHandlerDelegate();
-};
-
-// Main LoginUI handling function. It handles the WebUI hooks that are supplied
-// for the login page to use for authentication.
-class LoginUIHandler : public WebUIMessageHandler,
- public BaseLoginUIHandler {
- public:
- LoginUIHandler();
- virtual ~LoginUIHandler();
-
- // WebUIMessageHandler implementation.
- virtual WebUIMessageHandler* Attach(WebUI* web_ui) OVERRIDE;
- virtual void RegisterMessages() OVERRIDE;
-
- protected:
- LoginUIHandlerDelegate* delegate_;
-
- private:
- // BaseLoginUIHandler implementation.
- virtual void ClearAndEnablePassword() OVERRIDE;
- virtual void ShowError(const std::string& error_text,
- const std::string& help_link_text,
- HelpAppLauncher::HelpTopic help_topic_id) OVERRIDE;
-
- // Callbacks from javascript.
- void HandleGetUsers(const base::ListValue* args);
- void HandleAuthenticateUser(const base::ListValue* args);
- void HandleLaunchIncognito(const base::ListValue* args);
- void HandleShutdownSystem(const base::ListValue* args);
- void HandleRemoveUser(const base::ListValue* args);
-
- DISALLOW_COPY_AND_ASSIGN(LoginUIHandler);
-};
-
// Boilerplate class that is used to associate the LoginUI code with the WebUI
// code.
class LoginUI : public ChromeWebUI {

Powered by Google App Engine
This is Rietveld 408576698