tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

fileapi.js (24487B)


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