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

Side by Side 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: rebased 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_H_
7
8 #include "content/public/browser/web_ui_message_handler.h"
9
10 // The base class handler for the inline login WebUI.
11 class InlineLoginHandler : public content::WebUIMessageHandler {
12 public:
13 explicit InlineLoginHandler();
xiyuan 2013/12/18 21:27:59 nit: remove explicit
guohui 2013/12/18 22:39:17 Done.
14 virtual ~InlineLoginHandler();
15
16 // content::WebUIMessageHandler overrides:
17 virtual void RegisterMessages() OVERRIDE;
18
19 protected:
20 // Enum for gaia auth mode, must match AuthMode defined in
21 // chrome/browser/resources/gaia_auth_host/gaia_auth_host.js.
22 enum AuthMode {
23 kDefaultAuthMode = 0,
24 kOfflineAuthMode = 1,
25 kInlineAuthMode = 2
26 };
27
28 private:
29 // JS callback to initialize the gaia auth extension. It calls
30 // |SetExtraInitParams| to set extra init params.
31 void HandleInitializeMessage(const base::ListValue* args);
32 // JS callback to complete login. It calls |CompleteLogin| to do the real
33 // work.
34 void HandleCompleteLoginMessage(const base::ListValue* args);
35
36 virtual void SetExtraInitParams(base::DictionaryValue& params) {}
37 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
38
39 DISALLOW_COPY_AND_ASSIGN(InlineLoginHandler);
40 };
41
42 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698