| 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 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 // SettingsPageUIHandler implementation. | 32 // SettingsPageUIHandler implementation. |
| 33 void RegisterMessages() override; | 33 void RegisterMessages() override; |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 // content::NotificationObserver implementation. | 36 // content::NotificationObserver implementation. |
| 37 void Observe(int type, | 37 void Observe(int type, |
| 38 const content::NotificationSource& source, | 38 const content::NotificationSource& source, |
| 39 const content::NotificationDetails& details) override; | 39 const content::NotificationDetails& details) override; |
| 40 | 40 |
| 41 // Queries the enabled state of the reset-theme control. | 41 // Whether the theme can be reset. |
| 42 base::FundamentalValue QueryResetThemeEnabledState(); | 42 bool ResetThemeEnabled() const; |
| 43 | 43 |
| 44 // Resets the UI theme of the browser to the default theme. | 44 // Resets the UI theme of the browser to the default theme. |
| 45 void ResetTheme(const base::ListValue*); | 45 void ResetTheme(const base::ListValue*); |
| 46 | 46 |
| 47 // Sends the enabled state of the reset-theme control to the JS. | 47 // Sends the enabled state of the reset-theme control to the JS. |
| 48 void GetResetThemeEnabled(const base::ListValue* args); | 48 void GetResetThemeEnabled(const base::ListValue* args); |
| 49 | 49 |
| 50 Profile* profile_; // Weak pointer. | 50 Profile* profile_; // Weak pointer. |
| 51 | 51 |
| 52 // Used to register for relevant notifications. | 52 // Used to register for relevant notifications. |
| 53 content::NotificationRegistrar registrar_; | 53 content::NotificationRegistrar registrar_; |
| 54 | 54 |
| 55 DISALLOW_COPY_AND_ASSIGN(AppearanceHandler); | 55 DISALLOW_COPY_AND_ASSIGN(AppearanceHandler); |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 } // namespace settings | 58 } // namespace settings |
| 59 | 59 |
| 60 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_APPEARANCE_HANDLER_H_ | 60 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_APPEARANCE_HANDLER_H_ |
| OLD | NEW |