Check if a command can be executed before executing it via a shortcut.
Commands are updated when focus is updated. This makes sense, when executing commands by pressing an ui element. However, when executing a command via a shortcut, we may execute it while it shouldn't be allowed to be executed. This patch fixes it by updating the command's state (disabled/enabled) just before executing it via a shortcut. TEST=Enter Files.app, select a file, then deselect a file, hit Delete button. A delete command should not be invoked. BUG=174554 Review URL: https://chromiumcodereview.appspot.com/13532006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192514 0039d316-1c4b-4281-b951-d872f2087c98
Showing
Please register or sign in to comment