| 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": "HeaderFilter", |
| 12 "type": "object", |
| 13 "description": "Filters request headers for various criteria.", |
| 14 "properties": { |
| 15 "namePrefix": { |
| 16 "description" : "Matches if the header name starts with the specifie
d string.", |
| 17 "type": "string", |
| 18 "optional": true |
| 19 }, |
| 20 "nameSuffix": { |
| 21 "type": "string", |
| 22 "optional": true, |
| 23 "description" : "Matches if the header name ends with the specified
string." |
| 24 }, |
| 25 "nameContains": { |
| 26 "choices": [ |
| 27 {"type": "array", "items": {"type": "string"}}, |
| 28 {"type": "string"} |
| 29 ], |
| 30 "optional": true, |
| 31 "description" : "Matches if the header name contains all of the spec
ified strings." |
| 32 }, |
| 33 "nameEquals": { |
| 34 "type": "string", |
| 35 "optional": true, |
| 36 "description" : "Matches if the header name is equal to the specifie
d string." |
| 37 }, |
| 38 "valuePrefix": { |
| 39 "type": "string", |
| 40 "optional": true, |
| 41 "description" : "Matches if the header value starts with the specifi
ed string." |
| 42 }, |
| 43 "valueSuffix": { |
| 44 "type": "string", |
| 45 "optional": true, |
| 46 "description" : "Matches if the header value ends with the specified
string." |
| 47 }, |
| 48 "valueContains": { |
| 49 "choices": [ |
| 50 {"type": "array", "items": {"type": "string"}}, |
| 51 {"type": "string"} |
| 52 ], |
| 53 "optional": true, |
| 54 "description" : "Matches if the header value contains all of the spe
cified strings." |
| 55 }, |
| 56 "valueEquals": { |
| 57 "type": "string", |
| 58 "optional": true, |
| 59 "description" : "Matches if the header value is equal to the specifi
ed string." |
| 60 } |
| 61 } |
| 62 }, |
| 63 { |
| 11 "id": "RequestMatcher", | 64 "id": "RequestMatcher", |
| 12 "type": "object", | 65 "type": "object", |
| 13 "description": "Matches network events by various criteria.", | 66 "description": "Matches network events by various criteria.", |
| 14 "properties": { | 67 "properties": { |
| 15 "url": { | 68 "url": { |
| 16 "$ref": "events.UrlFilter", | 69 "$ref": "events.UrlFilter", |
| 17 "description": "Matches if the condition of the UrlFilter are fulfil
led for the URL of the request.", | 70 "description": "Matches if the condition of the UrlFilter are fulfil
led for the URL of the request.", |
| 18 "optional": true | 71 "optional": true |
| 19 }, | 72 }, |
| 20 "resourceType": { | 73 "resourceType": { |
| 21 "type": "array", | 74 "type": "array", |
| 22 "optional": true, | 75 "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.
", | 76 "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"] } | 77 "items": { "type": "string", "enum": ["main_frame", "sub_frame", "st
ylesheet", "script", "image", "object", "xmlhttprequest", "other"] } |
| 25 }, | 78 }, |
| 26 "contentType": { | 79 "contentType": { |
| 27 "type": "array", | 80 "type": "array", |
| 28 "optional": true, | 81 "optional": true, |
| 29 "description": "Matches if the MIME media type of a response (from t
he HTTP Content-Type header) is contained in the list.", | 82 "description": "Matches if the MIME media type of a response (from t
he HTTP Content-Type header) is contained in the list.", |
| 30 "items": { "type": "string" } | 83 "items": { "type": "string" } |
| 31 }, | 84 }, |
| 32 "excludeContentType": { | 85 "excludeContentType": { |
| 33 "type": "array", | 86 "type": "array", |
| 34 "optional": true, | 87 "optional": true, |
| 35 "description": "Matches if the MIME media type of a response (from t
he HTTP Content-Type header) is <em>not</em> contained in the list.", | 88 "description": "Matches if the MIME media type of a response (from t
he HTTP Content-Type header) is <em>not</em> contained in the list.", |
| 36 "items": { "type": "string" } | 89 "items": { "type": "string" } |
| 37 }, | 90 }, |
| 91 "responseHeaders": { |
| 92 "type": "array", |
| 93 "optional": true, |
| 94 "description": "Matches if some of the response headers is matched b
y one of the HeaderFilters.", |
| 95 "items": { "$ref": "HeaderFilter" } |
| 96 }, |
| 97 "excludeResponseHeaders": { |
| 98 "type": "array", |
| 99 "optional": true, |
| 100 "description": "Matches if none of the response headers is matched b
y one of the HeaderFilters.", |
| 101 "items": { "$ref": "HeaderFilter" } |
| 102 }, |
| 38 "instanceType": { | 103 "instanceType": { |
| 39 "type": "string", "enum": ["declarativeWebRequest.RequestMatcher"], | 104 "type": "string", "enum": ["declarativeWebRequest.RequestMatcher"], |
| 40 "nodoc": true | 105 "nodoc": true |
| 41 } | 106 } |
| 42 } | 107 } |
| 43 }, | 108 }, |
| 44 { | 109 { |
| 45 "id": "CancelRequest", | 110 "id": "CancelRequest", |
| 46 "description": "Declarative event action that cancels a network request.
", | 111 "description": "Declarative event action that cancels a network request.
", |
| 47 "type": "object", | 112 "type": "object", |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 "declarativeWebRequest.RemoveRequestHeader", | 446 "declarativeWebRequest.RemoveRequestHeader", |
| 382 "declarativeWebRequest.RemoveResponseHeader", | 447 "declarativeWebRequest.RemoveResponseHeader", |
| 383 "declarativeWebRequest.SetRequestHeader", | 448 "declarativeWebRequest.SetRequestHeader", |
| 384 "declarativeWebRequest.IgnoreRules" | 449 "declarativeWebRequest.IgnoreRules" |
| 385 ] | 450 ] |
| 386 } | 451 } |
| 387 } | 452 } |
| 388 ] | 453 ] |
| 389 } | 454 } |
| 390 ] | 455 ] |
| OLD | NEW |