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

Unified Diff: chrome/browser/ui/webui/signin/inline_login_handler.h

Issue 118343003: Refactor inline_login_ui (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
« no previous file with comments | « chrome/browser/ui/webui/signin/OWNERS ('k') | chrome/browser/ui/webui/signin/inline_login_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/signin/inline_login_handler.h
diff --git a/chrome/browser/ui/webui/signin/inline_login_handler.h b/chrome/browser/ui/webui/signin/inline_login_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..b3650fb6a195efc8111bdad7a44e2a9ce3cc04e6
--- /dev/null
+++ b/chrome/browser/ui/webui/signin/inline_login_handler.h
@@ -0,0 +1,42 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_H_
+#define CHROME_BROWSER_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_H_
+
+#include "content/public/browser/web_ui_message_handler.h"
+
+// The base class handler for the inline login WebUI.
+class InlineLoginHandler : public content::WebUIMessageHandler {
+ public:
+ InlineLoginHandler();
+ virtual ~InlineLoginHandler();
+
+ // content::WebUIMessageHandler overrides:
+ virtual void RegisterMessages() OVERRIDE;
+
+ protected:
+ // Enum for gaia auth mode, must match AuthMode defined in
+ // chrome/browser/resources/gaia_auth_host/gaia_auth_host.js.
+ enum AuthMode {
+ kDefaultAuthMode = 0,
+ kOfflineAuthMode = 1,
+ kInlineAuthMode = 2
+ };
+
+ private:
+ // JS callback to initialize the gaia auth extension. It calls
+ // |SetExtraInitParams| to set extra init params.
+ void HandleInitializeMessage(const base::ListValue* args);
+ // JS callback to complete login. It calls |CompleteLogin| to do the real
+ // work.
+ void HandleCompleteLoginMessage(const base::ListValue* args);
+
+ virtual void SetExtraInitParams(base::DictionaryValue& params) {}
+ virtual void CompleteLogin(const base::ListValue* args) = 0;
+
+ DISALLOW_COPY_AND_ASSIGN(InlineLoginHandler);
+};
+
+#endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_H_
« no previous file with comments | « chrome/browser/ui/webui/signin/OWNERS ('k') | chrome/browser/ui/webui/signin/inline_login_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698