OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 [ | 5 [ |
6 { | 6 { |
7 "namespace": "contentSettings", | 7 "namespace": "contentSettings", |
8 "description": "Use the <code>chrome.contentSettings</code> API to change se
ttings that control whether websites can use features such as cookies, JavaScrip
t, and plugins. More generally speaking, content settings allow you to customize
Chrome's behavior on a per-site basis instead of globally.", | 8 "description": "Use the <code>chrome.contentSettings</code> API to change se
ttings that control whether websites can use features such as cookies, JavaScrip
t, and plugins. More generally speaking, content settings allow you to customize
Chrome's behavior on a per-site basis instead of globally.", |
9 "compiler_options": { | 9 "compiler_options": { |
10 "generate_type_functions": true | 10 "generate_type_functions": true |
11 }, | 11 }, |
12 "types": [ | 12 "types": [ |
13 { | 13 { |
14 "id": "ResourceIdentifier", | 14 "id": "ResourceIdentifier", |
15 "type": "object", | 15 "type": "object", |
16 "properties": { | 16 "properties": { |
17 "id": { | 17 "id": { |
18 "type": "string", | 18 "type": "string", |
19 "description": "The resource identifier for the given content type." | 19 "description": "The resource identifier for the given content type." |
20 }, | 20 }, |
21 "description": { | 21 "description": { |
22 "type": "string", | 22 "type": "string", |
23 "optional": true, | 23 "optional": true, |
24 "description": "A human readable description of the resource." | 24 "description": "A human readable description of the resource." |
25 } | 25 } |
26 }, | 26 }, |
27 "description": "The only content type using resource identifiers is $(re
f:contentSettings.plugins). For more information, see <a href=\"contentSettings#
resource-identifiers\">Resource Identifiers</a>." | 27 "description": "The only content type using resource identifiers is $(re
f:contentSettings.plugins). For more information, see <a href=\"contentSettings#
resource-identifiers\">Resource Identifiers</a>." |
28 }, | 28 }, |
29 { | 29 { |
| 30 "id": "Scope", |
| 31 "type": "string", |
| 32 "enum": ["regular", "incognito_session_only"], |
| 33 "description": "The scope of the ContentSetting. One of<br><var>regular<
/var>: setting for regular profile (which is inherited by the incognito profile
if not overridden elsewhere),<br><var>incognito_session_only</var>: setting for
incognito profile that can only be set during an incognito session and is delete
d when the incognito session ends (overrides regular settings)." |
| 34 }, |
| 35 { |
30 "id": "ContentSetting", | 36 "id": "ContentSetting", |
31 "js_module": "ContentSetting", | 37 "js_module": "ContentSetting", |
32 "type": "object", | 38 "type": "object", |
33 "functions": [ | 39 "functions": [ |
34 { | 40 { |
35 "name": "clear", | 41 "name": "clear", |
36 "type": "function", | 42 "type": "function", |
37 "description": "Clear all content setting rules set by this extensio
n.", | 43 "description": "Clear all content setting rules set by this extensio
n.", |
38 "parameters": [ | 44 "parameters": [ |
39 { | 45 { |
40 "name": "details", | 46 "name": "details", |
41 "type": "object", | 47 "type": "object", |
42 "properties": { | 48 "properties": { |
43 "scope": { | 49 "scope": { |
44 "type": "string", | 50 "$ref": "Scope", |
45 "enum": ["regular", "incognito_session_only"], | |
46 "optional": true, | 51 "optional": true, |
47 "description": "Where to clear the setting (default: regular
). One of<br><var>regular</var>: setting for regular profile (which is inherited
by the incognito profile if not overridden elsewhere),<br><var>incognito_sessio
n_only</var>: setting for incognito profile that can only be set during an incog
nito session and is deleted when the incognito session ends (overrides regular s
ettings)." | 52 "description": "Where to clear the setting (default: regular
)." |
48 } | 53 } |
49 } | 54 } |
50 }, | 55 }, |
51 { | 56 { |
52 "type": "function", | 57 "type": "function", |
53 "name": "callback", | 58 "name": "callback", |
54 "optional": true, | 59 "optional": true, |
55 "parameters": [] | 60 "parameters": [] |
56 } | 61 } |
57 ] | 62 ] |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 "resourceIdentifier": { | 130 "resourceIdentifier": { |
126 "$ref": "ResourceIdentifier", | 131 "$ref": "ResourceIdentifier", |
127 "optional": true, | 132 "optional": true, |
128 "description": "The resource identifier for the content type
." | 133 "description": "The resource identifier for the content type
." |
129 }, | 134 }, |
130 "setting": { | 135 "setting": { |
131 "type": "any", | 136 "type": "any", |
132 "description": "The setting applied by this rule. See the de
scription of the individual ContentSetting objects for the possible values." | 137 "description": "The setting applied by this rule. See the de
scription of the individual ContentSetting objects for the possible values." |
133 }, | 138 }, |
134 "scope": { | 139 "scope": { |
135 "type": "string", | 140 "$ref": "Scope", |
136 "enum": ["regular", "incognito_session_only"], | |
137 "optional": true, | 141 "optional": true, |
138 "description": "Where to set the setting (default: regular).
One of<br><var>regular</var>: setting for regular profile (which is inherited b
y the incognito profile if not overridden elsewhere),<br><var>incognito_session_
only</var>: setting for incognito profile that can only be set during an incogni
to session and is deleted when the incognito session ends (overrides regular set
tings)." | 142 "description": "Where to set the setting (default: regular).
" |
139 } | 143 } |
140 } | 144 } |
141 }, | 145 }, |
142 { | 146 { |
143 "type": "function", | 147 "type": "function", |
144 "name": "callback", | 148 "name": "callback", |
145 "optional": true, | 149 "optional": true, |
146 "parameters": [] | 150 "parameters": [] |
147 } | 151 } |
148 ] | 152 ] |
(...skipping 14 matching lines...) Expand all Loading... |
163 "optional": true, | 167 "optional": true, |
164 "items": { | 168 "items": { |
165 "$ref": "ResourceIdentifier" | 169 "$ref": "ResourceIdentifier" |
166 } | 170 } |
167 } | 171 } |
168 ] | 172 ] |
169 } | 173 } |
170 ] | 174 ] |
171 } | 175 } |
172 ] | 176 ] |
| 177 }, |
| 178 { |
| 179 "id": "CookiesContentSetting", |
| 180 "type": "string", |
| 181 "enum": ["allow", "block", "session_only"] |
| 182 }, |
| 183 { |
| 184 "id": "ImagesContentSetting", |
| 185 "type": "string", |
| 186 "enum": ["allow", "block"] |
| 187 }, |
| 188 { |
| 189 "id": "JavascriptContentSetting", |
| 190 "type": "string", |
| 191 "enum": ["allow", "block"] |
| 192 }, |
| 193 { |
| 194 "id": "LocationContentSetting", |
| 195 "type": "string", |
| 196 "enum": ["allow", "block", "ask"] |
| 197 }, |
| 198 { |
| 199 "id": "PluginsContentSetting", |
| 200 "type": "string", |
| 201 "enum": ["allow", "block"] |
| 202 }, |
| 203 { |
| 204 "id": "PopupsContentSetting", |
| 205 "type": "string", |
| 206 "enum": ["allow", "block"] |
| 207 }, |
| 208 { |
| 209 "id": "NotificationsContentSetting", |
| 210 "type": "string", |
| 211 "enum": ["allow", "block", "ask"] |
| 212 }, |
| 213 { |
| 214 "id": "FullscreenContentSetting", |
| 215 "type": "string", |
| 216 "enum": ["allow", "ask"] |
| 217 }, |
| 218 { |
| 219 "id": "MouselockContentSetting", |
| 220 "type": "string", |
| 221 "enum": ["allow", "block", "ask"] |
| 222 }, |
| 223 { |
| 224 "id": "PpapiBrokerContentSetting", |
| 225 "type": "string", |
| 226 "enum": ["allow", "block", "ask"] |
| 227 }, |
| 228 { |
| 229 "id": "MultipleAutomaticDownloadsContentSetting", |
| 230 "type": "string", |
| 231 "enum": ["allow", "block", "ask"] |
173 } | 232 } |
174 ], | 233 ], |
175 "properties": { | 234 "properties": { |
176 "cookies": { | 235 "cookies": { |
177 "$ref": "ContentSetting", | 236 "$ref": "ContentSetting", |
178 "description": "Whether to allow cookies and other local data to be set
by websites. One of<br><var>allow</var>: Accept cookies,<br><var>block</var>: Bl
ock cookies,<br><var>session_only</var>: Accept cookies only for the current ses
sion. <br>Default is <var>allow</var>.<br>The primary URL is the URL representin
g the cookie origin. The secondary URL is the URL of the top-level frame.", | 237 "description": "Whether to allow cookies and other local data to be set
by websites. One of<br><var>allow</var>: Accept cookies,<br><var>block</var>: Bl
ock cookies,<br><var>session_only</var>: Accept cookies only for the current ses
sion. <br>Default is <var>allow</var>.<br>The primary URL is the URL representin
g the cookie origin. The secondary URL is the URL of the top-level frame.", |
179 "value": [ | 238 "value": [ |
180 "cookies", | 239 "cookies", |
181 {"type":"string", "enum": ["allow", "block", "session_only"]} | 240 {"$ref":"CookiesContentSetting"} |
182 ] | 241 ] |
183 }, | 242 }, |
184 "images": { | 243 "images": { |
185 "$ref": "ContentSetting", | 244 "$ref": "ContentSetting", |
186 "description": "Whether to show images. One of<br><var>allow</var>: Show
images,<br><var>block</var>: Don't show images. <br>Default is <var>allow</var>
.<br>The primary URL is the URL of the top-level frame. The secondary URL is the
URL of the image.", | 245 "description": "Whether to show images. One of<br><var>allow</var>: Show
images,<br><var>block</var>: Don't show images. <br>Default is <var>allow</var>
.<br>The primary URL is the URL of the top-level frame. The secondary URL is the
URL of the image.", |
187 "value": [ | 246 "value": [ |
188 "images", | 247 "images", |
189 {"type":"string", "enum": ["allow", "block"]} | 248 {"$ref":"ImagesContentSetting"} |
190 ] | 249 ] |
191 }, | 250 }, |
192 "javascript": { | 251 "javascript": { |
193 "$ref": "ContentSetting", | 252 "$ref": "ContentSetting", |
194 "description": "Whether to run JavaScript. One of<br><var>allow</var>: R
un JavaScript,<br><var>block</var>: Don't run JavaScript. <br>Default is <var>al
low</var>.<br>The primary URL is the URL of the top-level frame. The secondary U
RL is not used.", | 253 "description": "Whether to run JavaScript. One of<br><var>allow</var>: R
un JavaScript,<br><var>block</var>: Don't run JavaScript. <br>Default is <var>al
low</var>.<br>The primary URL is the URL of the top-level frame. The secondary U
RL is not used.", |
195 "value": [ | 254 "value": [ |
196 "javascript", | 255 "javascript", |
197 {"type":"string", "enum": ["allow", "block"]} | 256 {"$ref":"JavascriptContentSetting"} |
198 ] | 257 ] |
199 }, | 258 }, |
200 "location": { | 259 "location": { |
201 "$ref": "ContentSetting", | 260 "$ref": "ContentSetting", |
202 "description": "Whether to allow Geolocation. One of <br><var>allow</var
>: Allow sites to track your physical location,<br><var>block</var>: Don't allow
sites to track your physical location,<br><var>ask</var>: Ask before allowing s
ites to track your physical location. <br>Default is <var>ask</var>.<br>The prim
ary URL is the URL of the document which requested location data. The secondary
URL is the URL of the top-level frame (which may or may not differ from the requ
esting URL).", | 261 "description": "Whether to allow Geolocation. One of <br><var>allow</var
>: Allow sites to track your physical location,<br><var>block</var>: Don't allow
sites to track your physical location,<br><var>ask</var>: Ask before allowing s
ites to track your physical location. <br>Default is <var>ask</var>.<br>The prim
ary URL is the URL of the document which requested location data. The secondary
URL is the URL of the top-level frame (which may or may not differ from the requ
esting URL).", |
203 "value": [ | 262 "value": [ |
204 "location", | 263 "location", |
205 {"type":"string", "enum": ["allow", "block", "ask"]} | 264 {"$ref":"LocationContentSetting"} |
206 ] | 265 ] |
207 }, | 266 }, |
208 "plugins": { | 267 "plugins": { |
209 "$ref": "ContentSetting", | 268 "$ref": "ContentSetting", |
210 "description": "Whether to run plugins. One of<br><var>allow</var>: Run
plugins automatically,<br><var>block</var>: Don't run plugins automatically. <br
>Default is <var>allow</var>.<br>The primary URL is the URL of the top-level fra
me. The secondary URL is not used.", | 269 "description": "Whether to run plugins. One of<br><var>allow</var>: Run
plugins automatically,<br><var>block</var>: Don't run plugins automatically. <br
>Default is <var>allow</var>.<br>The primary URL is the URL of the top-level fra
me. The secondary URL is not used.", |
211 "value": [ | 270 "value": [ |
212 "plugins", | 271 "plugins", |
213 {"type":"string", "enum": ["allow", "block"]} | 272 {"$ref":"PluginsContentSetting"} |
214 ] | 273 ] |
215 }, | 274 }, |
216 "popups": { | 275 "popups": { |
217 "$ref": "ContentSetting", | 276 "$ref": "ContentSetting", |
218 "description": "Whether to allow sites to show pop-ups. One of<br><var>a
llow</var>: Allow sites to show pop-ups,<br><var>block</var>: Don't allow sites
to show pop-ups. <br>Default is <var>block</var>.<br>The primary URL is the URL
of the top-level frame. The secondary URL is not used.", | 277 "description": "Whether to allow sites to show pop-ups. One of<br><var>a
llow</var>: Allow sites to show pop-ups,<br><var>block</var>: Don't allow sites
to show pop-ups. <br>Default is <var>block</var>.<br>The primary URL is the URL
of the top-level frame. The secondary URL is not used.", |
219 "value": [ | 278 "value": [ |
220 "popups", | 279 "popups", |
221 {"type":"string", "enum": ["allow", "block"]} | 280 {"$ref":"PopupsContentSetting"} |
222 ] | 281 ] |
223 }, | 282 }, |
224 "notifications": { | 283 "notifications": { |
225 "$ref": "ContentSetting", | 284 "$ref": "ContentSetting", |
226 "description": "Whether to allow sites to show desktop notifications. On
e of<br><var>allow</var>: Allow sites to show desktop notifications,<br><var>blo
ck</var>: Don't allow sites to show desktop notifications,<br><var>ask</var>: As
k when a site wants to show desktop notifications. <br>Default is <var>ask</var>
.<br>The primary URL is the URL of the document which wants to show the notifica
tion. The secondary URL is not used.", | 285 "description": "Whether to allow sites to show desktop notifications. On
e of<br><var>allow</var>: Allow sites to show desktop notifications,<br><var>blo
ck</var>: Don't allow sites to show desktop notifications,<br><var>ask</var>: As
k when a site wants to show desktop notifications. <br>Default is <var>ask</var>
.<br>The primary URL is the URL of the document which wants to show the notifica
tion. The secondary URL is not used.", |
227 "value": [ | 286 "value": [ |
228 "notifications", | 287 "notifications", |
229 {"type":"string", "enum": ["allow", "block", "ask"]} | 288 {"$ref":"NotificationsContentSetting"} |
230 ] | 289 ] |
231 }, | 290 }, |
232 "fullscreen": { | 291 "fullscreen": { |
233 "$ref": "ContentSetting", | 292 "$ref": "ContentSetting", |
234 "description": "Whether to allow sites to toggle the fullscreen mode. On
e of<br><var>allow</var>: Allow sites to toggle the fullscreen mode,<br><var>ask
</var>: Ask when a site wants to toggle the fullscreen mode. <br>Default is <var
>ask</var>.<br>The primary URL is the URL of the document which requested to tog
gle the fullscreen mode. The secondary URL is the URL of the top-level frame (wh
ich may or may not differ from the requesting URL).", | 293 "description": "Whether to allow sites to toggle the fullscreen mode. On
e of<br><var>allow</var>: Allow sites to toggle the fullscreen mode,<br><var>ask
</var>: Ask when a site wants to toggle the fullscreen mode. <br>Default is <var
>ask</var>.<br>The primary URL is the URL of the document which requested to tog
gle the fullscreen mode. The secondary URL is the URL of the top-level frame (wh
ich may or may not differ from the requesting URL).", |
235 "value": [ | 294 "value": [ |
236 "fullscreen", | 295 "fullscreen", |
237 {"type":"string", "enum": ["allow", "ask"]} | 296 {"$ref":"FullscreenContentSetting"} |
238 ] | 297 ] |
239 }, | 298 }, |
240 "mouselock": { | 299 "mouselock": { |
241 "$ref": "ContentSetting", | 300 "$ref": "ContentSetting", |
242 "description": "Whether to allow sites to disable the mouse cursor. One
of <br><var>allow</var>: Allow sites to disable the mouse cursor,<br><var>block<
/var>: Don't allow sites to disable the mouse cursor,<br><var>ask</var>: Ask whe
n a site wants to disable the mouse cursor. <br>Default is <var>ask</var>.<br>Th
e primary URL is the URL of the top-level frame. The secondary URL is not used."
, | 301 "description": "Whether to allow sites to disable the mouse cursor. One
of <br><var>allow</var>: Allow sites to disable the mouse cursor,<br><var>block<
/var>: Don't allow sites to disable the mouse cursor,<br><var>ask</var>: Ask whe
n a site wants to disable the mouse cursor. <br>Default is <var>ask</var>.<br>Th
e primary URL is the URL of the top-level frame. The secondary URL is not used."
, |
243 "value": [ | 302 "value": [ |
244 "mouselock", | 303 "mouselock", |
245 {"type":"string", "enum": ["allow", "block", "ask"]} | 304 {"$ref":"MouselockContentSetting"} |
246 ] | 305 ] |
247 }, | 306 }, |
248 "unsandboxedPlugins": { | 307 "unsandboxedPlugins": { |
249 "$ref": "ContentSetting", | 308 "$ref": "ContentSetting", |
250 "description": "Whether to allow sites to run plugins unsandboxed. One o
f <br><var>allow</var>: Allow sites to run plugins unsandboxed,<br><var>block</v
ar>: Don't allow sites to run plugins unsandboxed,<br><var>ask</var>: Ask when a
site wants to run a plugin unsandboxed. <br>Default is <var>ask</var>.<br>The p
rimary URL is the URL of the top-level frame. The secondary URL is not used.", | 309 "description": "Whether to allow sites to run plugins unsandboxed. One o
f <br><var>allow</var>: Allow sites to run plugins unsandboxed,<br><var>block</v
ar>: Don't allow sites to run plugins unsandboxed,<br><var>ask</var>: Ask when a
site wants to run a plugin unsandboxed. <br>Default is <var>ask</var>.<br>The p
rimary URL is the URL of the top-level frame. The secondary URL is not used.", |
251 "value": [ | 310 "value": [ |
252 "ppapi-broker", | 311 "ppapi-broker", |
253 {"type":"string", "enum": ["allow", "block", "ask"]} | 312 {"$ref":"PpapiBrokerContentSetting"} |
254 ] | 313 ] |
255 }, | 314 }, |
256 "automaticDownloads": { | 315 "automaticDownloads": { |
257 "$ref": "ContentSetting", | 316 "$ref": "ContentSetting", |
258 "description": "Whether to allow sites to download multiple files automa
tically. One of <br><var>allow</var>: Allow sites to download multiple files aut
omatically,<br><var>block</var>: Don't allow sites to download multiple files au
tomatically,<br><var>ask</var>: Ask when a site wants to download files automati
cally after the first file. <br>Default is <var>ask</var>.<br>The primary URL is
the URL of the top-level frame. The secondary URL is not used.", | 317 "description": "Whether to allow sites to download multiple files automa
tically. One of <br><var>allow</var>: Allow sites to download multiple files aut
omatically,<br><var>block</var>: Don't allow sites to download multiple files au
tomatically,<br><var>ask</var>: Ask when a site wants to download files automati
cally after the first file. <br>Default is <var>ask</var>.<br>The primary URL is
the URL of the top-level frame. The secondary URL is not used.", |
259 "value": [ | 318 "value": [ |
260 "multiple-automatic-downloads", | 319 "multiple-automatic-downloads", |
261 {"type":"string", "enum": ["allow", "block", "ask"]} | 320 {"$ref":"MultipleAutomaticDownloadsContentSetting"} |
262 ] | 321 ] |
263 } | 322 } |
264 } | 323 } |
265 } | 324 } |
266 ] | 325 ] |
OLD | NEW |