| 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 // Interface for objects providing content setting rules. | 5 // Interface for objects providing content setting rules. |
| 6 | 6 |
| 7 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_ | 7 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_ |
| 8 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_ | 8 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_ |
| 9 #pragma once | 9 #pragma once |
| 10 | 10 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 virtual void SetContentSetting( | 91 virtual void SetContentSetting( |
| 92 const ContentSettingsPattern& requesting_url_pattern, | 92 const ContentSettingsPattern& requesting_url_pattern, |
| 93 const ContentSettingsPattern& embedding_url_pattern, | 93 const ContentSettingsPattern& embedding_url_pattern, |
| 94 ContentSettingsType content_type, | 94 ContentSettingsType content_type, |
| 95 const ResourceIdentifier& resource_identifier, | 95 const ResourceIdentifier& resource_identifier, |
| 96 ContentSetting content_setting) = 0; | 96 ContentSetting content_setting) = 0; |
| 97 | 97 |
| 98 // For a given content type, returns all content setting rules with a | 98 // For a given content type, returns all content setting rules with a |
| 99 // non-default setting, mapped to their actual settings. | 99 // non-default setting, mapped to their actual settings. |
| 100 // |content_settings_rules| must be non-NULL. If this provider was created for | 100 // |content_settings_rules| must be non-NULL. If this provider was created for |
| 101 // the off-the-record profile, it will only return those settings differing | 101 // the incognito profile, it will only return those settings differing |
| 102 // from the corresponding regular provider. For ContentSettingsTypes that | 102 // from the corresponding regular provider. For ContentSettingsTypes that |
| 103 // require a resource identifier to be specified, the |resource_identifier| | 103 // require a resource identifier to be specified, the |resource_identifier| |
| 104 // must be non-empty. | 104 // must be non-empty. |
| 105 // | 105 // |
| 106 // This may be called on any thread. | 106 // This may be called on any thread. |
| 107 virtual void GetAllContentSettingsRules( | 107 virtual void GetAllContentSettingsRules( |
| 108 ContentSettingsType content_type, | 108 ContentSettingsType content_type, |
| 109 const ResourceIdentifier& resource_identifier, | 109 const ResourceIdentifier& resource_identifier, |
| 110 Rules* content_setting_rules) const = 0; | 110 Rules* content_setting_rules) const = 0; |
| 111 | 111 |
| 112 // Resets all content settings for the given |content_type| to | 112 // Resets all content settings for the given |content_type| to |
| 113 // CONTENT_SETTING_DEFAULT. For content types that require a resource | 113 // CONTENT_SETTING_DEFAULT. For content types that require a resource |
| 114 // identifier all content settings for any resource identifieres of the given | 114 // identifier all content settings for any resource identifieres of the given |
| 115 // |content_type| will be reset to CONTENT_SETTING_DEFAULT. | 115 // |content_type| will be reset to CONTENT_SETTING_DEFAULT. |
| 116 // | 116 // |
| 117 // This should only be called on the UI thread. | 117 // This should only be called on the UI thread. |
| 118 virtual void ClearAllContentSettingsRules( | 118 virtual void ClearAllContentSettingsRules( |
| 119 ContentSettingsType content_type) = 0; | 119 ContentSettingsType content_type) = 0; |
| 120 | 120 |
| 121 // Resets all content settings to CONTENT_SETTINGS_DEFAULT. | 121 // Resets all content settings to CONTENT_SETTINGS_DEFAULT. |
| 122 // | 122 // |
| 123 // This should only be called on the UI thread. | 123 // This should only be called on the UI thread. |
| 124 virtual void ResetToDefaults() = 0; | 124 virtual void ResetToDefaults() = 0; |
| 125 }; | 125 }; |
| 126 | 126 |
| 127 } // namespace content_settings | 127 } // namespace content_settings |
| 128 | 128 |
| 129 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_ | 129 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_ |
| OLD | NEW |