| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_GTK_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_GTK_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_GTK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 return shortcut_handling_suspended_; | 46 return shortcut_handling_suspended_; |
| 47 } | 47 } |
| 48 | 48 |
| 49 // Whether this class has any registered keyboard shortcuts that correspond | 49 // Whether this class has any registered keyboard shortcuts that correspond |
| 50 // to |event|. | 50 // to |event|. |
| 51 gboolean HasPriorityHandler(const GdkEventKey* event) const; | 51 gboolean HasPriorityHandler(const GdkEventKey* event) const; |
| 52 | 52 |
| 53 protected: | 53 protected: |
| 54 // Overridden from ExtensionKeybindingRegistry: | 54 // Overridden from ExtensionKeybindingRegistry: |
| 55 virtual void AddExtensionKeybinding( | 55 virtual void AddExtensionKeybinding( |
| 56 const extensions::Extension* extension) OVERRIDE; | 56 const extensions::Extension* extension, |
| 57 const std::string& command_name) OVERRIDE; |
| 57 virtual void RemoveExtensionKeybinding( | 58 virtual void RemoveExtensionKeybinding( |
| 58 const extensions::Extension* extension) OVERRIDE; | 59 const extensions::Extension* extension, |
| 60 const std::string& command_name) OVERRIDE; |
| 59 | 61 |
| 60 private: | 62 private: |
| 61 // The accelerator handler for when the extension command shortcuts are | 63 // The accelerator handler for when the extension command shortcuts are |
| 62 // struck. | 64 // struck. |
| 63 CHROMEG_CALLBACK_3(ExtensionKeybindingRegistryGtk, gboolean, OnGtkAccelerator, | 65 CHROMEG_CALLBACK_3(ExtensionKeybindingRegistryGtk, gboolean, OnGtkAccelerator, |
| 64 GtkAccelGroup*, GObject*, guint, GdkModifierType); | 66 GtkAccelGroup*, GObject*, guint, GdkModifierType); |
| 65 | 67 |
| 66 // Keeps track of whether shortcut handling is currently suspended. Shortcuts | 68 // Keeps track of whether shortcut handling is currently suspended. Shortcuts |
| 67 // are suspended briefly while capturing which shortcut to assign to an | 69 // are suspended briefly while capturing which shortcut to assign to an |
| 68 // extension command in the Config UI. If handling isn't suspended while | 70 // extension command in the Config UI. If handling isn't suspended while |
| (...skipping 18 matching lines...) Expand all Loading... |
| 87 std::pair<std::string, std::string> > EventTargets; | 89 std::pair<std::string, std::string> > EventTargets; |
| 88 EventTargets event_targets_; | 90 EventTargets event_targets_; |
| 89 | 91 |
| 90 // The content notification registrar for listening to extension events. | 92 // The content notification registrar for listening to extension events. |
| 91 content::NotificationRegistrar registrar_; | 93 content::NotificationRegistrar registrar_; |
| 92 | 94 |
| 93 DISALLOW_COPY_AND_ASSIGN(ExtensionKeybindingRegistryGtk); | 95 DISALLOW_COPY_AND_ASSIGN(ExtensionKeybindingRegistryGtk); |
| 94 }; | 96 }; |
| 95 | 97 |
| 96 #endif // CHROME_BROWSER_UI_GTK_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_GTK_H_ | 98 #endif // CHROME_BROWSER_UI_GTK_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_GTK_H_ |
| OLD | NEW |