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

Unified Diff: chrome/browser/extensions/extension_keybinding_registry.h

Issue 10914122: Test ActiveTab (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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/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);
};
« no previous file with comments | « chrome/browser/extensions/extension_keybinding_apitest.cc ('k') | chrome/browser/extensions/extension_keybinding_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698