| 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_CONTENT_SETTINGS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CONTENT_SETTINGS_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CONTENT_SETTINGS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CONTENT_SETTINGS_HANDLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/plugin_data_remover_helper.h" | 9 #include "chrome/browser/plugin_data_remover_helper.h" |
| 10 #include "chrome/browser/prefs/pref_change_registrar.h" | 10 #include "chrome/browser/prefs/pref_change_registrar.h" |
| 11 #include "chrome/browser/ui/webui/options/options_ui.h" | 11 #include "chrome/browser/ui/webui/options/options_ui.h" |
| 12 #include "chrome/common/content_settings_types.h" | 12 #include "chrome/common/content_settings_types.h" |
| 13 #include "content/public/browser/notification_observer.h" | 13 #include "content/public/browser/notification_observer.h" |
| 14 #include "content/public/browser/notification_registrar.h" | 14 #include "content/public/browser/notification_registrar.h" |
| 15 | 15 |
| 16 class HostContentSettingsMap; | 16 class HostContentSettingsMap; |
| 17 class ProtocolHandlerRegistry; | 17 class ProtocolHandlerRegistry; |
| 18 | 18 |
| 19 class ContentSettingsHandler : public OptionsPageUIHandler { | 19 class ContentSettingsHandler : public OptionsPageUIHandler { |
| 20 public: | 20 public: |
| 21 ContentSettingsHandler(); | 21 ContentSettingsHandler(); |
| 22 virtual ~ContentSettingsHandler(); | 22 virtual ~ContentSettingsHandler(); |
| 23 | 23 |
| 24 // OptionsPageUIHandler implementation. | 24 // OptionsPageUIHandler implementation. |
| 25 virtual void GetLocalizedValues(DictionaryValue* localized_strings); | 25 virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE; |
| 26 | 26 |
| 27 virtual void Initialize(); | 27 virtual void Initialize() OVERRIDE; |
| 28 | 28 |
| 29 virtual void RegisterMessages(); | 29 virtual void RegisterMessages() OVERRIDE; |
| 30 | 30 |
| 31 // content::NotificationObserver implementation. | 31 // content::NotificationObserver implementation. |
| 32 virtual void Observe(int type, | 32 virtual void Observe(int type, |
| 33 const content::NotificationSource& source, | 33 const content::NotificationSource& source, |
| 34 const content::NotificationDetails& details); | 34 const content::NotificationDetails& details) OVERRIDE; |
| 35 | 35 |
| 36 // Gets a string identifier for the group name, for use in HTML. | 36 // Gets a string identifier for the group name, for use in HTML. |
| 37 static std::string ContentSettingsTypeToGroupName(ContentSettingsType type); | 37 static std::string ContentSettingsTypeToGroupName(ContentSettingsType type); |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 // Functions that call into the page ----------------------------------------- | 40 // Functions that call into the page ----------------------------------------- |
| 41 | 41 |
| 42 // Updates the page with the default settings (allow, ask, block, etc.) | 42 // Updates the page with the default settings (allow, ask, block, etc.) |
| 43 void UpdateSettingDefaultFromModel(ContentSettingsType type); | 43 void UpdateSettingDefaultFromModel(ContentSettingsType type); |
| 44 | 44 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 104 |
| 105 // Member variables --------------------------------------------------------- | 105 // Member variables --------------------------------------------------------- |
| 106 | 106 |
| 107 content::NotificationRegistrar notification_registrar_; | 107 content::NotificationRegistrar notification_registrar_; |
| 108 PrefChangeRegistrar pref_change_registrar_; | 108 PrefChangeRegistrar pref_change_registrar_; |
| 109 | 109 |
| 110 DISALLOW_COPY_AND_ASSIGN(ContentSettingsHandler); | 110 DISALLOW_COPY_AND_ASSIGN(ContentSettingsHandler); |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CONTENT_SETTINGS_HANDLER_H_ | 113 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CONTENT_SETTINGS_HANDLER_H_ |
| OLD | NEW |