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_CONTENT_SETTINGS_CONTENT_SETTINGS_UTILS_H_ | 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_UTILS_H_ |
6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_UTILS_H_ | 6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_UTILS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 namespace content_settings { | 22 namespace content_settings { |
23 | 23 |
24 class ProviderInterface; | 24 class ProviderInterface; |
25 class RuleIterator; | 25 class RuleIterator; |
26 | 26 |
27 typedef std::pair<ContentSettingsPattern, ContentSettingsPattern> PatternPair; | 27 typedef std::pair<ContentSettingsPattern, ContentSettingsPattern> PatternPair; |
28 | 28 |
29 std::string GetTypeName(ContentSettingsType type); | 29 std::string GetTypeName(ContentSettingsType type); |
30 | 30 |
31 // Returns true if the |content_type| supports a resource identifier. | |
32 // Resource identifiers are supported (but not required) for plug-ins. | |
33 bool SupportsResourceIdentifier(ContentSettingsType content_type); | |
34 | |
35 // Maps CONTENT_SETTING_ASK for the CONTENT_SETTINGS_TYPE_PLUGINS to | 31 // Maps CONTENT_SETTING_ASK for the CONTENT_SETTINGS_TYPE_PLUGINS to |
36 // CONTENT_SETTING_BLOCK if click-to-play is not enabled. | 32 // CONTENT_SETTING_BLOCK if click-to-play is not enabled. |
37 ContentSetting ClickToPlayFixup(ContentSettingsType content_type, | 33 ContentSetting ClickToPlayFixup(ContentSettingsType content_type, |
38 ContentSetting setting); | 34 ContentSetting setting); |
39 | 35 |
40 // Converts |Value| to |ContentSetting|. | 36 // Converts |Value| to |ContentSetting|. |
41 ContentSetting ValueToContentSetting(const base::Value* value); | 37 ContentSetting ValueToContentSetting(const base::Value* value); |
42 | 38 |
43 // Converts a |Value| to a |ContentSetting|. Returns true if |value| encodes | 39 // Converts a |Value| to a |ContentSetting|. Returns true if |value| encodes |
44 // a valid content setting, false otherwise. Note that |CONTENT_SETTING_DEFAULT| | 40 // a valid content setting, false otherwise. Note that |CONTENT_SETTING_DEFAULT| |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 bool include_incognito); | 83 bool include_incognito); |
88 | 84 |
89 // Populates |rules| with content setting rules for content types that are | 85 // Populates |rules| with content setting rules for content types that are |
90 // handled by the renderer. | 86 // handled by the renderer. |
91 void GetRendererContentSettingRules(const HostContentSettingsMap* map, | 87 void GetRendererContentSettingRules(const HostContentSettingsMap* map, |
92 RendererContentSettingRules* rules); | 88 RendererContentSettingRules* rules); |
93 | 89 |
94 } // namespace content_settings | 90 } // namespace content_settings |
95 | 91 |
96 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_UTILS_H_ | 92 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_UTILS_H_ |
OLD | NEW |