Chromium Code Reviews| Index: ui/file_manager/file_manager/foreground/js/file_manager.js |
| diff --git a/ui/file_manager/file_manager/foreground/js/file_manager.js b/ui/file_manager/file_manager/foreground/js/file_manager.js |
| index 82ffcf3c1ff9c7c54942c37db64aff26238b9834..d3e92b51209a0871f0ec0823d8d36c0f7caa37ec 100644 |
| --- a/ui/file_manager/file_manager/foreground/js/file_manager.js |
| +++ b/ui/file_manager/file_manager/foreground/js/file_manager.js |
| @@ -947,12 +947,14 @@ var BOTTOM_MARGIN_FOR_PREVIEW_PANEL_PX = 52; |
| 'entries-changed', this.onEntriesChangedBound_); |
| var controller = this.fileTransferController_ = |
| - new FileTransferController(this.document_, |
| - this.fileOperationManager_, |
| - this.metadataCache_, |
| - this.directoryModel_, |
| - this.volumeManager_, |
| - this.ui_.multiProfileShareDialog); |
| + new FileTransferController( |
| + this.document_, |
| + this.fileOperationManager_, |
| + this.metadataCache_, |
| + this.directoryModel_, |
| + this.volumeManager_, |
| + this.ui_.multiProfileShareDialog, |
| + this.backgroundPage_.background.progressCenter); |
| controller.attachDragSource(this.table_.list); |
| controller.attachFileListDropTarget(this.table_.list); |
| controller.attachDragSource(this.grid_); |
| @@ -2817,9 +2819,20 @@ var BOTTOM_MARGIN_FOR_PREVIEW_PANEL_PX = 52; |
| this.directoryModel_.dispose(); |
| if (this.volumeManager_) |
| this.volumeManager_.dispose(); |
| - if (this.progressCenterPanel_) |
| + for (var i = 0; |
| + i < this.fileTransferController_.pendingTaskId.length; |
| + ++i) { |
|
hirono
2014/09/17 03:33:20
nit: Usually i++ in JavaScript.
iseki
2014/09/17 04:08:47
Done.
|
| + var taskId = this.fileTransferController_.pendingTaskId[i]; |
| + var item = |
| + this.backgroundPage_.background.progressCenter.getItemById(taskId); |
| + item.message = ''; |
| + item.state = ProgressItemState.CANCELED; |
| + this.backgroundPage_.background.progressCenter.updateItem(item); |
| + } |
| + if (this.progressCenterPanel_) { |
| this.backgroundPage_.background.progressCenter.removePanel( |
| this.progressCenterPanel_); |
| + } |
| if (this.fileOperationManager_) { |
| if (this.onCopyProgressBound_) { |
| this.fileOperationManager_.removeEventListener( |