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 CookieSettings; |
16 class HostContentSettingsMap; | 17 class HostContentSettingsMap; |
17 class ProtocolHandlerRegistry; | 18 class ProtocolHandlerRegistry; |
18 | 19 |
19 class ContentSettingsHandler : public OptionsPageUIHandler { | 20 class ContentSettingsHandler : public OptionsPageUIHandler { |
20 public: | 21 public: |
21 ContentSettingsHandler(); | 22 ContentSettingsHandler(); |
22 virtual ~ContentSettingsHandler(); | 23 virtual ~ContentSettingsHandler(); |
23 | 24 |
24 // OptionsPageUIHandler implementation. | 25 // OptionsPageUIHandler implementation. |
25 virtual void GetLocalizedValues(DictionaryValue* localized_strings); | 26 virtual void GetLocalizedValues(DictionaryValue* localized_strings); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 88 |
88 // Utility functions --------------------------------------------------------- | 89 // Utility functions --------------------------------------------------------- |
89 | 90 |
90 // Gets the HostContentSettingsMap for the normal profile. | 91 // Gets the HostContentSettingsMap for the normal profile. |
91 HostContentSettingsMap* GetContentSettingsMap(); | 92 HostContentSettingsMap* GetContentSettingsMap(); |
92 | 93 |
93 // Gets the HostContentSettingsMap for the incognito profile, or NULL if there | 94 // Gets the HostContentSettingsMap for the incognito profile, or NULL if there |
94 // is no active incognito session. | 95 // is no active incognito session. |
95 HostContentSettingsMap* GetOTRContentSettingsMap(); | 96 HostContentSettingsMap* GetOTRContentSettingsMap(); |
96 | 97 |
| 98 // Gets the |CookieSettings| for the normal profile. |
| 99 CookieSettings* GetCookieSettings(); |
| 100 |
| 101 // Gets the |CookieSettings| for the incognito profile, or NULL if there is no |
| 102 // active incognito session. |
| 103 CookieSettings* GetOTRCookieSettings(); |
| 104 |
97 // Gets the default setting in string form. If |provider_id| is not NULL, the | 105 // Gets the default setting in string form. If |provider_id| is not NULL, the |
98 // id of the provider which provided the default setting is assigned to it. | 106 // id of the provider which provided the default setting is assigned to it. |
99 std::string GetSettingDefaultFromModel(ContentSettingsType type, | 107 std::string GetSettingDefaultFromModel(ContentSettingsType type, |
100 std::string* provider_id); | 108 std::string* provider_id); |
101 | 109 |
102 // Gets the ProtocolHandlerRegistry for the normal profile. | 110 // Gets the ProtocolHandlerRegistry for the normal profile. |
103 ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); | 111 ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); |
104 | 112 |
105 // Member variables --------------------------------------------------------- | 113 // Member variables --------------------------------------------------------- |
106 | 114 |
107 content::NotificationRegistrar notification_registrar_; | 115 content::NotificationRegistrar notification_registrar_; |
108 PrefChangeRegistrar pref_change_registrar_; | 116 PrefChangeRegistrar pref_change_registrar_; |
109 | 117 |
110 DISALLOW_COPY_AND_ASSIGN(ContentSettingsHandler); | 118 DISALLOW_COPY_AND_ASSIGN(ContentSettingsHandler); |
111 }; | 119 }; |
112 | 120 |
113 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CONTENT_SETTINGS_HANDLER_H_ | 121 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CONTENT_SETTINGS_HANDLER_H_ |
OLD | NEW |