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

Unified Diff: chrome/browser/extensions/api/commands/command_service.h

Issue 64273008: [Windows] Finish global and non-global media keys support on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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/browser/extensions/api/commands/command_service.h
diff --git a/chrome/browser/extensions/api/commands/command_service.h b/chrome/browser/extensions/api/commands/command_service.h
index 82249844de2c9b6cc682a5f7a7a306f6b2aa98cd..f823b44dc00ca808159cc8b48f420cb0b4b8bd9b 100644
--- a/chrome/browser/extensions/api/commands/command_service.h
+++ b/chrome/browser/extensions/api/commands/command_service.h
@@ -67,6 +67,11 @@ class CommandService : public ProfileKeyedAPI,
// Convenience method to get the CommandService for a profile.
static CommandService* Get(Profile* profile);
+ // 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.
Finnur 2013/11/12 16:27:54 You don't mention that e.g. a Ctrl+Next Track retu
zhchbin 2013/11/13 05:01:57 Done.
+ static bool IsMediaKey(const ui::Accelerator& accelerator);
+
// Gets the command (if any) for the browser action of an extension given
// its |extension_id|. The function consults the master list to see if
// the command is active. Returns false if the extension has no browser
@@ -184,6 +189,11 @@ class CommandService : public ProfileKeyedAPI,
bool* active,
ExtensionActionType action_type);
+ // A counter that used to append to the key of keybindings map when adding
Finnur 2013/11/12 16:27:54 s/that/that is/, but see below.
zhchbin 2013/11/13 05:01:57 Done. Removed.
+ // media keys preferences, so that we can make sure the key can be unique, and
+ // the same media key can be assigned to multi commands.
+ int media_keys_command_counter_;
Finnur 2013/11/12 16:27:54 I don't think this is going to work. For example,
zhchbin 2013/11/13 05:01:57 Done. Now using extension id for make the key quiq
Finnur 2013/11/13 10:22:24 Ah, don't beat yourself too hard. :)
+
// The content notification registrar for listening to extension events.
content::NotificationRegistrar registrar_;

Powered by Google App Engine
This is Rietveld 408576698