| 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 /** |
| 6 * @constructor |
| 7 * @struct |
| 8 * @extends {cr.EventTarget} |
| 9 */ |
| 10 function FileOperationManager() {} |
| 11 |
| 12 /** |
| 13 * Adds an event listener for the tasks. |
| 14 * @param {string} type The name of the event. |
| 15 * @param {EventListenerType} handler The handler for the event. This is called |
| 16 * when the event is dispatched. |
| 17 * @override |
| 18 */ |
| 19 FileOperationManager.prototype.addEventListener = function(type, handler) {}; |
| 20 |
| 21 /** |
| 22 * Removes an event listener for the tasks. |
| 23 * @param {string} type The name of the event. |
| 24 * @param {EventListenerType} handler The handler to be removed. |
| 25 * @override |
| 26 */ |
| 27 FileOperationManager.prototype.removeEventListener = function(type, handler) {}; |
| 28 |
| 29 /** |
| 30 * Says if there are any tasks in the queue. |
| 31 * @return {boolean} True, if there are any tasks. |
| 32 */ |
| 33 FileOperationManager.prototype.hasQueuedTasks = function() {}; |
| 34 |
| 35 /** |
| 36 * Requests the specified task to be canceled. |
| 37 * @param {string} taskId ID of task to be canceled. |
| 38 */ |
| 39 FileOperationManager.prototype.requestTaskCancel = function(taskId) {}; |
| 40 |
| 41 /** |
| 42 * Filters the entry in the same directory |
| 43 * |
| 44 * @param {Array<Entry>} sourceEntries Entries of the source files. |
| 45 * @param {DirectoryEntry|FakeEntry} targetEntry The destination entry of the |
| 46 * target directory. |
| 47 * @param {boolean} isMove True if the operation is "move", otherwise (i.e. |
| 48 * if the operation is "copy") false. |
| 49 * @return {Promise} Promise fulfilled with the filtered entry. This is not |
| 50 * rejected. |
| 51 */ |
| 52 FileOperationManager.prototype.filterSameDirectoryEntry = function( |
| 53 sourceEntries, targetEntry, isMove) {}; |
| 54 |
| 55 /** |
| 56 * Kick off pasting. |
| 57 * |
| 58 * @param {Array<Entry>} sourceEntries Entries of the source files. |
| 59 * @param {DirectoryEntry} targetEntry The destination entry of the target |
| 60 * directory. |
| 61 * @param {boolean} isMove True if the operation is "move", otherwise (i.e. |
| 62 * if the operation is "copy") false. |
| 63 * @param {string=} opt_taskId If the corresponding item has already created |
| 64 * at another places, we need to specify the ID of the item. If the |
| 65 * item is not created, FileOperationManager generates new ID. |
| 66 */ |
| 67 FileOperationManager.prototype.paste = function( |
| 68 sourceEntries, targetEntry, isMove, opt_taskId) {}; |
| 69 |
| 70 /** |
| 71 * Schedules the files deletion. |
| 72 * |
| 73 * @param {Array<Entry>} entries The entries. |
| 74 */ |
| 75 FileOperationManager.prototype.deleteEntries = function(entries) {}; |
| 76 |
| 77 /** |
| 78 * Creates a zip file for the selection of files. |
| 79 * |
| 80 * @param {!DirectoryEntry} dirEntry The directory containing the selection. |
| 81 * @param {!Array<!Entry>} selectionEntries The selected entries. |
| 82 */ |
| 83 FileOperationManager.prototype.zipSelection = function( |
| 84 dirEntry, selectionEntries) {}; |
| 85 |
| 86 /** |
| 87 * Generates new task ID. |
| 88 * |
| 89 * @return {string} New task ID. |
| 90 */ |
| 91 FileOperationManager.prototype.generateTaskId = function() {}; |
| OLD | NEW |