Index: chrome/browser/extensions/extension_keybinding_registry.h |
diff --git a/chrome/browser/extensions/extension_keybinding_registry.h b/chrome/browser/extensions/extension_keybinding_registry.h |
index ec9baa1065b9aff7acc2f324d1b68f2b885b08ba..78d441619142b5b91a992cf0d0fdb3d9396ad688 100644 |
--- a/chrome/browser/extensions/extension_keybinding_registry.h |
+++ b/chrome/browser/extensions/extension_keybinding_registry.h |
@@ -57,9 +57,9 @@ class ExtensionKeybindingRegistry : public content::NotificationObserver, |
~ExtensionKeybindingRegistry() override; |
- // Enables/Disables general shortcut handling in Chrome. Implemented in |
- // platform-specific ExtensionKeybindingsRegistry* files. |
- static void SetShortcutHandlingSuspended(bool suspended); |
+ // Enables/Disables general shortcut handling in Chrome. |
+ virtual void SetShortcutHandlingSuspended(bool suspended); |
Devlin
2015/01/15 22:41:43
nit: Seeing how these are used, I might have a sma
Andre
2015/01/16 18:40:14
Done.
|
+ bool IsShortcutHandlingSuspended(); |
Devlin
2015/01/15 22:41:43
This should be hacker_style() now :)
Andre
2015/01/16 18:40:14
Done.
|
// Execute the command bound to |accelerator| and provided by the extension |
// with |extension_id|, if it exists. |
@@ -173,6 +173,13 @@ class ExtensionKeybindingRegistry : public content::NotificationObserver, |
ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
extension_registry_observer_; |
+ // Keeps track of whether shortcut handling is currently suspended. Shortcuts |
+ // are suspended briefly while capturing which shortcut to assign to an |
+ // extension command in the Config UI. If handling isn't suspended while |
+ // capturing then trying to assign Ctrl+F to a command would instead result |
+ // in the Find box opening. |
+ bool shortcut_handling_suspended_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ExtensionKeybindingRegistry); |
}; |