OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @param {DialogType} dialogType | 6 * @param {DialogType} dialogType |
7 * @param {!VolumeManagerWrapper} volumeManager | 7 * @param {!VolumeManagerWrapper} volumeManager |
8 * @param {!FileManagerUI} ui | 8 * @param {!FileManagerUI} ui |
9 * @param {!MetadataModel} metadataModel | 9 * @param {!MetadataModel} metadataModel |
10 * @param {!DirectoryModel} directoryModel | 10 * @param {!DirectoryModel} directoryModel |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
91 this.tasks_ = null; | 91 this.tasks_ = null; |
92 | 92 |
93 ui.taskMenuButton.addEventListener( | 93 ui.taskMenuButton.addEventListener( |
94 'select', this.onTaskItemClicked_.bind(this)); | 94 'select', this.onTaskItemClicked_.bind(this)); |
95 this.selectionHandler_.addEventListener( | 95 this.selectionHandler_.addEventListener( |
96 FileSelectionHandler.EventType.CHANGE, | 96 FileSelectionHandler.EventType.CHANGE, |
97 this.onSelectionChanged_.bind(this)); | 97 this.onSelectionChanged_.bind(this)); |
98 this.selectionHandler_.addEventListener( | 98 this.selectionHandler_.addEventListener( |
99 FileSelectionHandler.EventType.CHANGE_THROTTLED, | 99 FileSelectionHandler.EventType.CHANGE_THROTTLED, |
100 this.onSelectionChangeThrottled_.bind(this)); | 100 this.onSelectionChangeThrottled_.bind(this)); |
101 chrome.fileManagerPrivate.onAppsUpdated.addListener( | |
102 this.onSelectionChangeThrottled_.bind(this)); | |
fukino
2016/11/21 08:57:50
Direct wiring to onSelectionChangeThrottled_ looks
oka
2016/11/21 09:14:47
That's exactly what onSelectionChangeThrottled_ do
fukino
2016/11/21 09:27:29
sgtm
| |
101 } | 103 } |
102 | 104 |
103 /** | 105 /** |
104 * Cached the temporary disabled task item. Used inside | 106 * Cached the temporary disabled task item. Used inside |
105 * FileSelectionHandler.createTemporaryDisabledTaskItem_(). | 107 * FileSelectionHandler.createTemporaryDisabledTaskItem_(). |
106 * @type {Object} | 108 * @type {Object} |
107 * @private | 109 * @private |
108 */ | 110 */ |
109 TaskController.cachedDisabledTaskItem_ = null; | 111 TaskController.cachedDisabledTaskItem_ = null; |
110 | 112 |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
387 this.metadataModel_.get([entry], ['contentMimeType']).then( | 389 this.metadataModel_.get([entry], ['contentMimeType']).then( |
388 function(props) { | 390 function(props) { |
389 FileTasks.create( | 391 FileTasks.create( |
390 this.volumeManager_, this.metadataModel_, this.directoryModel_, | 392 this.volumeManager_, this.metadataModel_, this.directoryModel_, |
391 this.ui_, [entry], [props[0].contentMimeType || null]) | 393 this.ui_, [entry], [props[0].contentMimeType || null]) |
392 .then(function(tasks) { | 394 .then(function(tasks) { |
393 tasks.executeDefault(); | 395 tasks.executeDefault(); |
394 }); | 396 }); |
395 }.bind(this)); | 397 }.bind(this)); |
396 }; | 398 }; |
OLD | NEW |