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

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

Issue 1134213006: Hide the "Add new services" menu from Files app when running as dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed tests. Created 5 years, 7 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 6463a9fe9d6cd5fbb6371087f0e10f50d0f4e3eb..b658b19ef8d20d0c54038a8bf04e0c02ef0652b1 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
@@ -1318,5 +1318,8 @@ CommandHandler.COMMANDS_['install-new-extension'] = /** @type {Command} */ ({
fileManager.providersModel.requestMount(assert(itemId));
});
},
- canExecute: CommandUtil.canExecuteAlways
+ canExecute: function(event, fileManager) {
+ event.canExecute = fileManager.dialogType === DialogType.FULL_PAGE;
+ event.command.setHidden(!event.canExecute);
+ }
});

Powered by Google App Engine
This is Rietveld 408576698