Chromium Code Reviews| 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 d857eb73e603c7850b8f7affad893e2f8dc5f524..bd818a093ef627f1dccfb5f8b009549524a6210c 100644 |
| --- a/chrome/browser/extensions/api/commands/command_service.h |
| +++ b/chrome/browser/extensions/api/commands/command_service.h |
| @@ -45,6 +45,15 @@ class CommandService : public ProfileKeyedAPI, |
| ACTIVE_ONLY, |
| }; |
| + // An enum specifying whether the command is global in scope or not. Global |
| + // commands -- unlike regular commands -- have a global keyboard hook |
| + // associated with them (and therefore work when Chrome doesn't have focus). |
| + enum CommandScope { |
| + REGULAR, |
| + GLOBAL, |
| + ANY_SCOPE, |
|
Yoyo Zhou
2013/10/03 22:08:50
What does this mean? (This is only used for queryi
Finnur
2013/10/04 17:57:02
Added comments.
On 2013/10/03 22:08:50, Yoyo Zhou
|
| + }; |
| + |
| // Register prefs for keybinding. |
| static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| @@ -94,10 +103,11 @@ class CommandService : public ProfileKeyedAPI, |
| // Gets the active command (if any) for the named commands of an extension |
| // given its |extension_id|. The function consults the master list to see if |
| // the command is active. Returns an empty map if the extension has no |
| - // named commands or no active named commands when |type| requested is |
| - // ACTIVE_ONLY. |
| + // named commands of the right |scope| or no active named commands when |type| |
|
Yoyo Zhou
2013/10/03 22:08:50
..."no such active named commands"...?
Finnur
2013/10/04 17:57:02
Done.
|
| + // requested is ACTIVE_ONLY. |
| bool GetNamedCommands(const std::string& extension_id, |
| QueryType type, |
| + CommandScope scope, |
| extensions::CommandMap* command_map); |
| // Records a keybinding |accelerator| as active for an extension with id |