Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(625)

Side by Side Diff: chrome/common/extensions/api/web_request.json

Issue 584163004: Move web_request directory to //extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase again Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 [
6 {
7 "namespace": "webRequest",
8 "description": "Use the <code>chrome.webRequest</code> API to observe and an alyze traffic and to intercept, block, or modify requests in-flight.",
9 "properties": {
10 "MAX_HANDLER_BEHAVIOR_CHANGED_CALLS_PER_10_MINUTES": {
11 "value": 20,
12 "description": "The maximum number of times that <code>handlerBehaviorCh anged</code> can be called per 10 minute sustained interval. <code>handlerBehavi orChanged</code> is an expensive function call that shouldn't be called often."
13 }
14 },
15 "types": [
16 {
17 "id": "RequestFilter",
18 "type": "object",
19 "description": "An object describing filters to apply to webRequest even ts.",
20 "properties": {
21 "urls": {
22 "type": "array",
23 "description": "A list of URLs or URL patterns. Requests that cannot match any of the URLs will be filtered out.",
24 "items": { "type": "string" }
25 },
26 "types": {
27 "type": "array",
28 "optional": true,
29 "description": "A list of request types. Requests that cannot match any of the types will be filtered out.",
30 "items": { "type": "string", "enum": ["main_frame", "sub_frame", "st ylesheet", "script", "image", "object", "xmlhttprequest", "other"] }
31 },
32 "tabId": { "type": "integer", "optional": true },
33 "windowId": { "type": "integer", "optional": true }
34 }
35 },
36 {
37 "id": "HttpHeaders",
38 "nocompile": true,
39 "type": "array",
40 "description": "An array of HTTP headers. Each header is represented as a dictionary containing the keys <code>name</code> and either <code>value</code> or <code>binaryValue</code>.",
41 "items": {
42 "type": "object",
43 "properties": {
44 "name": {"type": "string", "description": "Name of the HTTP header." },
45 "value": {"type": "string", "optional": true, "description": "Value of the HTTP header if it can be represented by UTF-8."},
46 "binaryValue": {
47 "type": "array",
48 "optional": true,
49 "description": "Value of the HTTP header if it cannot be represent ed by UTF-8, stored as individual byte values (0..255).",
50 "items": {"type": "integer"}
51 }
52 }
53 }
54 },
55 {
56 "id": "BlockingResponse",
57 "nocompile": true,
58 "type": "object",
59 "description": "Returns value for event handlers that have the 'blocking ' extraInfoSpec applied. Allows the event handler to modify network requests.",
60 "properties": {
61 "cancel": {
62 "type": "boolean",
63 "optional": true,
64 "description": "If true, the request is cancelled. Used in onBeforeR equest, this prevents the request from being sent."
65 },
66 "redirectUrl": {
67 "type": "string",
68 "optional": true,
69 "description": "Only used as a response to the onBeforeRequest and o nHeadersReceived events. If set, the original request is prevented from being se nt/completed and is instead redirected to the given URL. Redirections to non-HTT P schemes such as data: are allowed. Redirects initiated by a redirect action us e the original request method for the redirect, with one exception: If the redir ect is initiated at the onHeadersReceived stage, then the redirect will be issue d using the GET method."
70 },
71 "requestHeaders": {
72 "$ref": "HttpHeaders",
73 "optional": true,
74 "description": "Only used as a response to the onBeforeSendHeaders e vent. If set, the request is made with these request headers instead."
75 },
76 "responseHeaders": {
77 "$ref": "HttpHeaders",
78 "optional": true,
79 "description": "Only used as a response to the onHeadersReceived eve nt. If set, the server is assumed to have responded with these response headers instead. Only return <code>responseHeaders</code> if you really want to modify t he headers in order to limit the number of conflicts (only one extension may mod ify <code>responseHeaders</code> for each request)."
80 },
81 "authCredentials": {
82 "type": "object",
83 "description": "Only used as a response to the onAuthRequired event. If set, the request is made using the supplied credentials.",
84 "optional": true,
85 "properties": {
86 "username": {"type": "string"},
87 "password": {"type": "string"}
88 }
89 }
90 }
91 },
92 {
93 "id": "UploadData",
94 "type": "object",
95 "properties": {
96 "bytes": {
97 "type": "any",
98 "optional": true,
99 "description": "An ArrayBuffer with a copy of the data."
100 },
101 "file": {
102 "type": "string",
103 "optional": true,
104 "description": "A string with the file's path and name."
105 }
106 },
107 "description": "Contains data uploaded in a URL request."
108 }
109 ],
110 "functions": [
111 {
112 "name": "handlerBehaviorChanged",
113 "type": "function",
114 "description": "Needs to be called when the behavior of the webRequest h andlers has changed to prevent incorrect handling due to caching. This function call is expensive. Don't call it often.",
115 "parameters": [
116 {"type": "function", "name": "callback", "optional": true, "parameters ": []}
117 ]
118 }
119 ],
120 "events": [
121 {
122 "name": "onBeforeRequest",
123 "type": "function",
124 "description": "Fired when a request is about to occur.",
125 "parameters": [
126 {
127 "type": "object",
128 "name": "details",
129 "properties": {
130 "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."},
131 "url": {"type": "string"},
132 "method": {"type": "string", "description": "Standard HTTP method. "},
133 "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."},
134 "parentFrameId": {"type": "integer", "description": "ID of frame t hat wraps the frame which sent the request. Set to -1 if no parent frame exists. "},
135 "requestBody": {
136 "type": "object",
137 "optional": true,
138 "description": "Contains the HTTP request body data. Only provid ed if extraInfoSpec contains 'requestBody'.",
139 "properties": {
140 "error": {"type": "string", "optional": true, "description": " Errors when obtaining request body data."},
141 "formData": {
142 "type": "object",
143 "optional": true,
144 "description": "If the request method is POST and the body i s a sequence of key-value pairs encoded in UTF8, encoded as either multipart/for m-data, or application/x-www-form-urlencoded, this dictionary is present and for each key contains the list of all values for that key. If the data is of anothe r media type, or if it is malformed, the dictionary is not present. An example v alue of this dictionary is {'key': ['value1', 'value2']}.",
145 "properties": {},
146 "additionalProperties": {
147 "type": "array",
148 "items": { "type": "string" }
149 }
150 },
151 "raw" : {
152 "type": "array",
153 "optional": true,
154 "items": {"$ref": "UploadData"},
155 "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."
156 }
157 }
158 },
159 "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." },
160 "type": {"type": "string", "enum": ["main_frame", "sub_frame", "st ylesheet", "script", "image", "object", "xmlhttprequest", "other"], "description ": "How the requested resource will be used."},
161 "timeStamp": {"type": "number", "description": "The time when this signal is triggered, in milliseconds since the epoch."}
162 }
163 }
164 ],
165 "extraParameters": [
166 {
167 "$ref": "RequestFilter",
168 "name": "filter",
169 "description": "A set of filters that restricts the events that will be sent to this listener."
170 },
171 {
172 "type": "array",
173 "optional": true,
174 "name": "extraInfoSpec",
175 "description": "Array of extra information that should be passed to the listener function.",
176 "items": {
177 "type": "string",
178 "enum": ["blocking", "requestBody"]
179 }
180 }
181 ],
182 "returns": {
183 "$ref": "BlockingResponse",
184 "description": "If \"blocking\" is specified in the \"extraInfoSpec\" parameter, the event listener should return an object of this type.",
185 "optional": true
186 }
187 },
188 {
189 "name": "onBeforeSendHeaders",
190 "nocompile": true,
191 "type": "function",
192 "description": "Fired before sending an HTTP request, once the request h eaders are available. This may occur after a TCP connection is made to the serve r, but before any HTTP data is sent. ",
193 "parameters": [
194 {
195 "type": "object",
196 "name": "details",
197 "properties": {
198 "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."},
199 "url": {"type": "string"},
200 "method": {"type": "string", "description": "Standard HTTP method. "},
201 "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."},
202 "parentFrameId": {"type": "integer", "description": "ID of frame t hat wraps the frame which sent the request. Set to -1 if no parent frame exists. "},
203 "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." },
204 "type": {"type": "string", "enum": ["main_frame", "sub_frame", "st ylesheet", "script", "image", "object", "xmlhttprequest", "other"], "description ": "How the requested resource will be used."},
205 "timeStamp": {"type": "number", "description": "The time when this signal is triggered, in milliseconds since the epoch."},
206 "requestHeaders": {"$ref": "HttpHeaders", "optional": true, "descr iption": "The HTTP request headers that are going to be sent out with this reque st."}
207 }
208 }
209 ],
210 "extraParameters": [
211 {
212 "$ref": "RequestFilter",
213 "name": "filter",
214 "description": "A set of filters that restricts the events that will be sent to this listener."
215 },
216 {
217 "type": "array",
218 "optional": true,
219 "name": "extraInfoSpec",
220 "description": "Array of extra information that should be passed to the listener function.",
221 "items": {
222 "type": "string",
223 "enum": ["requestHeaders", "blocking"]
224 }
225 }
226 ],
227 "returns": {
228 "$ref": "BlockingResponse",
229 "description": "If \"blocking\" is specified in the \"extraInfoSpec\" parameter, the event listener should return an object of this type.",
230 "optional": true
231 }
232 },
233 {
234 "name": "onSendHeaders",
235 "nocompile": true,
236 "type": "function",
237 "description": "Fired just before a request is going to be sent to the s erver (modifications of previous onBeforeSendHeaders callbacks are visible by th e time onSendHeaders is fired).",
238 "parameters": [
239 {
240 "type": "object",
241 "name": "details",
242 "properties": {
243 "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."},
244 "url": {"type": "string"},
245 "method": {"type": "string", "description": "Standard HTTP method. "},
246 "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."},
247 "parentFrameId": {"type": "integer", "description": "ID of frame t hat wraps the frame which sent the request. Set to -1 if no parent frame exists. "},
248 "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." },
249 "type": {"type": "string", "enum": ["main_frame", "sub_frame", "st ylesheet", "script", "image", "object", "xmlhttprequest", "other"], "description ": "How the requested resource will be used."},
250 "timeStamp": {"type": "number", "description": "The time when this signal is triggered, in milliseconds since the epoch."},
251 "requestHeaders": {"$ref": "HttpHeaders", "optional": true, "descr iption": "The HTTP request headers that have been sent out with this request."}
252 }
253 }
254 ],
255 "extraParameters": [
256 {
257 "$ref": "RequestFilter",
258 "name": "filter",
259 "description": "A set of filters that restricts the events that will be sent to this listener."
260 },
261 {
262 "type": "array",
263 "optional": true,
264 "name": "extraInfoSpec",
265 "description": "Array of extra information that should be passed to the listener function.",
266 "items": {
267 "type": "string",
268 "enum": ["requestHeaders"]
269 }
270 }
271 ]
272 },
273 {
274 "name": "onHeadersReceived",
275 "nocompile": true,
276 "type": "function",
277 "description": "Fired when HTTP response headers of a request have been received.",
278 "parameters": [
279 {
280 "type": "object",
281 "name": "details",
282 "properties": {
283 "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."},
284 "url": {"type": "string"},
285 "method": {"type": "string", "description": "Standard HTTP method. "},
286 "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."},
287 "parentFrameId": {"type": "integer", "description": "ID of frame t hat wraps the frame which sent the request. Set to -1 if no parent frame exists. "},
288 "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." },
289 "type": {"type": "string", "enum": ["main_frame", "sub_frame", "st ylesheet", "script", "image", "object", "xmlhttprequest", "other"], "description ": "How the requested resource will be used."},
290 "timeStamp": {"type": "number", "description": "The time when this signal is triggered, in milliseconds since the epoch."},
291 "statusLine": {"type": "string", "description": "HTTP status line of the response or the 'HTTP/0.9 200 OK' string for HTTP/0.9 responses (i.e., re sponses that lack a status line)."},
292 "responseHeaders": {"$ref": "HttpHeaders", "optional": true, "desc ription": "The HTTP response headers that have been received with this response. "}
293 }
294 }
295 ],
296 "extraParameters": [
297 {
298 "$ref": "RequestFilter",
299 "name": "filter",
300 "description": "A set of filters that restricts the events that will be sent to this listener."
301 },
302 {
303 "type": "array",
304 "optional": true,
305 "name": "extraInfoSpec",
306 "description": "Array of extra information that should be passed to the listener function.",
307 "items": {
308 "type": "string",
309 "enum": ["blocking", "responseHeaders"]
310 }
311 }
312 ],
313 "returns": {
314 "$ref": "BlockingResponse",
315 "description": "If \"blocking\" is specified in the \"extraInfoSpec\" parameter, the event listener should return an object of this type.",
316 "optional": true
317 }
318 },
319 {
320 "name": "onAuthRequired",
321 "nocompile": true,
322 "type": "function",
323 "description": "Fired when an authentication failure is received. The li stener has three options: it can provide authentication credentials, it can canc el the request and display the error page, or it can take no action on the chall enge. If bad user credentials are provided, this may be called multiple times fo r the same request.",
324 "parameters": [
325 {
326 "type": "object",
327 "name": "details",
328 "properties": {
329 "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."},
330 "url": {"type": "string"},
331 "method": {"type": "string", "description": "Standard HTTP method. "},
332 "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."},
333 "parentFrameId": {"type": "integer", "description": "ID of frame t hat wraps the frame which sent the request. Set to -1 if no parent frame exists. "},
334 "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." },
335 "type": {"type": "string", "enum": ["main_frame", "sub_frame", "st ylesheet", "script", "image", "object", "xmlhttprequest", "other"], "description ": "How the requested resource will be used."},
336 "timeStamp": {"type": "number", "description": "The time when this signal is triggered, in milliseconds since the epoch."},
337 "scheme": {"type": "string", "description": "The authentication sc heme, e.g. Basic or Digest."},
338 "realm": {"type": "string", "description": "The authentication rea lm provided by the server, if there is one.", "optional": true},
339 "challenger": {"type": "object", "description": "The server reques ting authentication.", "properties": {"host": {"type": "string"}, "port": {"type ": "integer"}}},
340 "isProxy": {"type": "boolean", "description": "True for Proxy-Auth enticate, false for WWW-Authenticate."},
341 "responseHeaders": {"$ref": "HttpHeaders", "optional": true, "desc ription": "The HTTP response headers that were received along with this response ."},
342 "statusLine": {"type": "string", "description": "HTTP status line of the response or the 'HTTP/0.9 200 OK' string for HTTP/0.9 responses (i.e., re sponses that lack a status line) or an empty string if there are no headers."}
343 }
344 },
345 {
346 "type": "function",
347 "optional": true,
348 "name": "callback",
349 "parameters": [
350 {"name": "response", "$ref": "BlockingResponse"}
351 ]
352 }
353 ],
354 "extraParameters": [
355 {
356 "$ref": "RequestFilter",
357 "name": "filter",
358 "description": "A set of filters that restricts the events that will be sent to this listener."
359 },
360 {
361 "type": "array",
362 "optional": true,
363 "name": "extraInfoSpec",
364 "description": "Array of extra information that should be passed to the listener function.",
365 "items": {
366 "type": "string",
367 "enum": ["responseHeaders", "blocking", "asyncBlocking"]
368 }
369 }
370 ],
371 "returns": {
372 "$ref": "BlockingResponse",
373 "description": "If \"blocking\" is specified in the \"extraInfoSpec\" parameter, the event listener should return an object of this type.",
374 "optional": true
375 }
376 },
377 {
378 "name": "onResponseStarted",
379 "nocompile": true,
380 "type": "function",
381 "description": "Fired when the first byte of the response body is receiv ed. For HTTP requests, this means that the status line and response headers are available.",
382 "parameters": [
383 {
384 "type": "object",
385 "name": "details",
386 "properties": {
387 "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."},
388 "url": {"type": "string"},
389 "method": {"type": "string", "description": "Standard HTTP method. "},
390 "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."},
391 "parentFrameId": {"type": "integer", "description": "ID of frame t hat wraps the frame which sent the request. Set to -1 if no parent frame exists. "},
392 "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." },
393 "type": {"type": "string", "enum": ["main_frame", "sub_frame", "st ylesheet", "script", "image", "object", "xmlhttprequest", "other"], "description ": "How the requested resource will be used."},
394 "timeStamp": {"type": "number", "description": "The time when this signal is triggered, in milliseconds since the epoch."},
395 "ip": {"type": "string", "optional": true, "description": "The ser ver IP address that the request was actually sent to. Note that it may be a lite ral IPv6 address."},
396 "fromCache": {"type": "boolean", "description": "Indicates if this response was fetched from disk cache."},
397 "statusCode": {"type": "integer", "description": "Standard HTTP st atus code returned by the server."},
398 "responseHeaders": {"$ref": "HttpHeaders", "optional": true, "desc ription": "The HTTP response headers that were received along with this response ."},
399 "statusLine": {"type": "string", "description": "HTTP status line of the response or the 'HTTP/0.9 200 OK' string for HTTP/0.9 responses (i.e., re sponses that lack a status line) or an empty string if there are no headers."}
400 }
401 }
402 ],
403 "extraParameters": [
404 {
405 "$ref": "RequestFilter",
406 "name": "filter",
407 "description": "A set of filters that restricts the events that will be sent to this listener."
408 },
409 {
410 "type": "array",
411 "optional": true,
412 "name": "extraInfoSpec",
413 "description": "Array of extra information that should be passed to the listener function.",
414 "items": {
415 "type": "string",
416 "enum": ["responseHeaders"]
417 }
418 }
419 ]
420 },
421 {
422 "name": "onBeforeRedirect",
423 "type": "function",
424 "nocompile": true,
425 "description": "Fired when a server-initiated redirect is about to occur .",
426 "parameters": [
427 {
428 "type": "object",
429 "name": "details",
430 "properties": {
431 "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."},
432 "url": {"type": "string"},
433 "method": {"type": "string", "description": "Standard HTTP method. "},
434 "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."},
435 "parentFrameId": {"type": "integer", "description": "ID of frame t hat wraps the frame which sent the request. Set to -1 if no parent frame exists. "},
436 "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." },
437 "type": {"type": "string", "enum": ["main_frame", "sub_frame", "st ylesheet", "script", "image", "object", "xmlhttprequest", "other"], "description ": "How the requested resource will be used."},
438 "timeStamp": {"type": "number", "description": "The time when this signal is triggered, in milliseconds since the epoch."},
439 "ip": {"type": "string", "optional": true, "description": "The ser ver IP address that the request was actually sent to. Note that it may be a lite ral IPv6 address."},
440 "fromCache": {"type": "boolean", "description": "Indicates if this response was fetched from disk cache."},
441 "statusCode": {"type": "integer", "description": "Standard HTTP st atus code returned by the server."},
442 "redirectUrl": {"type": "string", "description": "The new URL."},
443 "responseHeaders": {"$ref": "HttpHeaders", "optional": true, "desc ription": "The HTTP response headers that were received along with this redirect ."},
444 "statusLine": {"type": "string", "description": "HTTP status line of the response or the 'HTTP/0.9 200 OK' string for HTTP/0.9 responses (i.e., re sponses that lack a status line) or an empty string if there are no headers."}
445 }
446 }
447 ],
448 "extraParameters": [
449 {
450 "$ref": "RequestFilter",
451 "name": "filter",
452 "description": "A set of filters that restricts the events that will be sent to this listener."
453 },
454 {
455 "type": "array",
456 "optional": true,
457 "name": "extraInfoSpec",
458 "description": "Array of extra information that should be passed to the listener function.",
459 "items": {
460 "type": "string",
461 "enum": ["responseHeaders"]
462 }
463 }
464 ]
465 },
466 {
467 "name": "onCompleted",
468 "type": "function",
469 "nocompile": true,
470 "description": "Fired when a request is completed.",
471 "parameters": [
472 {
473 "type": "object",
474 "name": "details",
475 "properties": {
476 "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."},
477 "url": {"type": "string"},
478 "method": {"type": "string", "description": "Standard HTTP method. "},
479 "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."},
480 "parentFrameId": {"type": "integer", "description": "ID of frame t hat wraps the frame which sent the request. Set to -1 if no parent frame exists. "},
481 "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." },
482 "type": {"type": "string", "enum": ["main_frame", "sub_frame", "st ylesheet", "script", "image", "object", "xmlhttprequest", "other"], "description ": "How the requested resource will be used."},
483 "timeStamp": {"type": "number", "description": "The time when this signal is triggered, in milliseconds since the epoch."},
484 "ip": {"type": "string", "optional": true, "description": "The ser ver IP address that the request was actually sent to. Note that it may be a lite ral IPv6 address."},
485 "fromCache": {"type": "boolean", "description": "Indicates if this response was fetched from disk cache."},
486 "statusCode": {"type": "integer", "description": "Standard HTTP st atus code returned by the server."},
487 "responseHeaders": {"$ref": "HttpHeaders", "optional": true, "desc ription": "The HTTP response headers that were received along with this response ."},
488 "statusLine": {"type": "string", "description": "HTTP status line of the response or the 'HTTP/0.9 200 OK' string for HTTP/0.9 responses (i.e., re sponses that lack a status line) or an empty string if there are no headers."}
489 }
490 }
491 ],
492 "extraParameters": [
493 {
494 "$ref": "RequestFilter",
495 "name": "filter",
496 "description": "A set of filters that restricts the events that will be sent to this listener."
497 },
498 {
499 "type": "array",
500 "optional": true,
501 "name": "extraInfoSpec",
502 "description": "Array of extra information that should be passed to the listener function.",
503 "items": {
504 "type": "string",
505 "enum": ["responseHeaders"]
506 }
507 }
508 ]
509 },
510 {
511 "name": "onErrorOccurred",
512 "type": "function",
513 "description": "Fired when an error occurs.",
514 "parameters": [
515 {
516 "type": "object",
517 "name": "details",
518 "properties": {
519 "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."},
520 "url": {"type": "string"},
521 "method": {"type": "string", "description": "Standard HTTP method. "},
522 "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."},
523 "parentFrameId": {"type": "integer", "description": "ID of frame t hat wraps the frame which sent the request. Set to -1 if no parent frame exists. "},
524 "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." },
525 "type": {"type": "string", "enum": ["main_frame", "sub_frame", "st ylesheet", "script", "image", "object", "xmlhttprequest", "other"], "description ": "How the requested resource will be used."},
526 "timeStamp": {"type": "number", "description": "The time when this signal is triggered, in milliseconds since the epoch."},
527 "ip": {"type": "string", "optional": true, "description": "The ser ver IP address that the request was actually sent to. Note that it may be a lite ral IPv6 address."},
528 "fromCache": {"type": "boolean", "description": "Indicates if this response was fetched from disk cache."},
529 "error": {"type": "string", "description": "The error description. This string is <em>not</em> guaranteed to remain backwards compatible between r eleases. You must not parse and act based upon its content."}
530 }
531 }
532 ],
533 "extraParameters": [
534 {
535 "$ref": "RequestFilter",
536 "name": "filter",
537 "description": "A set of filters that restricts the events that will be sent to this listener."
538 }
539 ]
540 }
541 ]
542 }
543 ]
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/schemas.gypi ('k') | chrome/common/extensions/api/web_request_internal.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698