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

Unified Diff: chrome/common/extensions/command.h

Issue 180783012: Media Keys should not count towards the max of four shortcuts per extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move IsMediaKey from c/b/e/a/c/command_service.h &&.cc to c/c/e/command.h && .cc Created 6 years, 10 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/common/extensions/command.h
diff --git a/chrome/common/extensions/command.h b/chrome/common/extensions/command.h
index 0ea3fe4924cfc3a3a5637d29bfeb59008845a30e..41ec35aa503dae6a57d5139112a2759e6a845291 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,
« no previous file with comments | « chrome/common/extensions/api/commands/commands_manifest_unittest.cc ('k') | chrome/common/extensions/command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698