| Index: chrome/browser/extensions/extension_keybinding_registry.h
|
| ===================================================================
|
| --- chrome/browser/extensions/extension_keybinding_registry.h (revision 155251)
|
| +++ chrome/browser/extensions/extension_keybinding_registry.h (working copy)
|
| @@ -17,6 +17,7 @@
|
|
|
| namespace extensions {
|
|
|
| +class ActiveTabPermissionManager;
|
| class Extension;
|
|
|
| // The ExtensionKeybindingRegistry is a class that handles the cross-platform
|
| @@ -24,7 +25,14 @@
|
| // implementation details for each platform.
|
| class ExtensionKeybindingRegistry : public content::NotificationObserver {
|
| public:
|
| - explicit ExtensionKeybindingRegistry(Profile* profile);
|
| + class Delegate {
|
| + public:
|
| + // Gets the ActiveTabPermissionManager for the active tab, if any.
|
| + // If there is no active tab then returns NULL.
|
| + virtual ActiveTabPermissionManager* GetActiveTabPermissionGranter() = 0;
|
| + };
|
| +
|
| + explicit ExtensionKeybindingRegistry(Profile* profile, Delegate* delegate);
|
| virtual ~ExtensionKeybindingRegistry();
|
|
|
| // Enables/Disables general shortcut handing in Chrome. Implemented in
|
| @@ -56,6 +64,10 @@
|
| // commands are currently ignored, since they are handled elsewhere.
|
| bool ShouldIgnoreCommand(const std::string& command) const;
|
|
|
| + // Notifies appropriate parties that a command has been executed.
|
| + void CommandExecuted(const std::string& extension_id,
|
| + const std::string& command);
|
| +
|
| private:
|
| // The content notification registrar for listening to extension events.
|
| content::NotificationRegistrar registrar_;
|
| @@ -63,6 +75,9 @@
|
| // Weak pointer to the our profile. Not owned by us.
|
| Profile* profile_;
|
|
|
| + // Weak pointer to our delegate. Not owned by us. Must outlive this class.
|
| + Delegate* delegate_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ExtensionKeybindingRegistry);
|
| };
|
|
|
|
|