Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 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 // Namespace | |
| 6 var importer; | |
| 7 | |
| 8 /** | |
| 9 * Interface providing access to information about active import processes. | |
| 10 * | |
| 11 * @interface | |
| 12 */ | |
| 13 importer.ImportRunner = function() {}; | |
|
fukino
2017/05/17 10:49:19
Could you add an extern file for importer.ImportRu
oka
2017/05/17 14:39:29
Done.
| |
| 14 | |
| 15 /** | |
| 16 * Imports all media identified by scanResult. | |
| 17 * | |
| 18 * @param {!importer.ScanResult} scanResult | |
| 19 * @param {!importer.Destination} destination | |
| 20 * @param {!Promise<!DirectoryEntry>} directoryPromise | |
| 21 * | |
| 22 * @return {!importer.MediaImportHandler.ImportTask} The resulting import task. | |
| 23 */ | |
| 24 importer.ImportRunner.prototype.importFromScanResult; | |
| 25 | |
| 26 importer.MediaImportHandler; | |
| 27 | |
| 28 /** | |
| 29 * Note that this isn't an actual FileOperationManager.Task. It currently uses | |
| 30 * the FileOperationManager (and thus *spawns* an associated | |
| 31 * FileOperationManager.CopyTask) but this is a temporary state of affairs. | |
| 32 * | |
| 33 * @constructor | |
| 34 * @struct | |
| 35 */ | |
| 36 importer.MediaImportHandler.ImportTask = function() {}; | |
| 37 | |
| 38 /** @struct */ | |
| 39 importer.MediaImportHandler.ImportTask.prototype = { | |
| 40 /** @return {!Promise} Resolves when task | |
| 41 is complete, or cancelled, rejects on error. */ | |
| 42 get whenFinished() {} | |
| 43 }; | |
| 44 | |
| 45 /** | |
| 46 * Request cancellation of this task. An update will be sent to observers once | |
| 47 * the task is actually cancelled. | |
| 48 */ | |
| 49 importer.MediaImportHandler.ImportTask.prototype.requestCancel = function() {}; | |
| OLD | NEW |