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 "description": "<em><strong>Note:</strong> this API is currently on hold, wi
thout concrete plans to move to stable.</em> Use the <code>chrome.declarativeWeb
Request</code> API to intercept, block, or modify requests in-flight. It is sign
ificantly faster than the <a href='webRequest'><code>chrome.webRequest</code> AP
I</a> because you can register rules that are evaluated in the browser rather th
an the JavaScript engine with reduces roundtrip latencies and allows higher effi
ciency.", | 8 "description": "<em><strong>Note:</strong> this API is currently on hold, wi
thout concrete plans to move to stable.</em> Use the <code>chrome.declarativeWeb
Request</code> API to intercept, block, or modify requests in-flight. It is sign
ificantly faster than the <a href='webRequest'><code>chrome.webRequest</code> AP
I</a> because you can register rules that are evaluated in the browser rather th
an the JavaScript engine with reduces roundtrip latencies and allows higher effi
ciency.", |
9 "types": [ | 9 "types": [ |
| 10 // TODO(devlin): The declarativeWebRequest API uses these enums as a form |
| 11 // of RTTI, but it's a rather verbose implementation. We should see if we |
| 12 // can do better. |
| 13 { |
| 14 "id": "RequestMatcherInstanceType", |
| 15 "type": "string", |
| 16 "nodoc": true, |
| 17 "enum": ["declarativeWebRequest.RequestMatcher"] |
| 18 }, |
| 19 { |
| 20 "id": "CancelRequestInstanceType", |
| 21 "type": "string", |
| 22 "nodoc": true, |
| 23 "enum": ["declarativeWebRequest.CancelRequest"] |
| 24 }, |
| 25 { |
| 26 "id": "RedirectRequestInstanceType", |
| 27 "type": "string", |
| 28 "nodoc": true, |
| 29 "enum": ["declarativeWebRequest.RedirectRequest"] |
| 30 }, |
| 31 { |
| 32 "id": "RedirectToTransparentImageInstanceType", |
| 33 "type": "string", |
| 34 "nodoc": true, |
| 35 "enum": ["declarativeWebRequest.RedirectToTransparentImage"] |
| 36 }, |
| 37 { |
| 38 "id": "RedirectToEmptyDocumentInstanceType", |
| 39 "type": "string", |
| 40 "nodoc": true, |
| 41 "enum": ["declarativeWebRequest.RedirectToEmptyDocument"] |
| 42 }, |
| 43 { |
| 44 "id": "RedirectByRegExInstanceType", |
| 45 "type": "string", |
| 46 "nodoc": true, |
| 47 "enum": ["declarativeWebRequest.RedirectByRegEx"] |
| 48 }, |
| 49 { |
| 50 "id": "SetRequestHeaderInstanceType", |
| 51 "type": "string", |
| 52 "nodoc": true, |
| 53 "enum": ["declarativeWebRequest.SetRequestHeader"] |
| 54 }, |
| 55 { |
| 56 "id": "RemoveRequestHeaderInstanceType", |
| 57 "type": "string", |
| 58 "nodoc": true, |
| 59 "enum": ["declarativeWebRequest.RemoveRequestHeader"] |
| 60 }, |
| 61 { |
| 62 "id": "AddResponseHeaderInstanceType", |
| 63 "type": "string", |
| 64 "nodoc": true, |
| 65 "enum": ["declarativeWebRequest.AddResponseHeader"] |
| 66 }, |
| 67 { |
| 68 "id": "RemoveResponseHeaderInstanceType", |
| 69 "type": "string", |
| 70 "nodoc": true, |
| 71 "enum": ["declarativeWebRequest.RemoveResponseHeader"] |
| 72 }, |
| 73 { |
| 74 "id": "IgnoreRulesInstanceType", |
| 75 "type": "string", |
| 76 "nodoc": true, |
| 77 "enum": ["declarativeWebRequest.IgnoreRules"] |
| 78 }, |
| 79 { |
| 80 "id": "SendMessageToExtensionInstanceType", |
| 81 "type": "string", |
| 82 "nodoc": true, |
| 83 "enum": ["declarativeWebRequest.SendMessageToExtension"] |
| 84 }, |
| 85 { |
| 86 "id": "AddRequestCookieInstanceType", |
| 87 "type": "string", |
| 88 "nodoc": true, |
| 89 "enum": ["declarativeWebRequest.AddRequestCookie"] |
| 90 }, |
| 91 { |
| 92 "id": "AddResponseCookieInstanceType", |
| 93 "type": "string", |
| 94 "nodoc": true, |
| 95 "enum": ["declarativeWebRequest.AddResponseCookie"] |
| 96 }, |
| 97 { |
| 98 "id": "EditRequestCookieInstanceType", |
| 99 "type": "string", |
| 100 "nodoc": true, |
| 101 "enum": ["declarativeWebRequest.EditRequestCookie"] |
| 102 }, |
| 103 { |
| 104 "id": "EditResponseCookieInstanceType", |
| 105 "type": "string", |
| 106 "nodoc": true, |
| 107 "enum": ["declarativeWebRequest.EditResponseCookie"] |
| 108 }, |
| 109 { |
| 110 "id": "RemoveRequestCookieInstanceType", |
| 111 "type": "string", |
| 112 "nodoc": true, |
| 113 "enum": ["declarativeWebRequest.RemoveRequestCookie"] |
| 114 }, |
| 115 { |
| 116 "id": "RemoveResponseCookieInstanceType", |
| 117 "type": "string", |
| 118 "nodoc": true, |
| 119 "enum": ["declarativeWebRequest.RemoveResponseCookie"] |
| 120 }, |
| 121 { |
| 122 "id": "Stage", |
| 123 "type": "string", |
| 124 "enum": ["onBeforeRequest", "onBeforeSendHeaders", "onHeadersReceived",
"onAuthRequired"] |
| 125 }, |
10 { | 126 { |
11 "id": "HeaderFilter", | 127 "id": "HeaderFilter", |
12 "type": "object", | 128 "type": "object", |
13 "description": "Filters request headers for various criteria. Multiple c
riteria are evaluated as a conjunction.", | 129 "description": "Filters request headers for various criteria. Multiple c
riteria are evaluated as a conjunction.", |
14 "properties": { | 130 "properties": { |
15 "namePrefix": { | 131 "namePrefix": { |
16 "description" : "Matches if the header name starts with the specifie
d string.", | 132 "description" : "Matches if the header name starts with the specifie
d string.", |
17 "type": "string", | 133 "type": "string", |
18 "optional": true | 134 "optional": true |
19 }, | 135 }, |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 }, | 188 }, |
73 "firstPartyForCookiesUrl": { | 189 "firstPartyForCookiesUrl": { |
74 "$ref": "events.UrlFilter", | 190 "$ref": "events.UrlFilter", |
75 "description": "Matches if the conditions of the UrlFilter are fulfi
lled for the 'first party' URL of the request. The 'first party' URL of a reques
t, when present, can be different from the request's target URL, and describes w
hat is considered 'first party' for the sake of third-party checks for cookies."
, | 191 "description": "Matches if the conditions of the UrlFilter are fulfi
lled for the 'first party' URL of the request. The 'first party' URL of a reques
t, when present, can be different from the request's target URL, and describes w
hat is considered 'first party' for the sake of third-party checks for cookies."
, |
76 "optional": true | 192 "optional": true |
77 }, | 193 }, |
78 "resourceType": { | 194 "resourceType": { |
79 "type": "array", | 195 "type": "array", |
80 "optional": true, | 196 "optional": true, |
81 "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.
", | 197 "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.
", |
82 "items": { "type": "string", "enum": ["main_frame", "sub_frame", "st
ylesheet", "script", "image", "font", "object", "xmlhttprequest", "ping", "other
"] } | 198 "items": { "$ref": "webRequest.ResourceType" } |
83 }, | 199 }, |
84 "contentType": { | 200 "contentType": { |
85 "type": "array", | 201 "type": "array", |
86 "optional": true, | 202 "optional": true, |
87 "description": "Matches if the MIME media type of a response (from t
he HTTP Content-Type header) is contained in the list.", | 203 "description": "Matches if the MIME media type of a response (from t
he HTTP Content-Type header) is contained in the list.", |
88 "items": { "type": "string" } | 204 "items": { "type": "string" } |
89 }, | 205 }, |
90 "excludeContentType": { | 206 "excludeContentType": { |
91 "type": "array", | 207 "type": "array", |
92 "optional": true, | 208 "optional": true, |
(...skipping 24 matching lines...) Expand all Loading... |
117 "description": "Matches if none of the response headers is matched b
y any of the HeaderFilters.", | 233 "description": "Matches if none of the response headers is matched b
y any of the HeaderFilters.", |
118 "items": { "$ref": "HeaderFilter" } | 234 "items": { "$ref": "HeaderFilter" } |
119 }, | 235 }, |
120 "thirdPartyForCookies": { | 236 "thirdPartyForCookies": { |
121 "type": "boolean", | 237 "type": "boolean", |
122 "optional": true, | 238 "optional": true, |
123 "description": "If set to true, matches requests that are subject to
third-party cookie policies. If set to false, matches all other requests." | 239 "description": "If set to true, matches requests that are subject to
third-party cookie policies. If set to false, matches all other requests." |
124 }, | 240 }, |
125 "stages": { | 241 "stages": { |
126 "type": "array", | 242 "type": "array", |
127 "items": { | 243 "items": { "$ref": "Stage" }, |
128 "type": "string", | |
129 "enum": ["onBeforeRequest", "onBeforeSendHeaders", "onHeadersRecei
ved", "onAuthRequired"] | |
130 }, | |
131 "optional": true, | 244 "optional": true, |
132 "description": "Contains a list of strings describing stages. Allowe
d values are 'onBeforeRequest', 'onBeforeSendHeaders', 'onHeadersReceived', 'onA
uthRequired'. If this attribute is present, then it limits the applicable stages
to those listed. Note that the whole condition is only applicable in stages com
patible with all attributes." | 245 "description": "Contains a list of strings describing stages. Allowe
d values are 'onBeforeRequest', 'onBeforeSendHeaders', 'onHeadersReceived', 'onA
uthRequired'. If this attribute is present, then it limits the applicable stages
to those listed. Note that the whole condition is only applicable in stages com
patible with all attributes." |
133 }, | 246 }, |
134 "instanceType": { | 247 "instanceType": { |
135 "type": "string", "enum": ["declarativeWebRequest.RequestMatcher"], | 248 "$ref": "RequestMatcherInstanceType", |
136 "nodoc": true | 249 "nodoc": true |
137 } | 250 } |
138 } | 251 } |
139 }, | 252 }, |
140 { | 253 { |
141 "id": "CancelRequest", | 254 "id": "CancelRequest", |
142 "description": "Declarative event action that cancels a network request.
", | 255 "description": "Declarative event action that cancels a network request.
", |
143 "type": "object", | 256 "type": "object", |
144 "properties": { | 257 "properties": { |
145 "instanceType": { | 258 "instanceType": { |
146 "type": "string", "enum": ["declarativeWebRequest.CancelRequest"], | 259 "$ref": "CancelRequestInstanceType", |
147 "nodoc": true | 260 "nodoc": true |
148 } | 261 } |
149 } | 262 } |
150 }, | 263 }, |
151 { | 264 { |
152 "id": "RedirectRequest", | 265 "id": "RedirectRequest", |
153 "description": "Declarative event action that redirects a network reques
t.", | 266 "description": "Declarative event action that redirects a network reques
t.", |
154 "type": "object", | 267 "type": "object", |
155 "properties": { | 268 "properties": { |
156 "instanceType": { | 269 "instanceType": { |
157 "type": "string", "enum": ["declarativeWebRequest.RedirectRequest"], | 270 "$ref": "RedirectRequestInstanceType", |
158 "nodoc": true | 271 "nodoc": true |
159 }, | 272 }, |
160 "redirectUrl": { "type": "string", "description": "Destination to wher
e the request is redirected."} | 273 "redirectUrl": { "type": "string", "description": "Destination to wher
e the request is redirected."} |
161 } | 274 } |
162 }, | 275 }, |
163 { | 276 { |
164 "id": "declarativeWebRequest.RedirectToTransparentImage", | 277 "id": "declarativeWebRequest.RedirectToTransparentImage", |
165 "description": "Declarative event action that redirects a network reques
t to a transparent image.", | 278 "description": "Declarative event action that redirects a network reques
t to a transparent image.", |
166 "type": "object", | 279 "type": "object", |
167 "properties": { | 280 "properties": { |
168 "instanceType": { | 281 "instanceType": { |
169 "type": "string", "enum": ["declarativeWebRequest.RedirectToTranspar
entImage"], | 282 "$ref": "RedirectToTransparentImageInstanceType", |
170 "nodoc": true | 283 "nodoc": true |
171 } | 284 } |
172 } | 285 } |
173 }, | 286 }, |
174 { | 287 { |
175 "id": "declarativeWebRequest.RedirectToEmptyDocument", | 288 "id": "declarativeWebRequest.RedirectToEmptyDocument", |
176 "description": "Declarative event action that redirects a network reques
t to an empty document.", | 289 "description": "Declarative event action that redirects a network reques
t to an empty document.", |
177 "type": "object", | 290 "type": "object", |
178 "properties": { | 291 "properties": { |
179 "instanceType": { | 292 "instanceType": { |
180 "type": "string", "enum": ["declarativeWebRequest.RedirectToEmptyDoc
ument"], | 293 "$ref": "RedirectToEmptyDocumentInstanceType", |
181 "nodoc": true | 294 "nodoc": true |
182 } | 295 } |
183 } | 296 } |
184 }, | 297 }, |
185 { | 298 { |
186 "id": "declarativeWebRequest.RedirectByRegEx", | 299 "id": "declarativeWebRequest.RedirectByRegEx", |
187 "description": "Redirects a request by applying a regular expression on
the URL. The regular expressions use the <a href=\"https://github.com/google/re2
/blob/master/doc/syntax.txt\">RE2 syntax</a>.", | 300 "description": "Redirects a request by applying a regular expression on
the URL. The regular expressions use the <a href=\"https://github.com/google/re2
/blob/master/doc/syntax.txt\">RE2 syntax</a>.", |
188 "type": "object", | 301 "type": "object", |
189 "properties": { | 302 "properties": { |
190 "instanceType": { | 303 "instanceType": { |
191 "type": "string", "enum": ["declarativeWebRequest.RedirectByRegEx"], | 304 "$ref": "RedirectByRegExInstanceType", |
192 "nodoc": true | 305 "nodoc": true |
193 }, | 306 }, |
194 "from": { | 307 "from": { |
195 "type": "string", | 308 "type": "string", |
196 "description": "A match pattern that may contain capture groups. Cap
ture groups are referenced in the Perl syntax ($1, $2, ...) instead of the RE2 s
yntax (\\1, \\2, ...) in order to be closer to JavaScript Regular Expressions." | 309 "description": "A match pattern that may contain capture groups. Cap
ture groups are referenced in the Perl syntax ($1, $2, ...) instead of the RE2 s
yntax (\\1, \\2, ...) in order to be closer to JavaScript Regular Expressions." |
197 }, | 310 }, |
198 "to": { | 311 "to": { |
199 "type": "string", | 312 "type": "string", |
200 "description": "Destination pattern." | 313 "description": "Destination pattern." |
201 } | 314 } |
202 } | 315 } |
203 }, | 316 }, |
204 { | 317 { |
205 "id": "declarativeWebRequest.SetRequestHeader", | 318 "id": "declarativeWebRequest.SetRequestHeader", |
206 "description": "Sets the request header of the specified name to the spe
cified value. If a header with the specified name did not exist before, a new on
e is created. Header name comparison is always case-insensitive. Each request he
ader name occurs only once in each request.", | 319 "description": "Sets the request header of the specified name to the spe
cified value. If a header with the specified name did not exist before, a new on
e is created. Header name comparison is always case-insensitive. Each request he
ader name occurs only once in each request.", |
207 "type": "object", | 320 "type": "object", |
208 "properties": { | 321 "properties": { |
209 "instanceType": { | 322 "instanceType": { |
210 "type": "string", "enum": ["declarativeWebRequest.SetRequestHeader"]
, | 323 "$ref": "SetRequestHeaderInstanceType", |
211 "nodoc": true | 324 "nodoc": true |
212 }, | 325 }, |
213 "name": { | 326 "name": { |
214 "type": "string", | 327 "type": "string", |
215 "description": "HTTP request header name." | 328 "description": "HTTP request header name." |
216 }, | 329 }, |
217 "value": { | 330 "value": { |
218 "type": "string", | 331 "type": "string", |
219 "description": "HTTP request header value." | 332 "description": "HTTP request header value." |
220 } | 333 } |
221 } | 334 } |
222 }, | 335 }, |
223 { | 336 { |
224 "id": "declarativeWebRequest.RemoveRequestHeader", | 337 "id": "declarativeWebRequest.RemoveRequestHeader", |
225 "description": "Removes the request header of the specified name. Do not
use SetRequestHeader and RemoveRequestHeader with the same header name on the s
ame request. Each request header name occurs only once in each request.", | 338 "description": "Removes the request header of the specified name. Do not
use SetRequestHeader and RemoveRequestHeader with the same header name on the s
ame request. Each request header name occurs only once in each request.", |
226 "type": "object", | 339 "type": "object", |
227 "properties": { | 340 "properties": { |
228 "instanceType": { | 341 "instanceType": { |
229 "type": "string", "enum": ["declarativeWebRequest.RemoveRequestHeade
r"], | 342 "$ref": "RemoveRequestHeaderInstanceType", |
230 "nodoc": true | 343 "nodoc": true |
231 }, | 344 }, |
232 "name": { | 345 "name": { |
233 "type": "string", | 346 "type": "string", |
234 "description": "HTTP request header name (case-insensitive)." | 347 "description": "HTTP request header name (case-insensitive)." |
235 } | 348 } |
236 } | 349 } |
237 }, | 350 }, |
238 { | 351 { |
239 "id": "declarativeWebRequest.AddResponseHeader", | 352 "id": "declarativeWebRequest.AddResponseHeader", |
240 "description": "Adds the response header to the response of this web req
uest. As multiple response headers may share the same name, you need to first re
move and then add a new response header in order to replace one.", | 353 "description": "Adds the response header to the response of this web req
uest. As multiple response headers may share the same name, you need to first re
move and then add a new response header in order to replace one.", |
241 "type": "object", | 354 "type": "object", |
242 "properties": { | 355 "properties": { |
243 "instanceType": { | 356 "instanceType": { |
244 "type": "string", "enum": ["declarativeWebRequest.AddResponseHeader"
], | 357 "$ref": "AddResponseHeaderInstanceType", |
245 "nodoc": true | 358 "nodoc": true |
246 }, | 359 }, |
247 "name": { | 360 "name": { |
248 "type": "string", | 361 "type": "string", |
249 "description": "HTTP response header name." | 362 "description": "HTTP response header name." |
250 }, | 363 }, |
251 "value": { | 364 "value": { |
252 "type": "string", | 365 "type": "string", |
253 "description": "HTTP response header value." | 366 "description": "HTTP response header value." |
254 } | 367 } |
255 } | 368 } |
256 }, | 369 }, |
257 { | 370 { |
258 "id": "declarativeWebRequest.RemoveResponseHeader", | 371 "id": "declarativeWebRequest.RemoveResponseHeader", |
259 "description": "Removes all response headers of the specified names and
values.", | 372 "description": "Removes all response headers of the specified names and
values.", |
260 "type": "object", | 373 "type": "object", |
261 "properties": { | 374 "properties": { |
262 "instanceType": { | 375 "instanceType": { |
263 "type": "string", "enum": ["declarativeWebRequest.RemoveResponseHead
er"], | 376 "$ref": "RemoveResponseHeaderInstanceType", |
264 "nodoc": true | 377 "nodoc": true |
265 }, | 378 }, |
266 "name": { | 379 "name": { |
267 "type": "string", | 380 "type": "string", |
268 "description": "HTTP request header name (case-insensitive)." | 381 "description": "HTTP request header name (case-insensitive)." |
269 }, | 382 }, |
270 "value": { | 383 "value": { |
271 "type": "string", | 384 "type": "string", |
272 "description": "HTTP request header value (case-insensitive).", | 385 "description": "HTTP request header value (case-insensitive).", |
273 "optional": true | 386 "optional": true |
274 } | 387 } |
275 } | 388 } |
276 }, | 389 }, |
277 { | 390 { |
278 "id": "declarativeWebRequest.IgnoreRules", | 391 "id": "declarativeWebRequest.IgnoreRules", |
279 "description": "Masks all rules that match the specified criteria.", | 392 "description": "Masks all rules that match the specified criteria.", |
280 "type": "object", | 393 "type": "object", |
281 "properties": { | 394 "properties": { |
282 "instanceType": { | 395 "instanceType": { |
283 "type": "string", "enum": ["declarativeWebRequest.IgnoreRules"], | 396 "$ref": "IgnoreRulesInstanceType", |
284 "nodoc": true | 397 "nodoc": true |
285 }, | 398 }, |
286 "lowerPriorityThan": { | 399 "lowerPriorityThan": { |
287 "type": "integer", | 400 "type": "integer", |
288 "description": "If set, rules with a lower priority than the specifi
ed value are ignored. This boundary is not persisted, it affects only rules and
their actions of the same network request stage.", | 401 "description": "If set, rules with a lower priority than the specifi
ed value are ignored. This boundary is not persisted, it affects only rules and
their actions of the same network request stage.", |
289 "optional": true | 402 "optional": true |
290 }, | 403 }, |
291 "hasTag": { | 404 "hasTag": { |
292 "type": "string", | 405 "type": "string", |
293 "description": "If set, rules with the specified tag are ignored. Th
is ignoring is not persisted, it affects only rules and their actions of the sam
e network request stage. Note that rules are executed in descending order of the
ir priorities. This action affects rules of lower priority than the current rule
. Rules with the same priority may or may not be ignored.", | 406 "description": "If set, rules with the specified tag are ignored. Th
is ignoring is not persisted, it affects only rules and their actions of the sam
e network request stage. Note that rules are executed in descending order of the
ir priorities. This action affects rules of lower priority than the current rule
. Rules with the same priority may or may not be ignored.", |
294 "optional": true | 407 "optional": true |
295 } | 408 } |
296 } | 409 } |
297 }, | 410 }, |
298 { | 411 { |
299 "id": "declarativeWebRequest.SendMessageToExtension", | 412 "id": "declarativeWebRequest.SendMessageToExtension", |
300 "description": "Triggers the $(ref:declarativeWebRequest.onMessage) even
t.", | 413 "description": "Triggers the $(ref:declarativeWebRequest.onMessage) even
t.", |
301 "type": "object", | 414 "type": "object", |
302 "properties": { | 415 "properties": { |
303 "instanceType": { | 416 "instanceType": { |
304 "type": "string", "enum": ["declarativeWebRequest.SendMessageToExten
sion"], | 417 "$ref": "SendMessageToExtensionInstanceType", |
305 "nodoc": true | 418 "nodoc": true |
306 }, | 419 }, |
307 "message": { | 420 "message": { |
308 "type": "string", | 421 "type": "string", |
309 "description": "The value that will be passed in the <code>message</
code> attribute of the dictionary that is passed to the event handler." | 422 "description": "The value that will be passed in the <code>message</
code> attribute of the dictionary that is passed to the event handler." |
310 } | 423 } |
311 } | 424 } |
312 }, | 425 }, |
313 { | 426 { |
314 "id": "declarativeWebRequest.RequestCookie", | 427 "id": "declarativeWebRequest.RequestCookie", |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 "optional": true | 550 "optional": true |
438 } | 551 } |
439 } | 552 } |
440 }, | 553 }, |
441 { | 554 { |
442 "id": "declarativeWebRequest.AddRequestCookie", | 555 "id": "declarativeWebRequest.AddRequestCookie", |
443 "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.", | 556 "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.", |
444 "type": "object", | 557 "type": "object", |
445 "properties": { | 558 "properties": { |
446 "instanceType": { | 559 "instanceType": { |
447 "type": "string", "enum": ["declarativeWebRequest.AddRequestCookie"]
, | 560 "$ref": "AddRequestCookieInstanceType", |
448 "nodoc": true | 561 "nodoc": true |
449 }, | 562 }, |
450 "cookie": { | 563 "cookie": { |
451 "$ref": "declarativeWebRequest.RequestCookie", | 564 "$ref": "declarativeWebRequest.RequestCookie", |
452 "description": "Cookie to be added to the request. No field may be u
ndefined." | 565 "description": "Cookie to be added to the request. No field may be u
ndefined." |
453 } | 566 } |
454 } | 567 } |
455 }, | 568 }, |
456 { | 569 { |
457 "id": "declarativeWebRequest.AddResponseCookie", | 570 "id": "declarativeWebRequest.AddResponseCookie", |
458 "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.", | 571 "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.", |
459 "type": "object", | 572 "type": "object", |
460 "properties": { | 573 "properties": { |
461 "instanceType": { | 574 "instanceType": { |
462 "type": "string", "enum": ["declarativeWebRequest.AddResponseCookie"
], | 575 "$ref": "AddResponseCookieInstanceType", |
463 "nodoc": true | 576 "nodoc": true |
464 }, | 577 }, |
465 "cookie": { | 578 "cookie": { |
466 "$ref": "declarativeWebRequest.ResponseCookie", | 579 "$ref": "declarativeWebRequest.ResponseCookie", |
467 "description": "Cookie to be added to the response. The name and val
ue need to be specified." | 580 "description": "Cookie to be added to the response. The name and val
ue need to be specified." |
468 } | 581 } |
469 } | 582 } |
470 }, | 583 }, |
471 { | 584 { |
472 "id": "declarativeWebRequest.EditRequestCookie", | 585 "id": "declarativeWebRequest.EditRequestCookie", |
473 "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.", | 586 "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.", |
474 "type": "object", | 587 "type": "object", |
475 "properties": { | 588 "properties": { |
476 "instanceType": { | 589 "instanceType": { |
477 "type": "string", "enum": ["declarativeWebRequest.EditRequestCookie"
], | 590 "$ref": "EditRequestCookieInstanceType", |
478 "nodoc": true | 591 "nodoc": true |
479 }, | 592 }, |
480 "filter": { | 593 "filter": { |
481 "$ref": "declarativeWebRequest.RequestCookie", | 594 "$ref": "declarativeWebRequest.RequestCookie", |
482 "description": "Filter for cookies that will be modified. All empty
entries are ignored." | 595 "description": "Filter for cookies that will be modified. All empty
entries are ignored." |
483 }, | 596 }, |
484 "modification": { | 597 "modification": { |
485 "$ref": "declarativeWebRequest.RequestCookie", | 598 "$ref": "declarativeWebRequest.RequestCookie", |
486 "description": "Attributes that shall be overridden in cookies that
machted the filter. Attributes that are set to an empty string are removed." | 599 "description": "Attributes that shall be overridden in cookies that
machted the filter. Attributes that are set to an empty string are removed." |
487 } | 600 } |
488 } | 601 } |
489 }, | 602 }, |
490 { | 603 { |
491 "id": "declarativeWebRequest.EditResponseCookie", | 604 "id": "declarativeWebRequest.EditResponseCookie", |
492 "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."
, | 605 "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."
, |
493 "type": "object", | 606 "type": "object", |
494 "properties": { | 607 "properties": { |
495 "instanceType": { | 608 "instanceType": { |
496 "type": "string", "enum": ["declarativeWebRequest.EditResponseCookie
"], | 609 "$ref": "EditResponseCookieInstanceType", |
497 "nodoc": true | 610 "nodoc": true |
498 }, | 611 }, |
499 "filter": { | 612 "filter": { |
500 "$ref": "declarativeWebRequest.FilterResponseCookie", | 613 "$ref": "declarativeWebRequest.FilterResponseCookie", |
501 "description": "Filter for cookies that will be modified. All empty
entries are ignored." | 614 "description": "Filter for cookies that will be modified. All empty
entries are ignored." |
502 }, | 615 }, |
503 "modification": { | 616 "modification": { |
504 "$ref": "declarativeWebRequest.ResponseCookie", | 617 "$ref": "declarativeWebRequest.ResponseCookie", |
505 "description": "Attributes that shall be overridden in cookies that
machted the filter. Attributes that are set to an empty string are removed." | 618 "description": "Attributes that shall be overridden in cookies that
machted the filter. Attributes that are set to an empty string are removed." |
506 } | 619 } |
507 } | 620 } |
508 }, | 621 }, |
509 { | 622 { |
510 "id": "declarativeWebRequest.RemoveRequestCookie", | 623 "id": "declarativeWebRequest.RemoveRequestCookie", |
511 "description": "Removes one or more cookies of request. Note that it is
preferred to use the Cookies API because this is computationally less expensive.
", | 624 "description": "Removes one or more cookies of request. Note that it is
preferred to use the Cookies API because this is computationally less expensive.
", |
512 "type": "object", | 625 "type": "object", |
513 "properties": { | 626 "properties": { |
514 "instanceType": { | 627 "instanceType": { |
515 "type": "string", "enum": ["declarativeWebRequest.RemoveRequestCooki
e"], | 628 "$ref": "RemoveRequestCookieInstanceType", |
516 "nodoc": true | 629 "nodoc": true |
517 }, | 630 }, |
518 "filter": { | 631 "filter": { |
519 "$ref": "declarativeWebRequest.RequestCookie", | 632 "$ref": "declarativeWebRequest.RequestCookie", |
520 "description": "Filter for cookies that will be removed. All empty e
ntries are ignored." | 633 "description": "Filter for cookies that will be removed. All empty e
ntries are ignored." |
521 } | 634 } |
522 } | 635 } |
523 }, | 636 }, |
524 { | 637 { |
525 "id": "declarativeWebRequest.RemoveResponseCookie", | 638 "id": "declarativeWebRequest.RemoveResponseCookie", |
526 "description": "Removes one or more cookies of response. Note that it is
preferred to use the Cookies API because this is computationally less expensive
.", | 639 "description": "Removes one or more cookies of response. Note that it is
preferred to use the Cookies API because this is computationally less expensive
.", |
527 "type": "object", | 640 "type": "object", |
528 "properties": { | 641 "properties": { |
529 "instanceType": { | 642 "instanceType": { |
530 "type": "string", "enum": ["declarativeWebRequest.RemoveResponseCook
ie"], | 643 "$ref": "RemoveResponseCookieInstanceType", |
531 "nodoc": true | 644 "nodoc": true |
532 }, | 645 }, |
533 "filter": { | 646 "filter": { |
534 "$ref": "declarativeWebRequest.FilterResponseCookie", | 647 "$ref": "declarativeWebRequest.FilterResponseCookie", |
535 "description": "Filter for cookies that will be removed. All empty e
ntries are ignored." | 648 "description": "Filter for cookies that will be removed. All empty e
ntries are ignored." |
536 } | 649 } |
537 } | 650 } |
538 } | 651 } |
539 ], | 652 ], |
540 "functions": [ | 653 "functions": [ |
(...skipping 29 matching lines...) Expand all Loading... |
570 { | 683 { |
571 "name": "onMessage", | 684 "name": "onMessage", |
572 "type": "function", | 685 "type": "function", |
573 "description": "Fired when a message is sent via $(ref:declarativeWebReq
uest.SendMessageToExtension) from an action of the declarative web request API."
, | 686 "description": "Fired when a message is sent via $(ref:declarativeWebReq
uest.SendMessageToExtension) from an action of the declarative web request API."
, |
574 "parameters": [ | 687 "parameters": [ |
575 { | 688 { |
576 "type": "object", | 689 "type": "object", |
577 "name": "details", | 690 "name": "details", |
578 "properties": { | 691 "properties": { |
579 "message": {"type": "string", "description": "The message sent by
the calling script."}, | 692 "message": {"type": "string", "description": "The message sent by
the calling script."}, |
580 "stage": {"type": "string", | 693 "stage": {"$ref": "Stage", |
581 "enum": ["onBeforeRequest", "onBeforeSendHeaders", "onHe
adersReceived", "onAuthRequired"], | |
582 "description": "The stage of the network request during
which the event was triggered."}, | 694 "description": "The stage of the network request during
which the event was triggered."}, |
583 "requestId": {"type": "string", "description": "The ID of the requ
est. Request IDs are unique within a browser session. As a result, they could be
used to relate different events of the same request."}, | 695 "requestId": {"type": "string", "description": "The ID of the requ
est. Request IDs are unique within a browser session. As a result, they could be
used to relate different events of the same request."}, |
584 "url": {"type": "string"}, | 696 "url": {"type": "string"}, |
585 "method": {"type": "string", "description": "Standard HTTP method.
"}, | 697 "method": {"type": "string", "description": "Standard HTTP method.
"}, |
586 "frameId": {"type": "integer", "description": "The value 0 indicat
es that the request happens in the main frame; a positive value indicates the ID
of a subframe in which the request happens. If the document of a (sub-)frame is
loaded (<code>type</code> is <code>main_frame</code> or <code>sub_frame</code>)
, <code>frameId</code> indicates the ID of this frame, not the ID of the outer f
rame. Frame IDs are unique within a tab."}, | 698 "frameId": {"type": "integer", "description": "The value 0 indicat
es that the request happens in the main frame; a positive value indicates the ID
of a subframe in which the request happens. If the document of a (sub-)frame is
loaded (<code>type</code> is <code>main_frame</code> or <code>sub_frame</code>)
, <code>frameId</code> indicates the ID of this frame, not the ID of the outer f
rame. Frame IDs are unique within a tab."}, |
587 "parentFrameId": {"type": "integer", "description": "ID of frame t
hat wraps the frame which sent the request. Set to -1 if no parent frame exists.
"}, | 699 "parentFrameId": {"type": "integer", "description": "ID of frame t
hat wraps the frame which sent the request. Set to -1 if no parent frame exists.
"}, |
588 "tabId": {"type": "integer", "description": "The ID of the tab in
which the request takes place. Set to -1 if the request isn't related to a tab."
}, | 700 "tabId": {"type": "integer", "description": "The ID of the tab in
which the request takes place. Set to -1 if the request isn't related to a tab."
}, |
589 "type": {"type": "string", "enum": ["main_frame", "sub_frame", "st
ylesheet", "script", "image", "object", "xmlhttprequest", "other"], "description
": "How the requested resource will be used."}, | 701 "type": {"$ref": "webRequest.ResourceType", |
| 702 "description": "How the requested resource will be used."
}, |
590 "timeStamp": {"type": "number", "description": "The time when this
signal is triggered, in milliseconds since the epoch."} | 703 "timeStamp": {"type": "number", "description": "The time when this
signal is triggered, in milliseconds since the epoch."} |
591 } | 704 } |
592 } | 705 } |
593 ] | 706 ] |
594 } | 707 } |
595 ] | 708 ] |
596 } | 709 } |
597 ] | 710 ] |
OLD | NEW |