Debian Codegraph @

externs/fileapi.js

raw symbols SCIP
1 /*
2 * Copyright 2010 Closure Compiler Authors
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 /**
17 * @fileoverview Definitions for objects in the File API, File Writer API, and
18 * File System API. Details of the API are at:
19 * http://www.w3.org/TR/FileAPI/
20 * http://www.w3.org/TR/file-writer-api/
21 * http://www.w3.org/TR/file-system-api/
22 *
23 * @externs
24 * @author [email protected] (David Barrett-Kahn)
25 * @author [email protected] (Michael Davidson)
26 */
27
28
29 /**
30 * @see http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob
31 * @param {Array.<ArrayBufferView|Blob|string>=} opt_blobParts
32 * @param {Object=} opt_options
33 * @constructor
34 * @nosideeffects
35 */
36 function Blob(opt_blobParts, opt_options) {}
37
38 /**
39 * @see http://www.w3.org/TR/FileAPI/#dfn-size
40 * @type {number}
41 */
42 Blob.prototype.size;
43
44 /**
45 * @see http://www.w3.org/TR/FileAPI/#dfn-type
46 * @type {string}
47 */
48 Blob.prototype.type;
49
50 /**
51 * @see http://www.w3.org/TR/FileAPI/#dfn-slice
52 * @param {number} start
53 * @param {number} length
54 * @return {!Blob}
55 * @nosideeffects
56 */
57 Blob.prototype.slice = function(start, length) {};
58
59 /**
60 * This replaces Blob.slice in Chrome since WebKit revision 84005.
61 * @see http://lists.w3.org/Archives/Public/public-webapps/2011AprJun/0222.html
62 * @param {number} start
63 * @param {number} end
64 * @return {!Blob}
65 * @nosideeffects
66 */
67 Blob.prototype.webkitSlice = function(start, end) {};
68
69 /**
70 * This replaces Blob.slice in Firefox.
71 * @see http://lists.w3.org/Archives/Public/public-webapps/2011AprJun/0222.html
72 * @param {number} start
73 * @param {number} end
74 * @return {!Blob}
75 * @nosideeffects
76 */
77 Blob.prototype.mozSlice = function(start, end) {};
78
79 /**
80 * @see http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob
81 * @type {function(new:Blob, Array.<ArrayBufferView|Blob|string>=, Object=)}
82 */
83 Window.prototype.Blob;
84
85 /**
86 * @see http://www.w3.org/TR/file-writer-api/#the-blobbuilder-interface
87 * @constructor
88 */
89 function BlobBuilder() {}
90
91 /**
92 * @see http://www.w3.org/TR/file-writer-api/#widl-BlobBuilder-append0
93 * @see http://www.w3.org/TR/file-writer-api/#widl-BlobBuilder-append1
94 * @see http://www.w3.org/TR/file-writer-api/#widl-BlobBuilder-append2
95 * @param {string|Blob|ArrayBuffer} data
96 * @param {string=} endings
97 */
98 BlobBuilder.prototype.append = function(data, endings) {};
99
100 /**
101 * @see http://www.w3.org/TR/file-writer-api/#widl-BlobBuilder-getBlob
102 * @param {string=} contentType
103 * @return {!Blob}
104 */
105 BlobBuilder.prototype.getBlob = function(contentType) {};
106
107
108 /**
109 * @see http://www.w3.org/TR/file-writer-api/#the-blobbuilder-interface
110 * @type {function(new:BlobBuilder)}
111 */
112 Window.prototype.BlobBuilder;
113
114 /**
115 * This has replaced BlobBuilder in Chrome since WebKit revision 84008.
116 * @see http://lists.w3.org/Archives/Public/public-webapps/2011AprJun/0222.html
117 * @constructor
118 */
119 function WebKitBlobBuilder() {}
120
121 /**
122 * @see http://www.w3.org/TR/file-writer-api/#widl-BlobBuilder-append0
123 * @see http://www.w3.org/TR/file-writer-api/#widl-BlobBuilder-append1
124 * @see http://www.w3.org/TR/file-writer-api/#widl-BlobBuilder-append2
125 * @param {string|Blob|ArrayBuffer} data
126 * @param {string=} endings
127 */
128 WebKitBlobBuilder.prototype.append = function(data, endings) {};
129
130 /**
131 * @see http://www.w3.org/TR/file-writer-api/#widl-BlobBuilder-getBlob
132 * @param {string=} contentType
133 * @return {!Blob}
134 */
135 WebKitBlobBuilder.prototype.getBlob = function(contentType) {};
136
137
138 /**
139 * @see http://www.w3.org/TR/file-writer-api/#the-blobbuilder-interface
140 * @type {function(new:WebKitBlobBuilder)}
141 */
142 Window.prototype.WebKitBlobBuilder;
143
144
145 /**
146 * @see http://www.w3.org/TR/file-system-api/#the-directoryentry-interface
147 * @constructor
148 * @extends {Entry}
149 */
150 function DirectoryEntry() {};
151
152 /**
153 * @see http://www.w3.org/TR/file-system-api/#widl-DirectoryEntry-createReader
154 * @return {!DirectoryReader}
155 */
156 DirectoryEntry.prototype.createReader = function() {};
157
158 /**
159 * @see http://www.w3.org/TR/file-system-api/#widl-DirectoryEntry-getFile
160 * @param {string} path
161 * @param {Object=} options
162 * @param {function(!FileEntry)=} successCallback
163 * @param {function(!FileError)=} errorCallback
164 */
165 DirectoryEntry.prototype.getFile = function(path, options, successCallback,
166 errorCallback) {};
167
168 /**
169 * @see http://www.w3.org/TR/file-system-api/#widl-DirectoryEntry-getDirectory
170 * @param {string} path
171 * @param {Object=} options
172 * @param {function(!DirectoryEntry)=} successCallback
173 * @param {function(!FileError)=} errorCallback
174 */
175 DirectoryEntry.prototype.getDirectory = function(path, options, successCallback,
176 errorCallback) {};
177
178 /**
179 * @see http://www.w3.org/TR/file-system-api/#widl-DirectoryEntry-removeRecursively
180 * @param {function()} successCallback
181 * @param {function(!FileError)=} errorCallback
182 */
183 DirectoryEntry.prototype.removeRecursively = function(successCallback,
184 errorCallback) {};
185
186 /**
187 * @see http://www.w3.org/TR/file-system-api/#the-directoryreader-interface
188 * @constructor
189 */
190 function DirectoryReader() {};
191
192 /**
193 * @see http://www.w3.org/TR/file-system-api/#widl-DirectoryReader-readEntries
194 * @param {function(!Array.<!Entry>)} successCallback
195 * @param {function(!FileError)=} errorCallback
196 */
197 DirectoryReader.prototype.readEntries = function(successCallback,
198 errorCallback) {};
199
200 /**
201 * @see http://www.w3.org/TR/file-system-api/#the-entry-interface
202 * @constructor
203 */
204 function Entry() {};
205
206 /**
207 * @see http://www.w3.org/TR/file-system-api/#widl-Entry-isFile
208 * @type {boolean}
209 */
210 Entry.prototype.isFile;
211
212 /**
213 * @see http://www.w3.org/TR/file-system-api/#widl-Entry-isDirectory
214 * @type {boolean}
215 */
216 Entry.prototype.isDirectory;
217
218 /**
219 * @see http://www.w3.org/TR/file-system-api/#widl-Entry-name
220 * @type {string}
221 */
222 Entry.prototype.name;
223
224 /**
225 * @see http://www.w3.org/TR/file-system-api/#widl-Entry-fullPath
226 * @type {string}
227 */
228 Entry.prototype.fullPath;
229
230 /**
231 * @see http://www.w3.org/TR/file-system-api/#widl-Entry-filesystem
232 * @type {!FileSystem}
233 */
234 Entry.prototype.filesystem;
235
236 /**
237 * @see http://www.w3.org/TR/file-system-api/#widl-Entry-moveTo
238 * @param {!DirectoryEntry} parent
239 * @param {string=} newName
240 * @param {function(!Entry)=} successCallback
241 * @param {function(!FileError)=} errorCallback
242 */
243 Entry.prototype.moveTo = function(parent, newName, successCallback,
244 errorCallback) {};
245
246 /**
247 * @see http://www.w3.org/TR/file-system-api/#widl-Entry-copyTo
248 * @param {!DirectoryEntry} parent
249 * @param {string=} newName
250 * @param {function(!Entry)=} successCallback
251 * @param {function(!FileError)=} errorCallback
252 */
253 Entry.prototype.copyTo = function(parent, newName, successCallback,
254 errorCallback) {};
255
256 /**
257 * @see http://www.w3.org/TR/file-system-api/#widl-Entry-toURL
258 * @param {string=} mimeType
259 * @return {string}
260 */
261 Entry.prototype.toURL = function(mimeType) {};
262
263 /**
264 * @see http://www.w3.org/TR/file-system-api/#widl-Entry-remove
265 * @param {function()} successCallback
266 * @param {function(!FileError)=} errorCallback
267 */
268 Entry.prototype.remove = function(successCallback, errorCallback) {};
269
270 /**
271 * @see http://www.w3.org/TR/file-system-api/#widl-Entry-getMetadata
272 * @param {function(!Metadata)} successCallback
273 * @param {function(!FileError)=} errorCallback
274 */
275 Entry.prototype.getMetadata = function(successCallback, errorCallback) {};
276
277 /**
278 * @see http://www.w3.org/TR/file-system-api/#widl-Entry-getParent
279 * @param {function(!Entry)} successCallback
280 * @param {function(!FileError)=} errorCallback
281 */
282 Entry.prototype.getParent = function(successCallback, errorCallback) {};
283
284 /**
285 * @see http://www.w3.org/TR/FileAPI/#dfn-file
286 * @constructor
287 * @extends {Blob}
288 */
289 function File() {}
290
291 /**
292 * Chrome uses this instead of name.
293 * @deprecated Use name instead.
294 * @type {string}
295 */
296 File.prototype.fileName;
297
298 /**
299 * Chrome uses this instead of size.
300 * @deprecated Use size instead.
301 * @type {string}
302 */
303 File.prototype.fileSize;
304
305 /**
306 * @see http://www.w3.org/TR/FileAPI/#dfn-name
307 * @type {string}
308 */
309 File.prototype.name;
310
311 /**
312 * @see http://www.w3.org/TR/FileAPI/#dfn-lastModifiedDate
313 * @type {Date}
314 */
315 File.prototype.lastModifiedDate;
316
317 /**
318 * @see http://www.w3.org/TR/file-system-api/#the-fileentry-interface
319 * @constructor
320 * @extends {Entry}
321 */
322 function FileEntry() {};
323
324 /**
325 * @see http://www.w3.org/TR/file-system-api/#widl-FileEntry-createWriter
326 * @param {function(!FileWriter)} successCallback
327 * @param {function(!FileError)=} errorCallback
328 */
329 FileEntry.prototype.createWriter = function(successCallback, errorCallback) {};
330
331 /**
332 * @see http://www.w3.org/TR/file-system-api/#widl-FileEntry-file
333 * @param {function(!File)} successCallback
334 * @param {function(!FileError)=} errorCallback
335 */
336 FileEntry.prototype.file = function(successCallback, errorCallback) {};
337
338 /**
339 * @see http://www.w3.org/TR/FileAPI/#FileErrorInterface
340 * @constructor
341 */
342 function FileError() {}
343
344 /**
345 * @see http://www.w3.org/TR/FileAPI/#dfn-NOT_FOUND_ERR
346 * @type {number}
347 */
348 FileError.prototype.NOT_FOUND_ERR = 1;
349
350 /** @type {number} */
351 FileError.NOT_FOUND_ERR = 1;
352
353 /**
354 * @see http://www.w3.org/TR/FileAPI/#dfn-SECURITY_ERR
355 * @type {number}
356 */
357 FileError.prototype.SECURITY_ERR = 2;
358
359 /** @type {number} */
360 FileError.SECURITY_ERR = 2;
361
362 /**
363 * @see http://www.w3.org/TR/FileAPI/#dfn-ABORT_ERR
364 * @type {number}
365 */
366 FileError.prototype.ABORT_ERR = 3;
367
368 /** @type {number} */
369 FileError.ABORT_ERR = 3;
370
371 /**
372 * @see http://www.w3.org/TR/FileAPI/#dfn-NOT_READABLE_ERR
373 * @type {number}
374 */
375 FileError.prototype.NOT_READABLE_ERR = 4;
376
377 /** @type {number} */
378 FileError.NOT_READABLE_ERR = 4;
379
380 /**
381 * @see http://www.w3.org/TR/FileAPI/#dfn-ENCODING_ERR
382 * @type {number}
383 */
384 FileError.prototype.ENCODING_ERR = 5;
385
386 /** @type {number} */
387 FileError.ENCODING_ERR = 5;
388
389 /**
390 * @see http://www.w3.org/TR/file-writer-api/#widl-FileError-NO_MODIFICATION_ALLOWED_ERR
391 * @type {number}
392 */
393 FileError.prototype.NO_MODIFICATION_ALLOWED_ERR = 6;
394
395 /** @type {number} */
396 FileError.NO_MODIFICATION_ALLOWED_ERR = 6;
397
398 /**
399 * @see http://www.w3.org/TR/file-writer-api/#widl-FileException-INVALID_STATE_ERR
400 * @type {number}
401 */
402 FileError.prototype.INVALID_STATE_ERR = 7;
403
404 /** @type {number} */
405 FileError.INVALID_STATE_ERR = 7;
406
407 /**
408 * @see http://www.w3.org/TR/file-writer-api/#widl-FileException-SYNTAX_ERR
409 * @type {number}
410 */
411 FileError.prototype.SYNTAX_ERR = 8;
412
413 /** @type {number} */
414 FileError.SYNTAX_ERR = 8;
415
416 /**
417 * @see http://www.w3.org/TR/file-system-api/#widl-FileError-INVALID_MODIFICATION_ERR
418 * @type {number}
419 */
420 FileError.prototype.INVALID_MODIFICATION_ERR = 9;
421
422 /** @type {number} */
423 FileError.INVALID_MODIFICATION_ERR = 9;
424
425 /**
426 * @see http://www.w3.org/TR/file-system-api/#widl-FileError-QUOTA_EXCEEDED_ERR
427 * @type {number}
428 */
429 FileError.prototype.QUOTA_EXCEEDED_ERR = 10;
430
431 /** @type {number} */
432 FileError.QUOTA_EXCEEDED_ERR = 10;
433
434 /**
435 * @see http://www.w3.org/TR/file-system-api/#widl-FileException-TYPE_MISMATCH_ERR
436 * @type {number}
437 */
438 FileError.prototype.TYPE_MISMATCH_ERR = 11;
439
440 /** @type {number} */
441 FileError.TYPE_MISMATCH_ERR = 11;
442
443 /**
444 * @see http://www.w3.org/TR/file-system-api/#widl-FileException-PATH_EXISTS_ERR
445 * @type {number}
446 */
447 FileError.prototype.PATH_EXISTS_ERR = 12;
448
449 /** @type {number} */
450 FileError.PATH_EXISTS_ERR = 12;
451
452 /**
453 * @see http://www.w3.org/TR/FileAPI/#dfn-code-exception
454 * @type {number}
455 */
456 FileError.prototype.code;
457
458 /**
459 * @see http://www.w3.org/TR/FileAPI/#dfn-filereader
460 * @constructor
461 * @implements {EventTarget}
462 */
463 function FileReader() {}
464
465 /** @override */
466 FileReader.prototype.addEventListener = function(type, listener, useCapture) {};
467
468 /** @override */
469 FileReader.prototype.removeEventListener = function(type, listener, useCapture)
470 {};
471
472 /** @override */
473 FileReader.prototype.dispatchEvent = function(evt) {};
474
475 /**
476 * @see http://www.w3.org/TR/FileAPI/#dfn-readAsArrayBuffer
477 * @param {!Blob} blob
478 */
479 FileReader.prototype.readAsArrayBuffer = function(blob) {};
480
481 /**
482 * @see http://www.w3.org/TR/FileAPI/#dfn-readAsBinaryStringAsync
483 * @param {!Blob} blob
484 */
485 FileReader.prototype.readAsBinaryString = function(blob) {};
486
487 /**
488 * @see http://www.w3.org/TR/FileAPI/#dfn-readAsText
489 * @param {!Blob} blob
490 * @param {string=} encoding
491 */
492 FileReader.prototype.readAsText = function(blob, encoding) {};
493
494 /**
495 * @see http://www.w3.org/TR/FileAPI/#dfn-readAsDataURL
496 * @param {!Blob} blob
497 */
498 FileReader.prototype.readAsDataURL = function(blob) {};
499
500 /**
501 * @see http://www.w3.org/TR/FileAPI/#dfn-abort
502 */
503 FileReader.prototype.abort = function() {};
504
505 /**
506 * @see http://www.w3.org/TR/FileAPI/#dfn-empty
507 * @type {number}
508 */
509 FileReader.prototype.EMPTY = 0;
510
511 /**
512 * @see http://www.w3.org/TR/FileAPI/#dfn-loading
513 * @type {number}
514 */
515 FileReader.prototype.LOADING = 1;
516
517 /**
518 * @see http://www.w3.org/TR/FileAPI/#dfn-done
519 * @type {number}
520 */
521 FileReader.prototype.DONE = 2;
522
523 /**
524 * @see http://www.w3.org/TR/FileAPI/#dfn-readystate
525 * @type {number}
526 */
527 FileReader.prototype.readyState;
528
529 /**
530 * @see http://www.w3.org/TR/FileAPI/#dfn-result
531 * @type {string|Blob|ArrayBuffer}
532 */
533 FileReader.prototype.result;
534
535 /**
536 * @see http://www.w3.org/TR/FileAPI/#dfn-error
537 * @type {FileError}
538 */
539 FileReader.prototype.error;
540
541 /**
542 * @see http://www.w3.org/TR/FileAPI/#dfn-onloadstart
543 * @type {?function(!ProgressEvent)}
544 */
545 FileReader.prototype.onloadstart;
546
547 /**
548 * @see http://www.w3.org/TR/FileAPI/#dfn-onprogress
549 * @type {?function(!ProgressEvent)}
550 */
551 FileReader.prototype.onprogress;
552
553 /**
554 * @see http://www.w3.org/TR/FileAPI/#dfn-onload
555 * @type {?function(!ProgressEvent)}
556 */
557 FileReader.prototype.onload;
558
559 /**
560 * @see http://www.w3.org/TR/FileAPI/#dfn-onabort
561 * @type {?function(!ProgressEvent)}
562 */
563 FileReader.prototype.onabort;
564
565 /**
566 * @see http://www.w3.org/TR/FileAPI/#dfn-onerror
567 * @type {?function(!ProgressEvent)}
568 */
569 FileReader.prototype.onerror;
570
571 /**
572 * @see http://www.w3.org/TR/FileAPI/#dfn-onloadend
573 * @type {?function(!ProgressEvent)}
574 */
575 FileReader.prototype.onloadend;
576
577 /**
578 * @see http://www.w3.org/TR/file-writer-api/#idl-def-FileSaver
579 * @constructor
580 */
581 function FileSaver() {};
582
583 /** @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-abort */
584 FileSaver.prototype.abort = function() {};
585
586 /**
587 * @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-INIT
588 * @type {number}
589 */
590 FileSaver.prototype.INIT = 0;
591
592 /**
593 * @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-WRITING
594 * @type {number}
595 */
596 FileSaver.prototype.WRITING = 1;
597
598 /**
599 * @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-DONE
600 * @type {number}
601 */
602 FileSaver.prototype.DONE = 2;
603
604 /**
605 * @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-readyState
606 * @type {number}
607 */
608 FileSaver.prototype.readyState;
609
610 /**
611 * @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-error
612 * @type {FileError}
613 */
614 FileSaver.prototype.error;
615
616 /**
617 * @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-onwritestart
618 * @type {?function(!ProgressEvent)}
619 */
620 FileSaver.prototype.onwritestart;
621
622 /**
623 * @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-onprogress
624 * @type {?function(!ProgressEvent)}
625 */
626 FileSaver.prototype.onprogress;
627
628 /**
629 * @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-onwrite
630 * @type {?function(!ProgressEvent)}
631 */
632 FileSaver.prototype.onwrite;
633
634 /**
635 * @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-onabort
636 * @type {?function(!ProgressEvent)}
637 */
638 FileSaver.prototype.onabort;
639
640 /**
641 * @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-onerror
642 * @type {?function(!ProgressEvent)}
643 */
644 FileSaver.prototype.onerror;
645
646 /**
647 * @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-onwriteend
648 * @type {?function(!ProgressEvent)}
649 */
650 FileSaver.prototype.onwriteend;
651
652 /**
653 * @see http://www.w3.org/TR/file-system-api/#the-filesystem-interface
654 * @constructor
655 */
656 function FileSystem() {}
657
658 /**
659 * @see http://www.w3.org/TR/file-system-api/#widl-FileSystem-name
660 * @type {string}
661 */
662 FileSystem.prototype.name;
663
664 /**
665 * @see http://www.w3.org/TR/file-system-api/#widl-FileSystem-root
666 * @type {!DirectoryEntry}
667 */
668 FileSystem.prototype.root;
669
670 /**
671 * @see http://www.w3.org/TR/file-writer-api/#idl-def-FileWriter
672 * @constructor
673 * @extends {FileSaver}
674 */
675 function FileWriter() {}
676
677 /**
678 * @see http://www.w3.org/TR/file-writer-api/#widl-FileWriter-position
679 * @type {number}
680 */
681 FileWriter.prototype.position;
682
683 /**
684 * @see http://www.w3.org/TR/file-writer-api/#widl-FileWriter-length
685 * @type {number}
686 */
687 FileWriter.prototype.length;
688
689 /**
690 * @see http://www.w3.org/TR/file-writer-api/#widl-FileWriter-write
691 * @param {!Blob} blob
692 */
693 FileWriter.prototype.write = function(blob) {};
694
695 /**
696 * @see http://www.w3.org/TR/file-writer-api/#widl-FileWriter-seek
697 * @param {number} offset
698 */
699 FileWriter.prototype.seek = function(offset) {};
700
701 /**
702 * @see http://www.w3.org/TR/file-writer-api/#widl-FileWriter-truncate
703 * @param {number} size
704 */
705 FileWriter.prototype.truncate = function(size) {};
706
707 /**
708 * LocalFileSystem interface, implemented by Window and WorkerGlobalScope.
709 * @see http://www.w3.org/TR/file-system-api/#idl-def-LocalFileSystem
710 * @constructor
711 */
712 function LocalFileSystem() {}
713
714 /**
715 * Metadata interface.
716 * @see http://www.w3.org/TR/file-system-api/#idl-def-Metadata
717 * @constructor
718 */
719 function Metadata() {}
720
721 /**
722 * @see http://www.w3.org/TR/file-system-api/#widl-Metadata-modificationTime
723 * @type {!Date}
724 */
725 Metadata.prototype.modificationTime;
726
727 /**
728 * @see http://www.w3.org/TR/file-system-api/#widl-Metadata-size
729 * @type {number}
730 */
731 Metadata.prototype.size;
732
733 /**
734 * @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-TEMPORARY
735 * @type {number}
736 */
737 Window.prototype.TEMPORARY = 0;
738
739 /**
740 * @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-PERSISTENT
741 * @type {number}
742 */
743 Window.prototype.PERSISTENT = 1;
744
745 /**
746 * @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-requestFileSystem
747 * @param {number} type
748 * @param {number} size
749 * @param {function(!FileSystem)} successCallback
750 * @param {function(!FileError)=} errorCallback
751 */
752 function requestFileSystem(type, size, successCallback, errorCallback) {}
753
754 /**
755 * @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-requestFileSystem
756 * @param {number} type
757 * @param {number} size
758 * @param {function(!FileSystem)} successCallback
759 * @param {function(!FileError)=} errorCallback
760 */
761 Window.prototype.requestFileSystem = function(type, size, successCallback,
762 errorCallback) {};
763
764 /**
765 * @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-resolveLocalFileSystemURI
766 * @param {string} uri
767 * @param {function(!Entry)} successCallback
768 * @param {function(!FileError)=} errorCallback
769 */
770 function resolveLocalFileSystemURI(uri, successCallback, errorCallback) {}
771
772 /**
773 * @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-resolveLocalFileSystemURI
774 * @param {string} uri
775 * @param {function(!Entry)} successCallback
776 * @param {function(!FileError)=} errorCallback
777 */
778 Window.prototype.resolveLocalFileSystemURI = function(uri, successCallback,
779 errorCallback) {}
780
781 /**
782 * This has replaced requestFileSystem in Chrome since WebKit revision 84224.
783 * @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-requestFileSystem
784 * @param {number} type
785 * @param {number} size
786 * @param {function(!FileSystem)} successCallback
787 * @param {function(!FileError)=} errorCallback
788 */
789 function webkitRequestFileSystem(type, size, successCallback, errorCallback) {}
790
791 /**
792 * This has replaced requestFileSystem in Chrome since WebKit revision 84224.
793 * @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-requestFileSystem
794 * @param {number} type
795 * @param {number} size
796 * @param {function(!FileSystem)} successCallback
797 * @param {function(!FileError)=} errorCallback
798 */
799 Window.prototype.webkitRequestFileSystem = function(type, size, successCallback,
800 errorCallback) {};
801
802 /**
803 * This has replaced resolveLocalFileSystemURI in Chrome since WebKit revision
804 * 84224.
805 * @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-resolveLocalFileSystemURI
806 * @param {string} uri
807 * @param {function(!Entry)} successCallback
808 * @param {function(!FileError)=} errorCallback
809 */
810 function webkitResolveLocalFileSystemURI(uri, successCallback, errorCallback) {}
811
812 /**
813 * This has replaced resolveLocalFileSystemURI in Chrome since WebKit revision
814 * 84224.
815 * @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-resolveLocalFileSystemURI
816 * @param {string} uri
817 * @param {function(!Entry)} successCallback
818 * @param {function(!FileError)=} errorCallback
819 */
820 Window.prototype.webkitResolveLocalFileSystemURI = function(uri, successCallback,
821 errorCallback) {}
822
823 // WindowBlobURIMethods interface, implemented by Window and WorkerGlobalScope.
824 // There are three APIs for this: the old specced API, the new specced API, and
825 // the webkit-prefixed API.
826 // @see http://www.w3.org/TR/FileAPI/#creating-revoking
827
828 /**
829 * @see http://www.w3.org/TR/FileAPI/#dfn-createObjectURL
830 * @param {!Object} obj
831 * @return {string}
832 */
833 function createObjectURL(obj) {};
834
835 /**
836 * @see http://www.w3.org/TR/FileAPI/#dfn-createObjectURL
837 * @param {!Object} obj
838 * @return {string}
839 */
840 Window.prototype.createObjectURL = function(obj) {};
841
842 /**
843 * @see http://www.w3.org/TR/FileAPI/#dfn-revokeObjectURL
844 * @param {string} url
845 */
846 function revokeObjectURL(url) {};
847
848 /**
849 * @see http://www.w3.org/TR/FileAPI/#dfn-revokeObjectURL
850 * @param {string} url
851 */
852 Window.prototype.revokeObjectURL = function(url) {};
853
854 /**
855 * @see http://www.w3.org/TR/FileAPI/#URL-object
856 * @constructor
857 */
858 function DOMURL() {}
859
860 /**
861 * @see http://www.w3.org/TR/FileAPI/#
862 * @type {!DOMURL}
863 */
864 Window.prototype.URL;
865
866 /**
867 * This has replaced URL in Chrome since WebKit revision 75739.
868 * @see http://www.w3.org/TR/FileAPI/#
869 * @type {!DOMURL}
870 */
871 Window.prototype.webkitURL;
872
873 /**
874 * @see http://www.w3.org/TR/FileAPI/#dfn-createObjectURL
875 * @param {!Object} obj
876 * @return {string}
877 */
878 DOMURL.prototype.createObjectURL = function(obj) {};
879
880 /**
881 * @see http://www.w3.org/TR/FileAPI/#dfn-revokeObjectURL
882 * @param {string} url
883 */
884 DOMURL.prototype.revokeObjectURL = function(url) {};
885
886 /**
887 * @see https://developers.google.com/chrome/whitepapers/storage
888 * @constructor
889 */
890 function StorageInfo() {}
891
892 /**
893 * @see https://developers.google.com/chrome/whitepapers/storage
894 * @type {number}
895 * */
896 StorageInfo.prototype.TEMPORARY = 0;
897
898 /**
899 * @see https://developers.google.com/chrome/whitepapers/storage
900 * @type {number}
901 */
902 StorageInfo.prototype.PERSISTENT = 1;
903
904 /**
905 * @see https://developers.google.com/chrome/whitepapers/storage#requestQuota
906 * @param {number} type
907 * @param {number} size
908 * @param {function(number)} successCallback
909 * @param {function(!DOMException)=} errorCallback
910 */
911 StorageInfo.prototype.requestQuota = function(type, size, successCallback,
912 errorCallback) {};
913
914 /**
915 * @see https://developers.google.com/chrome/whitepapers/storage#queryUsageAndQuota
916 * @param {number} type
917 * @param {function(number, number)} successCallback
918 * @param {function(!DOMException)=} errorCallback
919 */
920 StorageInfo.prototype.queryUsageAndQuota = function(type, successCallback,
921 errorCallback) {};
922
923 /**
924 * @see https://developers.google.com/chrome/whitepapers/storage
925 * @type {!StorageInfo}
926 */
927 Window.prototype.webkitStorageInfo;