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/common/notification_observer.h" | 13 #include "content/common/notification_observer.h" |
14 #include "content/common/notification_registrar.h" | 14 #include "content/common/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. | 105 // Gets the default setting in string form. |
98 std::string GetSettingDefaultFromModel(ContentSettingsType type); | 106 std::string GetSettingDefaultFromModel(ContentSettingsType type); |
99 | 107 |
100 // Returns true if the default setting for the given content settings type | 108 // Returns true if the default setting for the given content settings type |
101 // |type| is managed. | 109 // |type| is managed. |
102 bool GetDefaultSettingManagedFromModel(ContentSettingsType type); | 110 bool GetDefaultSettingManagedFromModel(ContentSettingsType type); |
103 | 111 |
104 // Gets the ProtocolHandlerRegistry for the normal profile. | 112 // Gets the ProtocolHandlerRegistry for the normal profile. |
105 ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); | 113 ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); |
106 | 114 |
107 // Member variables --------------------------------------------------------- | 115 // Member variables --------------------------------------------------------- |
108 | 116 |
109 NotificationRegistrar notification_registrar_; | 117 NotificationRegistrar notification_registrar_; |
110 PrefChangeRegistrar pref_change_registrar_; | 118 PrefChangeRegistrar pref_change_registrar_; |
111 | 119 |
112 DISALLOW_COPY_AND_ASSIGN(ContentSettingsHandler); | 120 DISALLOW_COPY_AND_ASSIGN(ContentSettingsHandler); |
113 }; | 121 }; |
114 | 122 |
115 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CONTENT_SETTINGS_HANDLER_H_ | 123 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CONTENT_SETTINGS_HANDLER_H_ |
OLD | NEW |