Blink roll 25b6bd3a7a131ffe68d809546ad1a20707915cdc:3a503f41ae42e5b79cfcd2ff10e65afde...
[chromium-blink-merge.git] / extensions / common / api / web_request_internal.json
blob6861f5db17e9e0f4055cb923517ccfd84b138386
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.
6   {
7     "namespace": "webRequestInternal",
8     "description": "none",
9     "compiler_options": {
10       "implemented_in": "extensions/browser/api/web_request/web_request_api.h"
11     },
12     "functions": [
13       {
14         "name": "addEventListener",
15         "type": "function",
16         "description": "Used internally to implement the special form of addListener for the webRequest events.",
17         "parameters": [
18           {"type": "function", "name": "callback"},
19           {
20             "$ref": "webRequest.RequestFilter",
21             "name": "filter",
22             "description": "A set of filters that restricts the events that will be sent to this listener."
23           },
24           {
25             "type": "array",
26             "optional": true,
27             "name": "extraInfoSpec",
28             "description": "Array of extra information that should be passed to the listener function.",
29             "items": {
30               "type": "string",
31               "enum": ["requestHeaders", "responseHeaders", "blocking", "asyncBlocking", "requestBody"]
32             }
33           },
34           {"type": "string", "name": "eventName"},
35           {"type": "string", "name": "subEventName"},
36           {"type": "integer", "name": "webViewInstanceId"}
37         ]
38       },
39       {
40         "name": "eventHandled",
41         "type": "function",
42         "description": "Used internally to send a response for a blocked event.",
43         "parameters": [
44           {"type": "string", "name": "eventName"},
45           {"type": "string", "name": "subEventName"},
46           {"type": "string", "name": "requestId"},
47           {
48             "$ref": "webRequest.BlockingResponse",
49             "optional": true,
50             "name": "response"
51           }
52         ]
53       }
54     ]
55   }