Standardize usage of virtual/override/final in chrome/browser/ui/
[chromium-blink-merge.git] / chrome / browser / ui / webui / signin / inline_login_handler.h
blob6b7fc689d5dcde45b8f2036a9dad8fd862abf073
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.
5 #ifndef CHROME_BROWSER_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_H_
8 #include "content/public/browser/web_ui_message_handler.h"
10 // The base class handler for the inline login WebUI.
11 class InlineLoginHandler : public content::WebUIMessageHandler {
12 public:
13 InlineLoginHandler();
14 ~InlineLoginHandler() override;
16 // content::WebUIMessageHandler overrides:
17 void RegisterMessages() override;
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 kDesktopAuthMode = 2
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);
36 // JS callback to switch the UI from a constrainted dialog to a full tab.
37 void HandleSwitchToFullTabMessage(const base::ListValue* args);
39 virtual void SetExtraInitParams(base::DictionaryValue& params) {}
40 virtual void CompleteLogin(const base::ListValue* args) = 0;
42 DISALLOW_COPY_AND_ASSIGN(InlineLoginHandler);
45 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_H_