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

Unified Diff: ui/file_manager/file_manager/foreground/js/file_manager_commands.js

Issue 2828633002: Compile file_selection and some other Files app files in gyp v2 (Closed)
Patch Set: Add TODO to depend on externs/ instead of background/. Created 3 years, 8 months 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 side-by-side diff with in-line comments
Download patch
Index: ui/file_manager/file_manager/foreground/js/file_manager_commands.js
diff --git a/ui/file_manager/file_manager/foreground/js/file_manager_commands.js b/ui/file_manager/file_manager/foreground/js/file_manager_commands.js
index 7e221e2869825410cc418a275af6800c669dce49..c8f683f0dc6eefe7d938298e776f7f5192fe47e9 100644
--- a/ui/file_manager/file_manager/foreground/js/file_manager_commands.js
+++ b/ui/file_manager/file_manager/foreground/js/file_manager_commands.js
@@ -313,10 +313,11 @@ CommandUtil.shouldShowMenuItemForEntry = function(volumeManager, entry) {
/**
* Handle of the command events.
* @param {!FileManager} fileManager FileManager.
+ * @param {!FileSelectionHandler} selectionHandler
* @constructor
* @struct
*/
-var CommandHandler = function(fileManager) {
+var CommandHandler = function(fileManager, selectionHandler) {
/**
* FileManager.
* @type {!FileManager}
@@ -346,6 +347,9 @@ var CommandHandler = function(fileManager) {
'directory-change', this.updateAvailability.bind(this));
fileManager.volumeManager.addEventListener(
'drive-connection-changed', this.updateAvailability.bind(this));
+ selectionHandler.addEventListener(
+ FileSelectionHandler.EventType.CHANGE_THROTTLED,
+ this.updateAvailability.bind(this));
};
/**

Powered by Google App Engine
This is Rietveld 408576698