Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: ui/file_manager/file_manager/foreground/js/task_controller.js

Issue 2513493002: Files App: Update the context menu when installed app is changed. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/closure_compiler/externs/file_manager_private.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 };
OLDNEW
« no previous file with comments | « third_party/closure_compiler/externs/file_manager_private.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698