Upstream version 11.40.271.0
[platform/framework/web/crosswalk.git] / src / ui / file_manager / externs / webview_tag.js
1 // Copyright 2014 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  * @typedef {{
7  *   since: (number|undefined)
8  * }}
9  * @see https://developer.chrome.com/apps/tags/webview#type-ClearDataOptions
10  */
11 var ClearDataOptions;
12
13 /**
14  * @typedef {{
15  *   appcache: (boolean|undefined),
16  *   cookies: (boolean|undefined),
17  *   fileSystems: (boolean|undefined),
18  *   indexedDB: (boolean|undefined),
19  *   localStorage: (boolean|undefined),
20  *   webSQL: (boolean|undefined)
21  * }}
22  * @see https://developer.chrome.com/apps/tags/webview#type-ClearDataTypeSet
23  */
24 var ClearDataTypeSet;
25
26 /**
27  * @typedef {{
28  *   code: (string|undefined),
29  *   file: (string|undefined)
30  * }}
31  * @see https://developer.chrome.com/apps/tags/webview#type-InjectDetails
32  */
33 var InjectDetails;
34
35 /**
36  * @constructor
37  * @see https://developer.chrome.com/apps/tags/webview#type-ContentWindow
38  */
39 function ContentWindow() {}
40
41 /**
42  * @param {?} message
43  * @param {string} targetOrigin
44  */
45 ContentWindow.prototype.postMessage = function(message, targetOrigin) {};
46
47 /**
48  * @constructor
49  * @see https://developer.chrome.com/apps/tags/webview#type-DialogController
50  */
51 function DialogController() {}
52
53 /**
54  * @param {string} response
55  */
56 DialogController.prototype.ok = function(response) {};
57
58 DialogController.prototype.cancel = function() {};
59
60 /**
61  * @typedef {{
62  *   numberOfMatches: number,
63  *   activeMatchOrdinal: number,
64  *   selectionRect: SelectionRect,
65  *   canceled: boolean
66  * }}
67  * @see https://developer.chrome.com/apps/tags/webview#type-FindCallbackResults
68  */
69 var FindCallbackResults;
70
71 /**
72  * @typedef {{
73  *   backward: (boolean|undefined),
74  *   matchCase: (boolean|undefined)
75  * }}
76  * @see https://developer.chrome.com/apps/tags/webview#type-FindOptions
77  */
78 var FindOptions;
79
80 /**
81  * @constructor
82  * @see https://developer.chrome.com/apps/tags/webview#type-NewWindow
83  */
84 function NewWindow() {}
85
86 /**
87  * @param {!Object} webview
88  */
89 NewWindow.prototype.attach = function(webview) {};
90
91 NewWindow.prototype.discard = function() {};
92
93 /**
94  * @constructor
95  * @see https://developer.chrome.com/apps/tags/webview#type-MediaPermissionRequest
96  */
97 function MediaPermissionRequest() {}
98
99 /** @type {string} */
100 MediaPermissionRequest.prototype.url;
101
102 MediaPermissionRequest.prototype.allow = function() {};
103
104 MediaPermissionRequest.prototype.deny = function() {};
105
106 /**
107  * @constructor
108  * @see https://developer.chrome.com/apps/tags/webview#type-GeolocationPermissionRequest
109  */
110 function GeolocationPermissionRequest() {}
111
112 /** @type {string} */
113 GeolocationPermissionRequest.prototype.url;
114
115 GeolocationPermissionRequest.prototype.allow = function() {};
116
117 GeolocationPermissionRequest.prototype.deny = function() {};
118
119 /**
120  * @constructor
121  * @see https://developer.chrome.com/apps/tags/webview#type-PointerLockPermissionRequest
122  */
123 function PointerLockPermissionRequest() {}
124
125 /** @type {boolean} */
126 PointerLockPermissionRequest.prototype.userGesture;
127
128 /** @type {boolean} */
129 PointerLockPermissionRequest.prototype.lastUnlockedBySelf;
130
131 /** @type {string} */
132 PointerLockPermissionRequest.prototype.url;
133
134 /**
135  * @constructor
136  * @see https://developer.chrome.com/apps/tags/webview#type-DownloadPermissionRequest
137  */
138 function DownloadPermissionRequest() {}
139
140 /** @type {string} */
141 DownloadPermissionRequest.prototype.requestMethod;
142
143 /** @type {string} */
144 DownloadPermissionRequest.prototype.url;
145
146 DownloadPermissionRequest.prototype.allow = function() {};
147
148 DownloadPermissionRequest.prototype.deny = function() {};
149
150 /**
151  * @constructor
152  * @see https://developer.chrome.com/apps/tags/webview#type-FileSystemPermissionRequest
153  */
154 function FileSystemPermissionRequest() {}
155
156 /** @type {string} */
157 FileSystemPermissionRequest.prototype.url;
158
159 FileSystemPermissionRequest.prototype.allow = function() {};
160
161 FileSystemPermissionRequest.prototype.deny = function() {};
162
163 /**
164  * @constructor
165  * @see https://developer.chrome.com/apps/tags/webview#type-LoadPluginPermissionRequest
166  */
167 function LoadPluginPermissionRequest() {}
168
169 /** @type {string} */
170 LoadPluginPermissionRequest.prototype.identifier;
171
172 /** @type {string} */
173 LoadPluginPermissionRequest.prototype.name;
174
175 LoadPluginPermissionRequest.prototype.allow = function() {};
176
177 LoadPluginPermissionRequest.prototype.deny = function() {};
178
179 /**
180  * @typedef {{
181  *   left: number,
182  *   top: number,
183  *   width: number,
184  *   height: number
185  * }}
186  */
187 var SelectionRect;
188
189 /**
190  * @constructor
191  * @see https://developer.chrome.com/apps/tags/webview#type-WebRequestEventInteface
192  */
193 function WebRequestEventInteface() {}
194
195 /**
196  * @constructor
197  * @extends {HTMLIFrameElement}
198  */
199 function WebView() {}
200
201 /**
202  * @type {ContentWindow}
203  * @see https://developer.chrome.com/apps/tags/webview#property-contentWindow
204  */
205 WebView.prototype.contentWindow;
206
207 /**
208  * @type {!WebRequestEventInteface}
209  * @see https://developer.chrome.com/apps/tags/webview#property-request
210  */
211 WebView.prototype.request;
212
213 /**
214  * @see https://developer.chrome.com/apps/tags/webview#method-back
215  */
216 WebView.prototype.back = function() {};
217
218 /**
219  * @return {boolean}
220  * @see https://developer.chrome.com/apps/tags/webview#method-canGoBack
221  */
222 WebView.prototype.canGoBack = function() {};
223
224 /**
225  * @return {boolean}
226  * @see https://developer.chrome.com/apps/tags/webview#method-canGoBack
227  */
228 WebView.prototype.canGoForward = function() {};
229
230 /**
231  * @param {ClearDataOptions} options
232  * @param {ClearDataTypeSet} types
233  * @param {Function=} opt_callback
234  * @see https://developer.chrome.com/apps/tags/webview#method-clearData
235  */
236 WebView.prototype.clearData = function(options, types, opt_callback) {};
237
238 /**
239  * @param {InjectDetails} details
240  * @param {Function=} opt_callback
241  * @see https://developer.chrome.com/apps/tags/webview#method-executeScript
242  */
243 WebView.prototype.executeScript = function(details, opt_callback) {};
244
245 /**
246  * @param {string} searchText
247  * @param {FindOptions=} opt_options
248  * @param {Function=} opt_callback
249  * @see https://developer.chrome.com/apps/tags/webview#method-find
250  */
251 WebView.prototype.find = function(searchText, opt_options, opt_callback) {};
252
253 /**
254  * @see https://developer.chrome.com/apps/tags/webview#method-forward
255  */
256 WebView.prototype.forward = function() {};
257
258 /**
259  * @return {number}
260  * @see https://developer.chrome.com/apps/tags/webview#method-getProcessId
261  */
262 WebView.prototype.getProcessId = function() {};
263
264 /**
265  * @return {string}
266  * @see https://developer.chrome.com/apps/tags/webview#method-getUserAgent
267  */
268 WebView.prototype.getUserAgent = function() {};
269
270 /**
271  * @param {Function} callback
272  * @see https://developer.chrome.com/apps/tags/webview#method-getZoom
273  */
274 WebView.prototype.getZoom = function(callback) {};
275
276 /**
277  * @param {number} relativeIndex
278  * @param {Function=} opt_callback
279  * @see https://developer.chrome.com/apps/tags/webview#method-go
280  */
281 WebView.prototype.go = function(relativeIndex, opt_callback) {};
282
283 /**
284  * @param {InjectDetails} details
285  * @param {Function=} opt_callback
286  * @see https://developer.chrome.com/apps/tags/webview#method-insertCSS
287  */
288 WebView.prototype.insertCSS = function(details, opt_callback) {};
289
290 /**
291  * @return {boolean}
292  * @see https://developer.chrome.com/apps/tags/webview#method-isUserAgentOverridden
293  */
294 WebView.prototype.isUserAgentOverridden = function() {};
295
296 /**
297  * @see https://developer.chrome.com/apps/tags/webview#method-print
298  */
299 WebView.prototype.print = function() {};
300
301 /**
302  * @see https://developer.chrome.com/apps/tags/webview#method-reload
303  */
304 WebView.prototype.reload = function() {};
305
306 /**
307  * @param {string} userAgent
308  * @see https://developer.chrome.com/apps/tags/webview#method-setUserAgentOverride
309  */
310 WebView.prototype.setUserAgentOverride = function(userAgent) {};
311
312 /**
313  * @param {number} zoomFactor
314  * @param {Function=} opt_callback
315  * @see https://developer.chrome.com/apps/tags/webview#method-setZoom
316  */
317 WebView.prototype.setZoom = function(zoomFactor, opt_callback) {};
318
319 /**
320  * @see https://developer.chrome.com/apps/tags/webview#method-stop
321  */
322 WebView.prototype.stop = function() {};
323
324 /**
325  * @param {?=} opt_action
326  */
327 WebView.prototype.stopFinding = function(opt_action) {};
328
329 /**
330  * @param {string} dataUrl
331  * @param {string} baseUrl
332  * @param {string=} opt_virtualUrl
333  * @see https://developer.chrome.com/apps/tags/webview#method-stopFinding
334  */
335 WebView.prototype.loadDataWithBaseUrl =
336     function(dataUrl, baseUrl, opt_virtualUrl) {};
337
338 /**
339  * @see https://developer.chrome.com/apps/tags/webview#method-terminate
340  */
341 WebView.prototype.terminate = function() {};
342
343 /** @type {!ChromeEvent} */
344 WebView.prototype.close;
345
346 /** @type {!ChromeEvent} */
347 WebView.prototype.consolemessage;
348
349 /** @type {!ChromeEvent} */
350 WebView.prototype.contentload;
351
352 /** @type {!ChromeEvent} */
353 WebView.prototype.dialog;
354
355 /** @type {!ChromeEvent} */
356 WebView.prototype.exit;
357
358 /** @type {!ChromeEvent} */
359 WebView.prototype.findupdate;
360
361 /** @type {!ChromeEvent} */
362 WebView.prototype.loadabort;
363
364 /** @type {!ChromeEvent} */
365 WebView.prototype.loadcommit;
366
367 /** @type {!ChromeEvent} */
368 WebView.prototype.loadredirect;
369
370 /** @type {!ChromeEvent} */
371 WebView.prototype.loadstart;
372
373 /** @type {!ChromeEvent} */
374 WebView.prototype.loadstop;
375
376 /** @type {!ChromeEvent} */
377 WebView.prototype.newwindow;
378
379 /** @type {!ChromeEvent} */
380 WebView.prototype.permissionrequest;
381
382 /** @type {!ChromeEvent} */
383 WebView.prototype.responsive;
384
385 /** @type {!ChromeEvent} */
386 WebView.prototype.sizechanged;
387
388 /** @type {!ChromeEvent} */
389 WebView.prototype.unresponsive;
390
391 /** @type {!ChromeEvent} */
392 WebView.prototype.zoomchange;