Commit d1e5d557 authored by Rachel Sugrono's avatar Rachel Sugrono Committed by Commit Bot

[quickview] Add CommandHandler.getCommand(name)

Add a public CommandHandler method to get a handler by name. Not used
yet but required for Quick View to get hold of the delete handler.

Bug: 803259
Change-Id: Iddca1284363d40de64629458b28a6d646636d859
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2026331Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Commit-Queue: Noel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#736253}
parent 99076174
...@@ -451,6 +451,15 @@ class CommandHandler { ...@@ -451,6 +451,15 @@ class CommandHandler {
handler.canExecute.call( handler.canExecute.call(
/** @type {Command} */ (handler), event, this.fileManager_); /** @type {Command} */ (handler), event, this.fileManager_);
} }
/**
* Returns command handler by name.
* @param {string} name The command name.
* @public
*/
static getCommand(name) {
return CommandHandler.COMMANDS_[name];
}
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment