Index: chrome/common/extensions/extension.h |
=================================================================== |
--- chrome/common/extensions/extension.h (revision 127690) |
+++ chrome/common/extensions/extension.h (working copy) |
@@ -151,6 +151,12 @@ |
class ExtensionKeybinding { |
public: |
+ enum Type { |
+ BROWSER_ACTION, |
+ PAGE_ACTION, |
+ COMMANDS, |
+ }; |
+ |
// Define out of line constructor/destructor to please Clang. |
ExtensionKeybinding(); |
~ExtensionKeybinding(); |
@@ -523,6 +529,11 @@ |
// Returns true if the extension should be displayed in the launcher. |
bool ShouldDisplayInLauncher() const; |
+ // Gets an extension keybindings by |type|. |
+ void GetCommandByType( |
+ Extension::ExtensionKeybinding::Type type, |
+ std::vector<Extension::ExtensionKeybinding>* keybindings) const; |
+ |
// Accessors: |
const FilePath& path() const { return path_; } |
@@ -551,6 +562,8 @@ |
const std::vector<InputComponentInfo>& input_components() const { |
return input_components_; |
} |
+ // See also GetCommandByType, which allows finer grained control over |
+ // which commands are returned. |
const std::vector<ExtensionKeybinding>& keybindings() const { |
return commands_; |
} |