| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_OPTIONS_CORE_OPTIONS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CORE_OPTIONS_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CORE_OPTIONS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CORE_OPTIONS_HANDLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/values.h" | 12 #include "base/values.h" |
| 13 #include "chrome/browser/plugin_data_remover_helper.h" | 13 #include "chrome/browser/plugin_data_remover_helper.h" |
| 14 #include "chrome/browser/prefs/pref_change_registrar.h" | 14 #include "chrome/browser/prefs/pref_change_registrar.h" |
| 15 #include "chrome/browser/prefs/pref_service.h" | 15 #include "chrome/browser/prefs/pref_service.h" |
| 16 #include "chrome/browser/ui/webui/options/options_ui.h" | 16 #include "chrome/browser/ui/webui/options/options_ui.h" |
| 17 | 17 |
| 18 // Core options UI handler. | 18 // Core options UI handler. |
| 19 // Handles resource and JS calls common to all options sub-pages. | 19 // Handles resource and JS calls common to all options sub-pages. |
| 20 class CoreOptionsHandler : public OptionsPageUIHandler { | 20 class CoreOptionsHandler : public OptionsPageUIHandler { |
| 21 public: | 21 public: |
| 22 CoreOptionsHandler(); | 22 CoreOptionsHandler(); |
| 23 virtual ~CoreOptionsHandler(); | 23 virtual ~CoreOptionsHandler(); |
| 24 | 24 |
| 25 // OptionsPageUIHandler implementation. | 25 // OptionsPageUIHandler implementation. |
| 26 virtual void Initialize(); | 26 virtual void Initialize() OVERRIDE; |
| 27 virtual void GetLocalizedValues(DictionaryValue* localized_strings); | 27 virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE; |
| 28 virtual void Uninitialize(); | 28 virtual void Uninitialize() OVERRIDE; |
| 29 | 29 |
| 30 // content::NotificationObserver implementation. | 30 // content::NotificationObserver implementation. |
| 31 virtual void Observe(int type, | 31 virtual void Observe(int type, |
| 32 const content::NotificationSource& source, | 32 const content::NotificationSource& source, |
| 33 const content::NotificationDetails& details); | 33 const content::NotificationDetails& details) OVERRIDE; |
| 34 | 34 |
| 35 // WebUIMessageHandler implementation. | 35 // WebUIMessageHandler implementation. |
| 36 virtual void RegisterMessages(); | 36 virtual void RegisterMessages() OVERRIDE; |
| 37 virtual WebUIMessageHandler* Attach(WebUI* web_ui); | 37 virtual WebUIMessageHandler* Attach(WebUI* web_ui) OVERRIDE; |
| 38 | 38 |
| 39 void set_handlers_host(OptionsPageUIHandlerHost* handlers_host) { | 39 void set_handlers_host(OptionsPageUIHandlerHost* handlers_host) { |
| 40 handlers_host_ = handlers_host; | 40 handlers_host_ = handlers_host; |
| 41 } | 41 } |
| 42 | 42 |
| 43 // Adds localized strings to |localized_strings|. | 43 // Adds localized strings to |localized_strings|. |
| 44 static void GetStaticLocalizedValues( | 44 static void GetStaticLocalizedValues( |
| 45 base::DictionaryValue* localized_strings); | 45 base::DictionaryValue* localized_strings); |
| 46 | 46 |
| 47 protected: | 47 protected: |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 PrefChangeRegistrar registrar_; | 142 PrefChangeRegistrar registrar_; |
| 143 | 143 |
| 144 // Used for asynchronously updating the preference stating whether clearing | 144 // Used for asynchronously updating the preference stating whether clearing |
| 145 // LSO data is supported. | 145 // LSO data is supported. |
| 146 PluginDataRemoverHelper clear_plugin_lso_data_enabled_; | 146 PluginDataRemoverHelper clear_plugin_lso_data_enabled_; |
| 147 | 147 |
| 148 DISALLOW_COPY_AND_ASSIGN(CoreOptionsHandler); | 148 DISALLOW_COPY_AND_ASSIGN(CoreOptionsHandler); |
| 149 }; | 149 }; |
| 150 | 150 |
| 151 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CORE_OPTIONS_HANDLER_H_ | 151 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CORE_OPTIONS_HANDLER_H_ |
| OLD | NEW |