Roll src/third_party/WebKit b3f094a:f697bbd (svn 194310:194313)
[chromium-blink-merge.git] / extensions / common / api / web_request_internal.json
blob4adcd06dacb97991fb7f4c7c1faa14416801bf6c
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     "types": [
13       {
14         "id": "AddEventListenerOptions",
15         "type": "string",
16         "enum": ["requestHeaders", "responseHeaders", "blocking", "asyncBlocking", "requestBody"]
17       }
18     ],
19     "functions": [
20       {
21         "name": "addEventListener",
22         "type": "function",
23         "description": "Used internally to implement the special form of addListener for the webRequest events.",
24         "parameters": [
25           {"type": "function", "name": "callback"},
26           {
27             "$ref": "webRequest.RequestFilter",
28             "name": "filter",
29             "description": "A set of filters that restricts the events that will be sent to this listener."
30           },
31           {
32             "type": "array",
33             "optional": true,
34             "name": "extraInfoSpec",
35             "description": "Array of extra information that should be passed to the listener function.",
36             "items": {
37               "$ref": "AddEventListenerOptions"
38             }
39           },
40           {"type": "string", "name": "eventName"},
41           {"type": "string", "name": "subEventName"},
42           {"type": "integer", "name": "webViewInstanceId"}
43         ]
44       },
45       {
46         "name": "eventHandled",
47         "type": "function",
48         "description": "Used internally to send a response for a blocked event.",
49         "parameters": [
50           {"type": "string", "name": "eventName"},
51           {"type": "string", "name": "subEventName"},
52           {"type": "string", "name": "requestId"},
53           {
54             "$ref": "webRequest.BlockingResponse",
55             "optional": true,
56             "name": "response"
57           }
58         ]
59       }
60     ]
61   }