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_COMMON_CONTENT_SETTINGS_H_ | 5 #ifndef CHROME_COMMON_CONTENT_SETTINGS_H_ |
6 #define CHROME_COMMON_CONTENT_SETTINGS_H_ | 6 #define CHROME_COMMON_CONTENT_SETTINGS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 std::string source; | 39 std::string source; |
40 bool incognito; | 40 bool incognito; |
41 }; | 41 }; |
42 | 42 |
43 typedef std::vector<ContentSettingPatternSource> ContentSettingsForOneType; | 43 typedef std::vector<ContentSettingPatternSource> ContentSettingsForOneType; |
44 | 44 |
45 struct RendererContentSettingRules { | 45 struct RendererContentSettingRules { |
46 RendererContentSettingRules(); | 46 RendererContentSettingRules(); |
47 ~RendererContentSettingRules(); | 47 ~RendererContentSettingRules(); |
48 ContentSettingsForOneType image_rules; | 48 ContentSettingsForOneType image_rules; |
| 49 ContentSettingsForOneType media_rules; |
49 ContentSettingsForOneType script_rules; | 50 ContentSettingsForOneType script_rules; |
50 }; | 51 }; |
51 | 52 |
52 namespace content_settings { | 53 namespace content_settings { |
53 | 54 |
54 // Enum containing the various source for content settings. Settings can be | 55 // Enum containing the various source for content settings. Settings can be |
55 // set by policy, extension or the user. Certain (internal) schemes are | 56 // set by policy, extension or the user. Certain (internal) schemes are |
56 // whilelisted. For whilelisted schemes the source is | 57 // whilelisted. For whilelisted schemes the source is |
57 // |SETTING_SOURCE_WHITELIST|. | 58 // |SETTING_SOURCE_WHITELIST|. |
58 enum SettingSource { | 59 enum SettingSource { |
59 SETTING_SOURCE_NONE, | 60 SETTING_SOURCE_NONE, |
60 SETTING_SOURCE_POLICY, | 61 SETTING_SOURCE_POLICY, |
61 SETTING_SOURCE_EXTENSION, | 62 SETTING_SOURCE_EXTENSION, |
62 SETTING_SOURCE_USER, | 63 SETTING_SOURCE_USER, |
63 SETTING_SOURCE_WHITELIST, | 64 SETTING_SOURCE_WHITELIST, |
64 }; | 65 }; |
65 | 66 |
66 // |SettingInfo| provides meta data for content setting values. |source| | 67 // |SettingInfo| provides meta data for content setting values. |source| |
67 // contains the source of a value. |primary_pattern| and |secondary_pattern| | 68 // contains the source of a value. |primary_pattern| and |secondary_pattern| |
68 // contains the patterns of the appling rule. | 69 // contains the patterns of the appling rule. |
69 struct SettingInfo { | 70 struct SettingInfo { |
70 SettingSource source; | 71 SettingSource source; |
71 ContentSettingsPattern primary_pattern; | 72 ContentSettingsPattern primary_pattern; |
72 ContentSettingsPattern secondary_pattern; | 73 ContentSettingsPattern secondary_pattern; |
73 }; | 74 }; |
74 | 75 |
75 } // namespace content_settings | 76 } // namespace content_settings |
76 | 77 |
77 #endif // CHROME_COMMON_CONTENT_SETTINGS_H_ | 78 #endif // CHROME_COMMON_CONTENT_SETTINGS_H_ |
OLD | NEW |