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": "webRequest", | 7 "namespace": "webRequest", |
8 "types": [ | 8 "types": [ |
9 { | 9 { |
10 "id": "RequestFilter", | 10 "id": "RequestFilter", |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 "parameters": [ | 99 "parameters": [ |
100 { | 100 { |
101 "type": "object", | 101 "type": "object", |
102 "name": "details", | 102 "name": "details", |
103 "properties": { | 103 "properties": { |
104 "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."}, | 104 "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."}, |
105 "url": {"type": "string"}, | 105 "url": {"type": "string"}, |
106 "method": {"type": "string", "description": "Standard HTTP method.
"}, | 106 "method": {"type": "string", "description": "Standard HTTP method.
"}, |
107 "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."}, | 107 "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."}, |
108 "parentFrameId": {"type": "integer", "description": "ID of frame t
hat wraps the frame which sent the request. Set to -1 if no parent frame exists.
"}, | 108 "parentFrameId": {"type": "integer", "description": "ID of frame t
hat wraps the frame which sent the request. Set to -1 if no parent frame exists.
"}, |
| 109 "postData": { |
| 110 "type": "object", |
| 111 "optional": true, |
| 112 "description": "Experimental feature, only available in DEV or C
ANARY channels. Container for representations of data sent by the request via PO
ST method. Only provided if extraInfoSpec contains 'postData'.", |
| 113 "properties": { |
| 114 "error": {"type": "string", "optional": true, "enum": ["chunke
d_encoding"], "description": "Errors when obtaining POST data: 'chunked_encoding
' means that the data is uploaded chunked, which is not currently supported by t
he WebRequest API."}, |
| 115 "form": { |
| 116 "type": "object", |
| 117 "optional": true, |
| 118 "description": "If the POST data is a sequence of key-value
pairs, encoded as either multipart/form-data, or application/x-www-form-urlencod
ed, this dictionary is present and for each key contains the list of all values
for that key. If the data is of another media type, or if it is malformed, the d
ictionary is not present. It is also not present if the form upload is chunked.
Example value of this dictionary is {'key': ['value1', 'value2']}.", |
| 119 "properties": {}, |
| 120 "additionalProperties": { |
| 121 "type": "array", |
| 122 "items": { "type": "string" } |
| 123 } |
| 124 } |
| 125 } |
| 126 }, |
109 "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."
}, | 127 "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."
}, |
110 "type": {"type": "string", "enum": ["main_frame", "sub_frame", "st
ylesheet", "script", "image", "object", "xmlhttprequest", "other"], "description
": "How the requested resource will be used."}, | 128 "type": {"type": "string", "enum": ["main_frame", "sub_frame", "st
ylesheet", "script", "image", "object", "xmlhttprequest", "other"], "description
": "How the requested resource will be used."}, |
111 "timeStamp": {"type": "number", "description": "The time when this
signal is triggered, in milliseconds since the epoch."} | 129 "timeStamp": {"type": "number", "description": "The time when this
signal is triggered, in milliseconds since the epoch."} |
112 } | 130 } |
113 } | 131 } |
114 ], | 132 ], |
115 "extraParameters": [ | 133 "extraParameters": [ |
116 { | 134 { |
117 "$ref": "RequestFilter", | 135 "$ref": "RequestFilter", |
118 "name": "filter", | 136 "name": "filter", |
119 "description": "A set of filters that restricts the events that will
be sent to this listener." | 137 "description": "A set of filters that restricts the events that will
be sent to this listener." |
120 }, | 138 }, |
121 { | 139 { |
122 "type": "array", | 140 "type": "array", |
123 "optional": true, | 141 "optional": true, |
124 "name": "extraInfoSpec", | 142 "name": "extraInfoSpec", |
125 "description": "Array of extra information that should be passed to
the listener function.", | 143 "description": "Array of extra information that should be passed to
the listener function.", |
126 "items": { | 144 "items": { |
127 "type": "string", | 145 "type": "string", |
128 "enum": ["blocking"] | 146 "enum": ["blocking", "postData"] |
129 } | 147 } |
130 } | 148 } |
131 ], | 149 ], |
132 "returns": { | 150 "returns": { |
133 "$ref": "BlockingResponse", | 151 "$ref": "BlockingResponse", |
134 "description": "If \"blocking\" is specified in the \"extraInfoSpec\"
parameter, the event listener should return an object of this type.", | 152 "description": "If \"blocking\" is specified in the \"extraInfoSpec\"
parameter, the event listener should return an object of this type.", |
135 "optional": true | 153 "optional": true |
136 } | 154 } |
137 }, | 155 }, |
138 { | 156 { |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 { | 495 { |
478 "$ref": "RequestFilter", | 496 "$ref": "RequestFilter", |
479 "name": "filter", | 497 "name": "filter", |
480 "description": "A set of filters that restricts the events that will
be sent to this listener." | 498 "description": "A set of filters that restricts the events that will
be sent to this listener." |
481 } | 499 } |
482 ] | 500 ] |
483 } | 501 } |
484 ] | 502 ] |
485 } | 503 } |
486 ] | 504 ] |
OLD | NEW |