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 "requestBody": { |
| 110 "type": "object", |
| 111 "optional": true, |
| 112 "description": "Experimental feature, only available in DEV or C
ANARY channels. Container for request body data. Only provided if extraInfoSpec
contains 'requestBody'. Currently only request body elements containing byte dat
a or files are reported. Blob elements are ignored, and chunked elements result
in an error.", |
| 113 "properties": { |
| 114 "error": {"type": "string", "optional": true, "description": "
Errors when obtaining request body data."}, |
| 115 "formData": { |
| 116 "type": "object", |
| 117 "optional": true, |
| 118 "description": "If the request method is POST and the body i
s a sequence of key-value pairs, encoded as either multipart/form-data, or appli
cation/x-www-form-urlencoded, this dictionary is present and for each key contai
ns the list of all values for that key. If the data is of another media type, or
if it is malformed, the dictionary is not present. It is also not present if th
e form upload is chunked. An example value of this dictionary is {'key': ['value
1', 'value2']}.", |
| 119 "properties": {}, |
| 120 "additionalProperties": { |
| 121 "type": "array", |
| 122 "items": { "type": "string" } |
| 123 } |
| 124 }, |
| 125 "raw" : { |
| 126 "type": "array", |
| 127 "optional": true, |
| 128 "items": { "type": "any" }, |
| 129 "description": "If the request method is PUT or POST, and th
e body is not already parsed in formData, then the unparsed request body element
s are contained in this array. Data elements appear here as ArrayBuffer, file el
ements as strings containing the filename." |
| 130 } |
| 131 } |
| 132 }, |
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."
}, | 133 "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."}, | 134 "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."} | 135 "timeStamp": {"type": "number", "description": "The time when this
signal is triggered, in milliseconds since the epoch."} |
112 } | 136 } |
113 } | 137 } |
114 ], | 138 ], |
115 "extraParameters": [ | 139 "extraParameters": [ |
116 { | 140 { |
117 "$ref": "RequestFilter", | 141 "$ref": "RequestFilter", |
118 "name": "filter", | 142 "name": "filter", |
119 "description": "A set of filters that restricts the events that will
be sent to this listener." | 143 "description": "A set of filters that restricts the events that will
be sent to this listener." |
120 }, | 144 }, |
121 { | 145 { |
122 "type": "array", | 146 "type": "array", |
123 "optional": true, | 147 "optional": true, |
124 "name": "extraInfoSpec", | 148 "name": "extraInfoSpec", |
125 "description": "Array of extra information that should be passed to
the listener function.", | 149 "description": "Array of extra information that should be passed to
the listener function.", |
126 "items": { | 150 "items": { |
127 "type": "string", | 151 "type": "string", |
128 "enum": ["blocking"] | 152 "enum": ["blocking", "requestBody"] |
129 } | 153 } |
130 } | 154 } |
131 ], | 155 ], |
132 "returns": { | 156 "returns": { |
133 "$ref": "BlockingResponse", | 157 "$ref": "BlockingResponse", |
134 "description": "If \"blocking\" is specified in the \"extraInfoSpec\"
parameter, the event listener should return an object of this type.", | 158 "description": "If \"blocking\" is specified in the \"extraInfoSpec\"
parameter, the event listener should return an object of this type.", |
135 "optional": true | 159 "optional": true |
136 } | 160 } |
137 }, | 161 }, |
138 { | 162 { |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 { | 501 { |
478 "$ref": "RequestFilter", | 502 "$ref": "RequestFilter", |
479 "name": "filter", | 503 "name": "filter", |
480 "description": "A set of filters that restricts the events that will
be sent to this listener." | 504 "description": "A set of filters that restricts the events that will
be sent to this listener." |
481 } | 505 } |
482 ] | 506 ] |
483 } | 507 } |
484 ] | 508 ] |
485 } | 509 } |
486 ] | 510 ] |
OLD | NEW |