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 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 // ExtensionKeybindingRegistryGtk is a class that handles GTK-specific | 29 // ExtensionKeybindingRegistryGtk is a class that handles GTK-specific |
30 // implemenation of the Extension Keybinding shortcuts (keyboard accelerators). | 30 // implemenation of the Extension Keybinding shortcuts (keyboard accelerators). |
31 // Note: It keeps track of browserAction and pageAction commands, but does not | 31 // Note: It keeps track of browserAction and pageAction commands, but does not |
32 // route the events to them -- that is handled elsewhere. This class registers | 32 // route the events to them -- that is handled elsewhere. This class registers |
33 // the accelerators on behalf of the extensions and routes the commands to them | 33 // the accelerators on behalf of the extensions and routes the commands to them |
34 // via the BrowserEventRouter. | 34 // via the BrowserEventRouter. |
35 class ExtensionKeybindingRegistryGtk | 35 class ExtensionKeybindingRegistryGtk |
36 : public extensions::ExtensionKeybindingRegistry { | 36 : public extensions::ExtensionKeybindingRegistry { |
37 public: | 37 public: |
38 ExtensionKeybindingRegistryGtk(Profile* profile, gfx::NativeWindow window); | 38 ExtensionKeybindingRegistryGtk(Profile* profile, |
| 39 gfx::NativeWindow window, |
| 40 ExtensionFilter extension_filter); |
39 virtual ~ExtensionKeybindingRegistryGtk(); | 41 virtual ~ExtensionKeybindingRegistryGtk(); |
40 | 42 |
41 static void set_shortcut_handling_suspended(bool suspended) { | 43 static void set_shortcut_handling_suspended(bool suspended) { |
42 shortcut_handling_suspended_ = suspended; | 44 shortcut_handling_suspended_ = suspended; |
43 } | 45 } |
44 static bool shortcut_handling_suspended() { | 46 static bool shortcut_handling_suspended() { |
45 return shortcut_handling_suspended_; | 47 return shortcut_handling_suspended_; |
46 } | 48 } |
47 | 49 |
48 // Whether this class has any registered keyboard shortcuts that correspond | 50 // Whether this class has any registered keyboard shortcuts that correspond |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 std::pair<std::string, std::string> > EventTargets; | 90 std::pair<std::string, std::string> > EventTargets; |
89 EventTargets event_targets_; | 91 EventTargets event_targets_; |
90 | 92 |
91 // The content notification registrar for listening to extension events. | 93 // The content notification registrar for listening to extension events. |
92 content::NotificationRegistrar registrar_; | 94 content::NotificationRegistrar registrar_; |
93 | 95 |
94 DISALLOW_COPY_AND_ASSIGN(ExtensionKeybindingRegistryGtk); | 96 DISALLOW_COPY_AND_ASSIGN(ExtensionKeybindingRegistryGtk); |
95 }; | 97 }; |
96 | 98 |
97 #endif // CHROME_BROWSER_UI_GTK_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_GTK_H_ | 99 #endif // CHROME_BROWSER_UI_GTK_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_GTK_H_ |
OLD | NEW |