Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / common / extensions / api / webview.json
blobfbb467ff1454fafc8837e9640cb8a1df7a15101e
1 // Copyright (c) 2013 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": "webview",
8     "description": "none",
9     "types": [
10       {
11         "id": "DataTypeSet",
12         "type": "object",
13         "description": "A set of data types. Missing data types are interpreted as <code>false</code>.",
14         "properties": {
15           "appcache": {
16             "type": "boolean",
17             "optional": true,
18             "description": "Websites' appcaches."
19           },
20           "cookies": {
21             "type": "boolean",
22             "optional": true,
23             "description": "The browser's cookies."
24           },
25           "fileSystems": {
26             "type": "boolean",
27             "optional": true,
28             "description": "Websites' file systems."
29           },
30           "indexedDB": {
31             "type": "boolean",
32             "optional": true,
33             "description": "Websites' IndexedDB data."
34           },
35           "localStorage": {
36             "type": "boolean",
37             "optional": true,
38             "description": "Websites' local storage data."
39           },
40           "webSQL": {
41             "type": "boolean",
42             "optional": true,
43             "description": "Websites' WebSQL data."
44           }
45         }
46       },
47       {
48         "id": "RemovalOptions",
49         "type": "object",
50         "description": "Options that determine exactly what data will be removed.",
51         "properties": {
52           "since": {
53             "type": "number",
54             "optional": true,
55             "description": "Remove data accumulated on or after this date, represented in milliseconds since the epoch (accessible via the <code>getTime</code> method of the JavaScript <code>Date</code> object). If absent, defaults to 0 (which would remove all browsing data)."
56           }
57         }
58       }
59     ],
60     "functions": [
61       {
62         "name": "clearData",
63         "type": "function",
64         "description": "Clears various types of browsing data stored in a storage partition of a <webview>.",
65         "parameters": [
66           {
67             "type": "integer",
68             "name": "instanceId",
69             "description": "The instance ID of the guest <webview> process."
70           },
71           {
72             "$ref": "RemovalOptions",
73             "name": "options"
74           },
75           {
76             "name": "dataToRemove",
77             "$ref": "DataTypeSet",
78             "description": "The set of data types to remove."
79           },
80           {
81             "name": "callback",
82             "type": "function",
83             "description": "Called when deletion has completed.",
84             "optional": true,
85             "parameters": []
86           }
87         ]
88       },
89       {
90         "name": "executeScript",
91         "type": "function",
92         "description": "Injects JavaScript code into a <webview> page.",
93         "parameters": [
94           {
95             "type": "integer",
96             "name": "instanceId",
97             "description": "The instance ID of the guest <webview> process."
98           },
99           {
100             "$ref": "tabs.InjectDetails",
101             "name": "details",
102             "description": "Details of the script to run."
103           },
104           {
105             "type": "function",
106             "name": "callback",
107             "optional": true,
108             "description": "Called after all the JavaScript has been executed.",
109             "parameters": [
110               {
111                 "name": "result",
112                 "optional": true,
113                 "type": "array",
114                 "items": {"type": "any", "minimum": 0},
115                 "description": "The result of the script in every injected frame."
116               }
117             ]
118           }
119         ]
120       },
121       {
122         "name": "insertCSS",
123         "type": "function",
124         "description": "Injects JavaScript code into a <webview> page.",
125         "parameters": [
126           {
127             "type": "integer",
128             "name": "instanceId",
129             "description": "The instance ID of the guest <webview> process."
130           },
131           {
132             "$ref": "tabs.InjectDetails",
133             "name": "details",
134             "description": "Details of the script to run."
135           },
136           {
137             "type": "function",
138             "name": "callback",
139             "optional": true,
140             "description": "Called after all the JavaScript has been executed.",
141             "parameters": [
142               {
143                 "name": "result",
144                 "optional": true,
145                 "type": "array",
146                 "items": {"type": "any", "minimum": 0},
147                 "description": "The result of the script in every injected frame."
148               }
149             ]
150           }
151         ]
152       },
153       {
154         "name": "captureVisibleRegion",
155         "type": "function",
156         "description": "Captures the visible area of the currently loaded page inside <webview>.",
157         "parameters": [
158           {
159             "type": "integer",
160             "name": "instanceId",
161             "description": "The instance ID of the guest <webview> process."
162           },
163           {
164             "$ref": "types.ImageDetails",
165             "name": "options",
166             "optional": true
167           },
168           {
169             "type": "function", "name": "callback", "parameters": [
170               {"type": "string", "name": "dataUrl", "description": "A data URL which encodes an image of the visible area of the captured tab. May be assigned to the 'src' property of an HTML Image element for display."}
171             ]
172           }
173         ]
174       },
175       {
176         "name": "go",
177         "type": "function",
178         "parameters": [
179           {
180             "type": "integer",
181             "name": "instanceId"
182           },
183           {
184             "type": "integer",
185             "name": "relativeIndex"
186           }
187         ]
188       },
189       {
190         "name": "overrideUserAgent",
191         "type": "function",
192         "parameters": [
193           {
194             "type": "integer",
195             "name": "instanceId"
196           },
197           {
198             "type": "string",
199             "name": "userAgentOverride"
200           }
201         ]
202       },
203       {
204         "name": "reload",
205         "type": "function",
206         "parameters": [
207           {
208             "type": "integer",
209             "name": "instanceId"
210           }
211         ]
212       },
213       {
214         "name": "setPermission",
215         "type": "function",
216         "parameters": [
217           {
218             "type": "integer",
219             "name": "instanceId"
220           },
221           {
222             "type": "integer",
223             "name": "requestId"
224           },
225           {
226             "type": "string",
227             "name": "action",
228             "enum": ["allow", "deny", "default"]
229           },
230           {
231             "type": "string",
232             "name": "userInput",
233             "optional": true
234           },
235           {
236             "type": "function",
237             "name": "callback",
238             "optional": true,
239             "parameters": [
240               {
241                 "name": "allowed",
242                 "type": "boolean"
243               }
244             ]
245           }
246         ]
247       },
248       {
249         "name": "stop",
250         "type": "function",
251         "parameters": [
252           {
253             "type": "integer",
254             "name": "instanceId"
255           }
256         ]
257       },
258       {
259         "name": "terminate",
260         "type": "function",
261         "parameters": [
262           {
263             "type": "integer",
264             "name": "instanceId"
265           }
266         ]
267       }
268     ]
269   }