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 1685b3534450d5cd98716f79e3326d0e0e72a44e..72e0d3f76bcde7dde8e6fd5e2d6342feed4db7e9 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 |
@@ -19,15 +19,15 @@ var Command = function() {}; |
/** |
* Handles the execute event. |
- * @param {Event} event Command event. |
- * @param {FileManager} fileManager FileManager. |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager. |
*/ |
Command.prototype.execute = function(event, fileManager) {}; |
/** |
* Handles the can execute event. |
- * @param {Event} event Can execute event. |
- * @param {FileManager} fileManager FileManager. |
+ * @param {!Event} event Can execute event. |
+ * @param {!FileManager} fileManager FileManager. |
*/ |
Command.prototype.canExecute = function(event, fileManager) {}; |
@@ -63,7 +63,7 @@ CommandUtil.getCommandEntry = function(element) { |
/** |
* Obtains an entry from the give navigation model item. |
- * @param {NavigationModelItem} item Navigation model item. |
+ * @param {!NavigationModelItem} item Navigation model item. |
* @return {Entry} Related entry. |
* @private |
*/ |
@@ -77,8 +77,8 @@ CommandUtil.getEntryFromNavigationModelItem_ = function(item) { |
/** |
* Checks if command can be executed on drive. |
- * @param {Event} event Command event to mark. |
- * @param {FileManager} fileManager FileManager to use. |
+ * @param {!Event} event Command event to mark. |
+ * @param {!FileManager} fileManager FileManager to use. |
*/ |
CommandUtil.canExecuteEnabledOnDriveOnly = function(event, fileManager) { |
event.canExecute = fileManager.isOnDrive(); |
@@ -87,8 +87,8 @@ CommandUtil.canExecuteEnabledOnDriveOnly = function(event, fileManager) { |
/** |
* Sets the command as visible only when the current volume is drive and it's |
* running as a normal app, not as a modal dialog. |
- * @param {Event} event Command event to mark. |
- * @param {FileManager} fileManager FileManager to use. |
+ * @param {!Event} event Command event to mark. |
+ * @param {!FileManager} fileManager FileManager to use. |
*/ |
CommandUtil.canExecuteVisibleOnDriveInNormalAppModeOnly = |
function(event, fileManager) { |
@@ -100,7 +100,7 @@ CommandUtil.canExecuteVisibleOnDriveInNormalAppModeOnly = |
/** |
* Sets as the command as always enabled. |
- * @param {Event} event Command event to mark. |
+ * @param {!Event} event Command event to mark. |
*/ |
CommandUtil.canExecuteAlways = function(event) { |
event.canExecute = true; |
@@ -108,8 +108,8 @@ CommandUtil.canExecuteAlways = function(event) { |
/** |
* Returns a single selected/passed entry or null. |
- * @param {Event} event Command event. |
- * @param {FileManager} fileManager FileManager to use. |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
* @return {FileEntry} The entry or null. |
*/ |
CommandUtil.getSingleEntry = function(event, fileManager) { |
@@ -181,9 +181,17 @@ CommandUtil.forceDefaultHandler = function(node, commandId) { |
* @type {Command} |
*/ |
CommandUtil.defaultCommand = /** @type {Command} */ ({ |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
execute: function(event, fileManager) { |
fileManager.document.execCommand(event.command.id); |
}, |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
canExecute: function(event, fileManager) { |
event.canExecute = fileManager.document.queryCommandEnabled( |
event.command.id); |
@@ -197,9 +205,17 @@ CommandUtil.defaultCommand = /** @type {Command} */ ({ |
*/ |
CommandUtil.createVolumeSwitchCommand = function(index) { |
return /** @type {Command} */ ({ |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
execute: function(event, fileManager) { |
fileManager.directoryTree.selectByIndex(index - 1); |
}, |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
canExecute: function(event, fileManager) { |
event.canExecute = index > 0 && |
index <= fileManager.directoryTree.items.length; |
@@ -225,13 +241,13 @@ CommandUtil.getOnlyOneSelectedDirectory = function(selection) { |
/** |
* Handle of the command events. |
- * @param {FileManager} fileManager FileManager. |
+ * @param {!FileManager} fileManager FileManager. |
* @constructor |
*/ |
var CommandHandler = function(fileManager) { |
/** |
* FileManager. |
- * @type {FileManager} |
+ * @type {!FileManager} |
* @private |
*/ |
this.fileManager_ = fileManager; |
@@ -284,7 +300,7 @@ CommandHandler.prototype.shouldIgnoreEvents_ = function() { |
/** |
* Handles command events. |
- * @param {Event} event Command event. |
+ * @param {!Event} event Command event. |
* @private |
*/ |
CommandHandler.prototype.onCommand_ = function(event) { |
@@ -296,7 +312,7 @@ CommandHandler.prototype.onCommand_ = function(event) { |
/** |
* Handles canExecute events. |
- * @param {Event} event Can execute event. |
+ * @param {!Event} event Can execute event. |
* @private |
*/ |
CommandHandler.prototype.onCanExecute_ = function(event) { |
@@ -321,8 +337,8 @@ CommandHandler.COMMANDS_ = {}; |
*/ |
CommandHandler.COMMANDS_['unmount'] = /** @type {Command} */ ({ |
/** |
- * @param {Event} event Command event. |
- * @param {FileManager} fileManager The file manager instance. |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager The file manager instance. |
*/ |
execute: function(event, fileManager) { |
var root = CommandUtil.getCommandEntry(event.target); |
@@ -345,7 +361,7 @@ CommandHandler.COMMANDS_['unmount'] = /** @type {Command} */ ({ |
errorCallback); |
}, |
/** |
- * @param {Event} event Command event. |
+ * @param {!Event} event Command event. |
* @this {CommandHandler} |
*/ |
canExecute: function(event, fileManager) { |
@@ -379,8 +395,8 @@ CommandHandler.COMMANDS_['unmount'] = /** @type {Command} */ ({ |
*/ |
CommandHandler.COMMANDS_['format'] = /** @type {Command} */ ({ |
/** |
- * @param {Event} event Command event. |
- * @param {FileManager} fileManager The file manager instance. |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager The file manager instance. |
*/ |
execute: function(event, fileManager) { |
var directoryModel = fileManager.directoryModel; |
@@ -400,8 +416,8 @@ CommandHandler.COMMANDS_['format'] = /** @type {Command} */ ({ |
} |
}, |
/** |
- * @param {Event} event Command event. |
- * @param {FileManager} fileManager The file manager instance. |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager The file manager instance. |
*/ |
canExecute: function(event, fileManager) { |
var directoryModel = fileManager.directoryModel; |
@@ -425,9 +441,17 @@ CommandHandler.COMMANDS_['format'] = /** @type {Command} */ ({ |
* @type {Command} |
*/ |
CommandHandler.COMMANDS_['new-folder'] = /** @type {Command} */ ({ |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
execute: function(event, fileManager) { |
fileManager.createNewFolder(); |
}, |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
canExecute: function(event, fileManager) { |
var directoryModel = fileManager.directoryModel; |
event.canExecute = !fileManager.isOnReadonlyDirectory() && |
@@ -442,6 +466,10 @@ CommandHandler.COMMANDS_['new-folder'] = /** @type {Command} */ ({ |
* @type {Command} |
*/ |
CommandHandler.COMMANDS_['new-window'] = /** @type {Command} */ ({ |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
execute: function(event, fileManager) { |
chrome.fileManagerPrivate.getProfiles( |
function(profiles, currentId, displayedId) { |
@@ -452,6 +480,10 @@ CommandHandler.COMMANDS_['new-window'] = /** @type {Command} */ ({ |
}); |
}); |
}, |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
canExecute: function(event, fileManager) { |
event.canExecute = |
fileManager.getCurrentDirectoryEntry() && |
@@ -464,9 +496,17 @@ CommandHandler.COMMANDS_['new-window'] = /** @type {Command} */ ({ |
* @type {Command} |
*/ |
CommandHandler.COMMANDS_['drive-sync-settings'] = /** @type {Command} */ ({ |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
execute: function(event, fileManager) { |
fileManager.toggleDriveSyncSettings(); |
}, |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
canExecute: function(event, fileManager) { |
event.canExecute = fileManager.shouldShowDriveSettings(); |
event.command.setHidden(!event.canExecute); |
@@ -478,9 +518,17 @@ CommandHandler.COMMANDS_['drive-sync-settings'] = /** @type {Command} */ ({ |
* @type {Command} |
*/ |
CommandHandler.COMMANDS_['drive-hosted-settings'] = /** @type {Command} */ ({ |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
execute: function(event, fileManager) { |
fileManager.toggleDriveHostedSettings(); |
}, |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
canExecute: function(event, fileManager) { |
event.canExecute = fileManager.shouldShowDriveSettings(); |
event.command.setHidden(!event.canExecute); |
@@ -492,6 +540,10 @@ CommandHandler.COMMANDS_['drive-hosted-settings'] = /** @type {Command} */ ({ |
* @type {Command} |
*/ |
CommandHandler.COMMANDS_['delete'] = /** @type {Command} */ ({ |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
execute: function(event, fileManager) { |
var entries = fileManager.getSelection().entries; |
var message = entries.length == 1 ? |
@@ -501,6 +553,10 @@ CommandHandler.COMMANDS_['delete'] = /** @type {Command} */ ({ |
fileManager.fileOperationManager.deleteEntries(entries); |
}); |
}, |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
canExecute: function(event, fileManager) { |
var selection = fileManager.getSelection(); |
event.canExecute = !fileManager.isOnReadonlyDirectory() && |
@@ -514,9 +570,17 @@ CommandHandler.COMMANDS_['delete'] = /** @type {Command} */ ({ |
* @type {Command} |
*/ |
CommandHandler.COMMANDS_['paste'] = /** @type {Command} */ ({ |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
execute: function(event, fileManager) { |
fileManager.document.execCommand(event.command.id); |
}, |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
canExecute: function(event, fileManager) { |
var fileTransferController = fileManager.fileTransferController; |
event.canExecute = (fileTransferController && |
@@ -532,6 +596,10 @@ CommandHandler.COMMANDS_['paste'] = /** @type {Command} */ ({ |
* @type {Command} |
*/ |
CommandHandler.COMMANDS_['paste-into-folder'] = /** @type {Command} */ ({ |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
execute: function(event, fileManager) { |
var selection = fileManager.getSelection(); |
var dest = CommandUtil.getOnlyOneSelectedDirectory(selection); |
@@ -547,6 +615,10 @@ CommandHandler.COMMANDS_['paste-into-folder'] = /** @type {Command} */ ({ |
fileManager.document.execCommand('paste'); |
fileManager.document.removeEventListener('paste', handler, true); |
}, |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
canExecute: function(event, fileManager) { |
var fileTransferController = fileManager.fileTransferController; |
event.canExecute = (fileTransferController && |
@@ -565,9 +637,17 @@ CommandHandler.COMMANDS_['copy'] = CommandUtil.defaultCommand; |
* @type {Command} |
*/ |
CommandHandler.COMMANDS_['rename'] = /** @type {Command} */ ({ |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
execute: function(event, fileManager) { |
fileManager.initiateRename(); |
}, |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
canExecute: function(event, fileManager) { |
var selection = fileManager.getSelection(); |
event.canExecute = !fileManager.isRenamingInProgress() && |
@@ -582,12 +662,20 @@ CommandHandler.COMMANDS_['rename'] = /** @type {Command} */ ({ |
* @type {Command} |
*/ |
CommandHandler.COMMANDS_['volume-help'] = /** @type {Command} */ ({ |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
execute: function(event, fileManager) { |
if (fileManager.isOnDrive()) |
util.visitURL(str('GOOGLE_DRIVE_HELP_URL')); |
else |
util.visitURL(str('FILES_APP_HELP_URL')); |
}, |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
canExecute: function(event, fileManager) { |
// Hides the help menu in modal dialog mode. It does not make much sense |
// because after all, users cannot view the help without closing, and |
@@ -605,6 +693,10 @@ CommandHandler.COMMANDS_['volume-help'] = /** @type {Command} */ ({ |
* @type {Command} |
*/ |
CommandHandler.COMMANDS_['drive-buy-more-space'] = /** @type {Command} */ ({ |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
execute: function(event, fileManager) { |
util.visitURL(str('GOOGLE_DRIVE_BUY_STORAGE_URL')); |
}, |
@@ -616,6 +708,10 @@ CommandHandler.COMMANDS_['drive-buy-more-space'] = /** @type {Command} */ ({ |
* @type {Command} |
*/ |
CommandHandler.COMMANDS_['drive-go-to-drive'] = /** @type {Command} */ ({ |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
execute: function(event, fileManager) { |
util.visitURL(str('GOOGLE_DRIVE_ROOT_URL')); |
}, |
@@ -627,6 +723,10 @@ CommandHandler.COMMANDS_['drive-go-to-drive'] = /** @type {Command} */ ({ |
* @type {Command} |
*/ |
CommandHandler.COMMANDS_['open-with'] = /** @type {Command} */ ({ |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
execute: function(event, fileManager) { |
var tasks = fileManager.getSelection().tasks; |
if (tasks) { |
@@ -638,6 +738,10 @@ CommandHandler.COMMANDS_['open-with'] = /** @type {Command} */ ({ |
}); |
} |
}, |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
canExecute: function(event, fileManager) { |
var tasks = fileManager.getSelection().tasks; |
event.canExecute = tasks && tasks.size() > 1; |
@@ -649,11 +753,19 @@ CommandHandler.COMMANDS_['open-with'] = /** @type {Command} */ ({ |
* @type {Command} |
*/ |
CommandHandler.COMMANDS_['search'] = /** @type {Command} */ ({ |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
execute: function(event, fileManager) { |
var element = fileManager.document.querySelector('#search-box input'); |
element.focus(); |
element.select(); |
}, |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
canExecute: function(event, fileManager) { |
event.canExecute = !fileManager.isRenamingInProgress(); |
} |
@@ -688,8 +800,8 @@ CommandHandler.COMMANDS_['volume-switch-9'] = |
*/ |
CommandHandler.COMMANDS_['toggle-pinned'] = /** @type {Command} */ ({ |
/** |
- * @param {Event} event |
- * @param {FileManager} fileManager |
+ * @param {!Event} event |
+ * @param {!FileManager} fileManager |
*/ |
execute: function(event, fileManager) { |
var pin = !event.command.checked; |
@@ -748,6 +860,10 @@ CommandHandler.COMMANDS_['toggle-pinned'] = /** @type {Command} */ ({ |
driveSyncHandler.showDisabledMobileSyncNotification(); |
}, |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
canExecute: function(event, fileManager) { |
var entries = CommandUtil.getPinTargetEntries(); |
var checked = true; |
@@ -770,11 +886,22 @@ CommandHandler.COMMANDS_['toggle-pinned'] = /** @type {Command} */ ({ |
* @type {Command} |
*/ |
CommandHandler.COMMANDS_['zip-selection'] = /** @type {Command} */ ({ |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
execute: function(event, fileManager) { |
var dirEntry = fileManager.getCurrentDirectoryEntry(); |
+ if (!dirEntry) |
+ return; |
var selectionEntries = fileManager.getSelection().entries; |
- fileManager.fileOperationManager_.zipSelection(dirEntry, selectionEntries); |
+ fileManager.fileOperationManager_.zipSelection( |
+ dirEntry, selectionEntries); |
}, |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
canExecute: function(event, fileManager) { |
var dirEntry = fileManager.getCurrentDirectoryEntry(); |
var selection = fileManager.getSelection(); |
@@ -791,9 +918,17 @@ CommandHandler.COMMANDS_['zip-selection'] = /** @type {Command} */ ({ |
* @type {Command} |
*/ |
CommandHandler.COMMANDS_['share'] = /** @type {Command} */ ({ |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
execute: function(event, fileManager) { |
fileManager.shareSelection(); |
}, |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
canExecute: function(event, fileManager) { |
var selection = fileManager.getSelection(); |
var isDriveOffline = |
@@ -812,8 +947,8 @@ CommandHandler.COMMANDS_['share'] = /** @type {Command} */ ({ |
*/ |
CommandHandler.COMMANDS_['create-folder-shortcut'] = /** @type {Command} */ ({ |
/** |
- * @param {Event} event Command event. |
- * @param {FileManager} fileManager The file manager instance. |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager The file manager instance. |
*/ |
execute: function(event, fileManager) { |
var entry = CommandUtil.getCommandEntry(event.target); |
@@ -826,8 +961,8 @@ CommandHandler.COMMANDS_['create-folder-shortcut'] = /** @type {Command} */ ({ |
}, |
/** |
- * @param {Event} event Command event. |
- * @param {FileManager} fileManager The file manager instance. |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager The file manager instance. |
*/ |
canExecute: function(event, fileManager) { |
var entry = CommandUtil.getCommandEntry(event.target); |
@@ -856,8 +991,8 @@ CommandHandler.COMMANDS_['create-folder-shortcut'] = /** @type {Command} */ ({ |
*/ |
CommandHandler.COMMANDS_['remove-folder-shortcut'] = /** @type {Command} */ ({ |
/** |
- * @param {Event} event Command event. |
- * @param {FileManager} fileManager The file manager instance. |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager The file manager instance. |
*/ |
execute: function(event, fileManager) { |
var entry = CommandUtil.getCommandEntry(event.target); |
@@ -870,8 +1005,8 @@ CommandHandler.COMMANDS_['remove-folder-shortcut'] = /** @type {Command} */ ({ |
}, |
/** |
- * @param {Event} event Command event. |
- * @param {FileManager} fileManager The file manager instance. |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager The file manager instance. |
*/ |
canExecute: function(event, fileManager) { |
var entry = CommandUtil.getCommandEntry(event.target); |
@@ -889,6 +1024,10 @@ CommandHandler.COMMANDS_['remove-folder-shortcut'] = /** @type {Command} */ ({ |
* @type {Command} |
*/ |
CommandHandler.COMMANDS_['zoom-in'] = /** @type {Command} */ ({ |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
execute: function(event, fileManager) { |
chrome.fileManagerPrivate.zoom('in'); |
}, |
@@ -900,6 +1039,10 @@ CommandHandler.COMMANDS_['zoom-in'] = /** @type {Command} */ ({ |
* @type {Command} |
*/ |
CommandHandler.COMMANDS_['zoom-out'] = /** @type {Command} */ ({ |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
execute: function(event, fileManager) { |
chrome.fileManagerPrivate.zoom('out'); |
}, |
@@ -911,6 +1054,10 @@ CommandHandler.COMMANDS_['zoom-out'] = /** @type {Command} */ ({ |
* @type {Command} |
*/ |
CommandHandler.COMMANDS_['zoom-reset'] = /** @type {Command} */ ({ |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
execute: function(event, fileManager) { |
chrome.fileManagerPrivate.zoom('reset'); |
}, |
@@ -922,6 +1069,10 @@ CommandHandler.COMMANDS_['zoom-reset'] = /** @type {Command} */ ({ |
* @type {Command} |
*/ |
CommandHandler.COMMANDS_['inspect-normal'] = /** @type {Command} */ ({ |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
execute: function(event, fileManager) { |
chrome.fileManagerPrivate.openInspector('normal'); |
}, |
@@ -933,6 +1084,10 @@ CommandHandler.COMMANDS_['inspect-normal'] = /** @type {Command} */ ({ |
* @type {Command} |
*/ |
CommandHandler.COMMANDS_['inspect-console'] = /** @type {Command} */ ({ |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
execute: function(event, fileManager) { |
chrome.fileManagerPrivate.openInspector('console'); |
}, |
@@ -944,6 +1099,10 @@ CommandHandler.COMMANDS_['inspect-console'] = /** @type {Command} */ ({ |
* @type {Command} |
*/ |
CommandHandler.COMMANDS_['inspect-element'] = /** @type {Command} */ ({ |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
execute: function(event, fileManager) { |
chrome.fileManagerPrivate.openInspector('element'); |
}, |
@@ -955,6 +1114,10 @@ CommandHandler.COMMANDS_['inspect-element'] = /** @type {Command} */ ({ |
* @type {Command} |
*/ |
CommandHandler.COMMANDS_['inspect-background'] = /** @type {Command} */ ({ |
+ /** |
+ * @param {!Event} event Command event. |
+ * @param {!FileManager} fileManager FileManager to use. |
+ */ |
execute: function(event, fileManager) { |
chrome.fileManagerPrivate.openInspector('background'); |
}, |