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": "declarativeWebRequest", | 7 "namespace": "declarativeWebRequest", |
8 "documentation_permissions_required": ["declarative", "declarativeWebRequest
"], | 8 "documentation_permissions_required": ["declarative", "declarativeWebRequest
"], |
9 "types": [ | 9 "types": [ |
10 { | 10 { |
11 "id": "RequestMatcher", | 11 "id": "RequestMatcher", |
12 "type": "object", | 12 "type": "object", |
13 "description": "Matches network events by various criteria.", | 13 "description": "Matches network events by various criteria.", |
14 "properties": { | 14 "properties": { |
15 "url": { | 15 "url": { |
16 "$ref": "events.UrlFilter", | 16 "$ref": "events.UrlFilter", |
17 "description": "Matches if the condition of the UrlFilter are fulfil
led for the URL of the request.", | 17 "description": "Matches if the condition of the UrlFilter are fulfil
led for the URL of the request.", |
18 "optional": true | 18 "optional": true |
19 }, | 19 }, |
20 "resourceType": { | 20 "resourceType": { |
21 "type": "array", | 21 "type": "array", |
22 "optional": true, | 22 "optional": true, |
23 "description": "Matches if the request type of a request is containe
d in the list. Requests that cannot match any of the types will be filtered out.
", | 23 "description": "Matches if the request type of a request is containe
d in the list. Requests that cannot match any of the types will be filtered out.
", |
24 "items": { "type": "string", "enum": ["main_frame", "sub_frame", "st
ylesheet", "script", "image", "object", "xmlhttprequest", "other"] } | 24 "items": { "type": "string", "enum": ["main_frame", "sub_frame", "st
ylesheet", "script", "image", "object", "xmlhttprequest", "other"] } |
25 }, | 25 }, |
26 "instanceType": { "type": "string", "enum": ["declarativeWebRequest.Re
questMatcher"] } | 26 "instanceType": { |
| 27 "type": "string", "enum": ["declarativeWebRequest.RequestMatcher"], |
| 28 "nodoc": true |
| 29 } |
27 } | 30 } |
28 }, | 31 }, |
29 { | 32 { |
30 "id": "CancelRequest", | 33 "id": "CancelRequest", |
31 "description": "Declarative event action that cancels a network request.
", | 34 "description": "Declarative event action that cancels a network request.
", |
32 "type": "object", | 35 "type": "object", |
33 "properties": { | 36 "properties": { |
34 "instanceType": { "type": "string", "enum": ["declarativeWebRequest.Ca
ncelRequest"] } | 37 "instanceType": { |
| 38 "type": "string", "enum": ["declarativeWebRequest.CancelRequest"], |
| 39 "nodoc": true |
| 40 } |
35 } | 41 } |
36 }, | 42 }, |
37 { | 43 { |
38 "id": "RedirectRequest", | 44 "id": "RedirectRequest", |
39 "description": "Declarative event action that redirects a network reques
t.", | 45 "description": "Declarative event action that redirects a network reques
t.", |
40 "type": "object", | 46 "type": "object", |
41 "properties": { | 47 "properties": { |
42 "instanceType": { "type": "string", "enum": ["declarativeWebRequest.Re
directRequest"] }, | 48 "instanceType": { |
| 49 "type": "string", "enum": ["declarativeWebRequest.RedirectRequest"], |
| 50 "nodoc": true |
| 51 }, |
43 "redirectUrl": { "type": "string", "description": "Destination to wher
e the request is redirected."} | 52 "redirectUrl": { "type": "string", "description": "Destination to wher
e the request is redirected."} |
44 } | 53 } |
45 }, | 54 }, |
46 { | 55 { |
47 "id": "declarativeWebRequest.RedirectToTransparentImage", | 56 "id": "declarativeWebRequest.RedirectToTransparentImage", |
48 "description": "Declarative event action that redirects a network reques
t to a transparent image.", | 57 "description": "Declarative event action that redirects a network reques
t to a transparent image.", |
49 "type": "object", | 58 "type": "object", |
50 "properties": { | 59 "properties": { |
51 "instanceType": { | 60 "instanceType": { |
52 "type": "string", "enum": ["declarativeWebRequest.RedirectToTranspar
entImage"], | 61 "type": "string", "enum": ["declarativeWebRequest.RedirectToTranspar
entImage"], |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 "properties": { | 173 "properties": { |
165 "instanceType": { | 174 "instanceType": { |
166 "type": "string", "enum": ["declarativeWebRequest.IgnoreRules"], | 175 "type": "string", "enum": ["declarativeWebRequest.IgnoreRules"], |
167 "nodoc": true | 176 "nodoc": true |
168 }, | 177 }, |
169 "lowerPriorityThan": { | 178 "lowerPriorityThan": { |
170 "type": "integer", | 179 "type": "integer", |
171 "description": "If set, rules with a lower priority than the specifi
ed value are ignored. This boundary is not persited, it affects only rules and t
heir actions of the same network request stage. TODO(battre): Explain network re
quest stages." | 180 "description": "If set, rules with a lower priority than the specifi
ed value are ignored. This boundary is not persited, it affects only rules and t
heir actions of the same network request stage. TODO(battre): Explain network re
quest stages." |
172 } | 181 } |
173 } | 182 } |
| 183 }, |
| 184 { |
| 185 "id": "declarativeWebRequest.RequestCookie", |
| 186 "description": "A filter or specification of a cookie in HTTP Requests."
, |
| 187 "type": "object", |
| 188 "properties": { |
| 189 "name": { |
| 190 "type": "string", |
| 191 "description": "Name of a cookie.", |
| 192 "optional": true |
| 193 }, |
| 194 "value": { |
| 195 "type": "string", |
| 196 "description": "Value of a cookie, may be padded in double-quotes.", |
| 197 "optional": true |
| 198 } |
| 199 } |
| 200 }, |
| 201 { |
| 202 "id": "declarativeWebRequest.ResponseCookie", |
| 203 "description": "A filter or specification of a cookie in HTTP Responses.
", |
| 204 "type": "object", |
| 205 "properties": { |
| 206 "name": { |
| 207 "type": "string", |
| 208 "description": "Name of a cookie.", |
| 209 "optional": true |
| 210 }, |
| 211 "value": { |
| 212 "type": "string", |
| 213 "description": "Value of a cookie, may be padded in double-quotes.", |
| 214 "optional": true |
| 215 }, |
| 216 "expires": { |
| 217 "type": "string", |
| 218 "description": "Value of the Expires cookie attribute.", |
| 219 "optional": true |
| 220 }, |
| 221 "maxAge": { |
| 222 "type": "number", |
| 223 "description": "Value of the Max-Age cookie attribute", |
| 224 "optional": true |
| 225 }, |
| 226 "domain": { |
| 227 "type": "string", |
| 228 "description": "Value of the Domain cookie attribute.", |
| 229 "optional": true |
| 230 }, |
| 231 "path": { |
| 232 "type": "string", |
| 233 "description": "Value of the Path cookie attribute.", |
| 234 "optional": true |
| 235 }, |
| 236 "secure": { |
| 237 "type": "string", |
| 238 "description": "Existence of the Secure cookie attribute.", |
| 239 "optional": true |
| 240 }, |
| 241 "httpOnly": { |
| 242 "type": "string", |
| 243 "description": "Existence of the HttpOnly cookie attribute.", |
| 244 "optional": true |
| 245 } |
| 246 } |
| 247 }, |
| 248 { |
| 249 "id": "declarativeWebRequest.AddRequestCookie", |
| 250 "description": "Adds a cookie to the request or overrides a cookie, in c
ase another cookie of the same name exists already. Note that it is preferred to
use the Cookies API because this is computationally less expensive.", |
| 251 "type": "object", |
| 252 "properties": { |
| 253 "instanceType": { |
| 254 "type": "string", "enum": ["declarativeWebRequest.AddRequestCookie"]
, |
| 255 "nodoc": true |
| 256 }, |
| 257 "cookie": { |
| 258 "$ref": "declarativeWebRequest.RequestCookie", |
| 259 "description": "Cookie to be added to the request. No field may be u
ndefined." |
| 260 } |
| 261 } |
| 262 }, |
| 263 { |
| 264 "id": "declarativeWebRequest.AddResponseCookie", |
| 265 "description": "Adds a cookie to the response or overrides a cookie, in
case another cookie of the same name exists already. Note that it is preferred t
o use the Cookies API because this is computationally less expensive.", |
| 266 "type": "object", |
| 267 "properties": { |
| 268 "instanceType": { |
| 269 "type": "string", "enum": ["declarativeWebRequest.AddResponseCookie"
], |
| 270 "nodoc": true |
| 271 }, |
| 272 "cookie": { |
| 273 "$ref": "declarativeWebRequest.ResponseCookie", |
| 274 "description": "Cookie to be added to the response. The name and val
ue need to be specified." |
| 275 } |
| 276 } |
| 277 }, |
| 278 { |
| 279 "id": "declarativeWebRequest.EditRequestCookie", |
| 280 "description": "Edits one or more cookies of request. Note that it is pr
eferred to use the Cookies API because this is computationally less expensive.", |
| 281 "type": "object", |
| 282 "properties": { |
| 283 "instanceType": { |
| 284 "type": "string", "enum": ["declarativeWebRequest.EditRequestCookie"
], |
| 285 "nodoc": true |
| 286 }, |
| 287 "filter": { |
| 288 "$ref": "declarativeWebRequest.RequestCookie", |
| 289 "description": "Filter for cookies that will be modified. All empty
entries are ignored." |
| 290 }, |
| 291 "modification": { |
| 292 "$ref": "declarativeWebRequest.RequestCookie", |
| 293 "description": "Attributes that shall be overridden in cookies that
machted the filter. Attributes that are set to an empty string are removed." |
| 294 } |
| 295 } |
| 296 }, |
| 297 { |
| 298 "id": "declarativeWebRequest.EditResponseCookie", |
| 299 "description": "Edits one or more cookies of response. Note that it is p
referred to use the Cookies API because this is computationally less expensive."
, |
| 300 "type": "object", |
| 301 "properties": { |
| 302 "instanceType": { |
| 303 "type": "string", "enum": ["declarativeWebRequest.EditResponseCookie
"], |
| 304 "nodoc": true |
| 305 }, |
| 306 "filter": { |
| 307 "$ref": "declarativeWebRequest.ResponseCookie", |
| 308 "description": "Filter for cookies that will be modified. All empty
entries are ignored." |
| 309 }, |
| 310 "modification": { |
| 311 "$ref": "declarativeWebRequest.ResponseCookie", |
| 312 "description": "Attributes that shall be overridden in cookies that
machted the filter. Attributes that are set to an empty string are removed." |
| 313 } |
| 314 } |
| 315 }, |
| 316 { |
| 317 "id": "declarativeWebRequest.RemoveRequestCookie", |
| 318 "description": "Removes one or more cookies of request. Note that it is
preferred to use the Cookies API because this is computationally less expensive.
", |
| 319 "type": "object", |
| 320 "properties": { |
| 321 "instanceType": { |
| 322 "type": "string", "enum": ["declarativeWebRequest.RemoveRequestCooki
e"], |
| 323 "nodoc": true |
| 324 }, |
| 325 "filter": { |
| 326 "$ref": "declarativeWebRequest.RequestCookie", |
| 327 "description": "Filter for cookies that will be removed. All empty e
ntries are ignored." |
| 328 } |
| 329 } |
| 330 }, |
| 331 { |
| 332 "id": "declarativeWebRequest.RemoveResponseCookie", |
| 333 "description": "Removes one or more cookies of response. Note that it is
preferred to use the Cookies API because this is computationally less expensive
.", |
| 334 "type": "object", |
| 335 "properties": { |
| 336 "instanceType": { |
| 337 "type": "string", "enum": ["declarativeWebRequest.RemoveResponseCook
ie"], |
| 338 "nodoc": true |
| 339 }, |
| 340 "filter": { |
| 341 "$ref": "declarativeWebRequest.ResponseCookie", |
| 342 "description": "Filter for cookies that will be removed. All empty e
ntries are ignored." |
| 343 } |
| 344 } |
174 } | 345 } |
175 ], | 346 ], |
176 "functions": [ | 347 "functions": [ |
177 ], | 348 ], |
178 "events": [ | 349 "events": [ |
179 { | 350 { |
180 "name": "onRequest", | 351 "name": "onRequest", |
181 "options": { | 352 "options": { |
182 "supportsListeners": false, | 353 "supportsListeners": false, |
183 "supportsRules": true, | 354 "supportsRules": true, |
184 "conditions": ["declarativeWebRequest.RequestMatcher"], | 355 "conditions": ["declarativeWebRequest.RequestMatcher"], |
185 "actions": [ | 356 "actions": [ |
| 357 "declarativeWebRequest.AddRequestCookie", |
| 358 "declarativeWebRequest.AddResponseCookie", |
186 "declarativeWebRequest.AddResponseHeader", | 359 "declarativeWebRequest.AddResponseHeader", |
187 "declarativeWebRequest.CancelRequest", | 360 "declarativeWebRequest.CancelRequest", |
| 361 "declarativeWebRequest.EditRequestCookie", |
| 362 "declarativeWebRequest.EditResponseCookie", |
188 "declarativeWebRequest.RedirectRequest", | 363 "declarativeWebRequest.RedirectRequest", |
189 "declarativeWebRequest.RedirectToTransparentImage", | 364 "declarativeWebRequest.RedirectToTransparentImage", |
190 "declarativeWebRequest.RedirectToEmptyDocument", | 365 "declarativeWebRequest.RedirectToEmptyDocument", |
191 "declarativeWebRequest.RedirectByRegEx", | 366 "declarativeWebRequest.RedirectByRegEx", |
192 "declarativeWebRequest.SetRequestHeader", | 367 "declarativeWebRequest.RemoveRequestCookie", |
| 368 "declarativeWebRequest.RemoveResponseCookie", |
193 "declarativeWebRequest.RemoveRequestHeader", | 369 "declarativeWebRequest.RemoveRequestHeader", |
194 "declarativeWebRequest.RemoveResponseHeader", | 370 "declarativeWebRequest.RemoveResponseHeader", |
| 371 "declarativeWebRequest.SetRequestHeader", |
195 "declarativeWebRequest.IgnoreRules" | 372 "declarativeWebRequest.IgnoreRules" |
196 ] | 373 ] |
197 } | 374 } |
198 } | 375 } |
199 ] | 376 ] |
200 } | 377 } |
201 ] | 378 ] |
OLD | NEW |