Chromium Code Reviews| 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..1319e3327438d24f1d531e7b55ca31cc392f877e |
| --- /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: |
| + explicit InlineLoginHandler(); |
|
xiyuan
2013/12/18 21:27:59
nit: remove explicit
guohui
2013/12/18 22:39:17
Done.
|
| + 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; |
|
xiyuan
2013/12/18 21:27:59
Should these "virtuals" in public/protected sectio
guohui
2013/12/18 22:39:17
a virtual method can be overriden by subclasses, e
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(InlineLoginHandler); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_H_ |