Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / ui / webui / settings / appearance_handler.h
blob56161bd27d742dec65add96fffaebf81ff34106e
1 // Copyright (c) 2015 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_SETTINGS_APPEARANCE_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_APPEARANCE_HANDLER_H_
8 #include "base/macros.h"
9 #include "chrome/browser/ui/webui/settings/md_settings_ui.h"
10 #include "content/public/browser/notification_observer.h"
11 #include "content/public/browser/notification_registrar.h"
13 namespace base {
14 class ListValue;
17 namespace content {
18 class WebUI;
21 class Profile;
23 namespace settings {
25 // Chrome "Appearance" settings page UI handler.
26 class AppearanceHandler : public SettingsPageUIHandler,
27 public content::NotificationObserver {
28 public:
29 explicit AppearanceHandler(content::WebUI* webui);
30 ~AppearanceHandler() override;
32 // SettingsPageUIHandler implementation.
33 void RegisterMessages() override;
35 private:
36 // content::NotificationObserver implementation.
37 void Observe(int type,
38 const content::NotificationSource& source,
39 const content::NotificationDetails& details) override;
41 // Queries the enabled state of the reset-theme control.
42 base::FundamentalValue QueryResetThemeEnabledState();
44 // Resets the UI theme of the browser to the default theme.
45 void ResetTheme(const base::ListValue*);
47 // Sends the enabled state of the reset-theme control to the JS.
48 void GetResetThemeEnabled(const base::ListValue* args);
50 Profile* profile_; // Weak pointer.
52 // Used to register for relevant notifications.
53 content::NotificationRegistrar registrar_;
55 DISALLOW_COPY_AND_ASSIGN(AppearanceHandler);
58 } // namespace settings
60 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_APPEARANCE_HANDLER_H_