| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 /** | 30 /** |
| 31 * @interface | 31 * @interface |
| 32 */ | 32 */ |
| 33 Bindings.OutputStreamDelegate = function() {}; | 33 Bindings.OutputStreamDelegate = function() {}; |
| 34 | 34 |
| 35 Bindings.OutputStreamDelegate.prototype = { | 35 Bindings.OutputStreamDelegate.prototype = { |
| 36 onTransferStarted: function() {}, | 36 onTransferStarted() {}, |
| 37 | 37 |
| 38 onTransferFinished: function() {}, | 38 onTransferFinished() {}, |
| 39 | 39 |
| 40 /** | 40 /** |
| 41 * @param {!Bindings.ChunkedReader} reader | 41 * @param {!Bindings.ChunkedReader} reader |
| 42 */ | 42 */ |
| 43 onChunkTransferred: function(reader) {}, | 43 onChunkTransferred(reader) {}, |
| 44 | 44 |
| 45 /** | 45 /** |
| 46 * @param {!Bindings.ChunkedReader} reader | 46 * @param {!Bindings.ChunkedReader} reader |
| 47 * @param {!Event} event | 47 * @param {!Event} event |
| 48 */ | 48 */ |
| 49 onError: function(reader, event) {}, | 49 onError(reader, event) {}, |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 /** | 52 /** |
| 53 * @interface | 53 * @interface |
| 54 */ | 54 */ |
| 55 Bindings.ChunkedReader = function() {}; | 55 Bindings.ChunkedReader = function() {}; |
| 56 | 56 |
| 57 Bindings.ChunkedReader.prototype = { | 57 Bindings.ChunkedReader.prototype = { |
| 58 /** | 58 /** |
| 59 * @return {number} | 59 * @return {number} |
| 60 */ | 60 */ |
| 61 fileSize: function() {}, | 61 fileSize() {}, |
| 62 | 62 |
| 63 /** | 63 /** |
| 64 * @return {number} | 64 * @return {number} |
| 65 */ | 65 */ |
| 66 loadedSize: function() {}, | 66 loadedSize() {}, |
| 67 | 67 |
| 68 /** | 68 /** |
| 69 * @return {string} | 69 * @return {string} |
| 70 */ | 70 */ |
| 71 fileName: function() {}, | 71 fileName() {}, |
| 72 | 72 |
| 73 cancel: function() {} | 73 cancel() {} |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 /** | 76 /** |
| 77 * @implements {Bindings.ChunkedReader} | 77 * @implements {Bindings.ChunkedReader} |
| 78 * @unrestricted | 78 * @unrestricted |
| 79 */ | 79 */ |
| 80 Bindings.ChunkedFileReader = class { | 80 Bindings.ChunkedFileReader = class { |
| 81 /** | 81 /** |
| 82 * @param {!File} file | 82 * @param {!File} file |
| 83 * @param {number} chunkSize | 83 * @param {number} chunkSize |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 if (callback) | 248 if (callback) |
| 249 callback(this); | 249 callback(this); |
| 250 if (!this._writeCallbacks.length) { | 250 if (!this._writeCallbacks.length) { |
| 251 if (this._closed) { | 251 if (this._closed) { |
| 252 Workspace.fileManager.removeEventListener(Workspace.FileManager.Events.A
ppendedToURL, this._onAppendDone, this); | 252 Workspace.fileManager.removeEventListener(Workspace.FileManager.Events.A
ppendedToURL, this._onAppendDone, this); |
| 253 Workspace.fileManager.close(this._fileName); | 253 Workspace.fileManager.close(this._fileName); |
| 254 } | 254 } |
| 255 } | 255 } |
| 256 } | 256 } |
| 257 }; | 257 }; |
| OLD | NEW |