diff options
author | zhchbin@gmail.com <zhchbin@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-28 18:33:35 +0000 |
---|---|---|
committer | zhchbin@gmail.com <zhchbin@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-28 18:33:35 +0000 |
commit | c73236512b5285e65eeda627f94ddce51fcda16f (patch) | |
tree | 2af47d796869e17dc7e0b842629e707643928129 /chrome/common/extensions/command.h | |
parent | c457e8fadd95ca31883010b1da1ab5704b5bfd8f (diff) | |
download | chromium_src-c73236512b5285e65eeda627f94ddce51fcda16f.zip chromium_src-c73236512b5285e65eeda627f94ddce51fcda16f.tar.gz chromium_src-c73236512b5285e65eeda627f94ddce51fcda16f.tar.bz2 |
Media Keys should not count towards the max of four shortcuts per extension.
R=finnur@chromium.org
TEST=unit_tests --gtest_filter=CommandsManifestTest.CommandManifestShouldNotCountMediaKeys
BUG=329870
Review URL: https://codereview.chromium.org/180783012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254176 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/command.h')
-rw-r--r-- | chrome/common/extensions/command.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/common/extensions/command.h b/chrome/common/extensions/command.h index 0ea3fe4..41ec35a 100644 --- a/chrome/common/extensions/command.h +++ b/chrome/common/extensions/command.h @@ -42,6 +42,11 @@ class Command { // shortcut text (like accelerator::GetShortcutText() does). static std::string AcceleratorToString(const ui::Accelerator& accelerator); + // Return true if the specified accelerator is one of the following multimedia + // keys: Next Track key, Previous Track key, Stop Media key, Play/Pause Media + // key, without any modifiers. + static bool IsMediaKey(const ui::Accelerator& accelerator); + // Parse the command. bool Parse(const base::DictionaryValue* command, const std::string& command_name, |