Upstream version 11.40.277.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / webui / signin_internals_ui.h
1 // Copyright (c) 2012 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_INTERNALS_UI_H_
6 #define CHROME_BROWSER_UI_WEBUI_SIGNIN_INTERNALS_UI_H_
7
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/values.h"
11 #include "components/signin/core/browser/about_signin_internals.h"
12 #include "content/public/browser/web_ui_controller.h"
13
14 // The implementation for the chrome://signin-internals page.
15 class SignInInternalsUI : public content::WebUIController,
16                           public AboutSigninInternals::Observer {
17  public:
18   explicit SignInInternalsUI(content::WebUI* web_ui);
19   ~SignInInternalsUI() override;
20
21   // content::WebUIController implementation.
22   bool OverrideHandleWebUIMessage(const GURL& source_url,
23                                   const std::string& name,
24                                   const base::ListValue& args) override;
25
26   // AboutSigninInternals::Observer::OnSigninStateChanged implementation.
27   void OnSigninStateChanged(const base::DictionaryValue* info) override;
28
29   // Notification that the cookie accounts are ready to be displayed.
30   void OnCookieAccountsFetched(const base::DictionaryValue* info) override;
31
32  private:
33   DISALLOW_COPY_AND_ASSIGN(SignInInternalsUI);
34 };
35
36 #endif  // CHROME_BROWSER_UI_WEBUI_SIGNIN_INTERNALS_UI_H_