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

Unified Diff: chrome/browser/resources/file_manager/js/file_manager_commands.js

Issue 13779006: Fixed gear menu navigation using keyboard. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Applied the changes to the new interface html. Created 7 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: chrome/browser/resources/file_manager/js/file_manager_commands.js
diff --git a/chrome/browser/resources/file_manager/js/file_manager_commands.js b/chrome/browser/resources/file_manager/js/file_manager_commands.js
index 8fa52d82a86c995c4e19ec548658c9301359361e..e9f64898bd770e334399caff78befdde15196628 100644
--- a/chrome/browser/resources/file_manager/js/file_manager_commands.js
+++ b/chrome/browser/resources/file_manager/js/file_manager_commands.js
@@ -53,6 +53,17 @@ CommandUtil.canExecuteVisibleOnDriveOnly = function(event, fileManager) {
};
/**
+ * Checks if command should be visible on drive with pressing ctrl key.
+ * @param {Event} event Command event to mark.
+ * @param {FileManager} fileManager FileManager to use.
+ */
+CommandUtil.canExecuteVisibleOnDriveWithCtrlKeyOnly =
+ function(event, fileManager) {
+ event.canExecute = fileManager.isOnDrive() && fileManager.isCtrlKeyPressed();
+ event.command.setHidden(!event.canExecute);
+};
+
+/**
* Returns a single selected/passed entry or null.
* @param {Event} event Command event.
* @param {FileManager} fileManager FileManager to use.
@@ -330,7 +341,7 @@ Commands.driveClearCacheCommand = {
execute: function() {
chrome.fileBrowserPrivate.clearDriveCache();
},
- canExecute: CommandUtil.canExecuteVisibleOnDriveOnly
+ canExecute: CommandUtil.canExecuteVisibleOnDriveWithCtrlKeyOnly
};
/**
@@ -340,7 +351,7 @@ Commands.driveReloadCommand = {
execute: function() {
chrome.fileBrowserPrivate.reloadDrive();
},
- canExecute: CommandUtil.canExecuteVisibleOnDriveOnly
+ canExecute: CommandUtil.canExecuteVisibleOnDriveWithCtrlKeyOnly
};
/**
« no previous file with comments | « chrome/browser/resources/file_manager/js/file_manager.js ('k') | chrome/browser/resources/file_manager/main.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698