| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_APPEARANCE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_APPEARANCE_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_APPEARANCE_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_APPEARANCE_HANDLER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h" | 9 #include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h" |
| 10 #include "content/public/browser/notification_observer.h" | 10 #include "content/public/browser/notification_observer.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 // Chrome "Appearance" settings page UI handler. | 25 // Chrome "Appearance" settings page UI handler. |
| 26 class AppearanceHandler : public SettingsPageUIHandler, | 26 class AppearanceHandler : public SettingsPageUIHandler, |
| 27 public content::NotificationObserver { | 27 public content::NotificationObserver { |
| 28 public: | 28 public: |
| 29 explicit AppearanceHandler(content::WebUI* webui); | 29 explicit AppearanceHandler(content::WebUI* webui); |
| 30 ~AppearanceHandler() override; | 30 ~AppearanceHandler() override; |
| 31 | 31 |
| 32 // SettingsPageUIHandler implementation. | 32 // SettingsPageUIHandler implementation. |
| 33 void RegisterMessages() override; | 33 void RegisterMessages() override; |
| 34 void OnJavascriptAllowed() override; |
| 35 void OnJavascriptDisallowed() override; |
| 34 | 36 |
| 35 private: | 37 private: |
| 36 // content::NotificationObserver implementation. | 38 // content::NotificationObserver implementation. |
| 37 void Observe(int type, | 39 void Observe(int type, |
| 38 const content::NotificationSource& source, | 40 const content::NotificationSource& source, |
| 39 const content::NotificationDetails& details) override; | 41 const content::NotificationDetails& details) override; |
| 40 | 42 |
| 41 // Whether the theme can be reset. | 43 // Whether the theme can be reset. |
| 42 bool ResetThemeEnabled() const; | 44 bool ResetThemeEnabled() const; |
| 43 | 45 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 56 | 58 |
| 57 // Used to register for relevant notifications. | 59 // Used to register for relevant notifications. |
| 58 content::NotificationRegistrar registrar_; | 60 content::NotificationRegistrar registrar_; |
| 59 | 61 |
| 60 DISALLOW_COPY_AND_ASSIGN(AppearanceHandler); | 62 DISALLOW_COPY_AND_ASSIGN(AppearanceHandler); |
| 61 }; | 63 }; |
| 62 | 64 |
| 63 } // namespace settings | 65 } // namespace settings |
| 64 | 66 |
| 65 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_APPEARANCE_HANDLER_H_ | 67 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_APPEARANCE_HANDLER_H_ |
| OLD | NEW |