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

Side by Side Diff: chrome/browser/ui/gtk/extensions/extension_keybinding_registry_gtk.h

Issue 10880064: Make extension commands grant the activeTab permission. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 19 matching lines...) Expand all
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, 38 ExtensionKeybindingRegistryGtk(Profile* profile,
39 gfx::NativeWindow window, 39 gfx::NativeWindow window,
40 ExtensionFilter extension_filter); 40 ExtensionFilter extension_filter,
41 Delegate* delegate);
41 virtual ~ExtensionKeybindingRegistryGtk(); 42 virtual ~ExtensionKeybindingRegistryGtk();
42 43
43 static void set_shortcut_handling_suspended(bool suspended) { 44 static void set_shortcut_handling_suspended(bool suspended) {
44 shortcut_handling_suspended_ = suspended; 45 shortcut_handling_suspended_ = suspended;
45 } 46 }
46 static bool shortcut_handling_suspended() { 47 static bool shortcut_handling_suspended() {
47 return shortcut_handling_suspended_; 48 return shortcut_handling_suspended_;
48 } 49 }
49 50
50 // Whether this class has any registered keyboard shortcuts that correspond 51 // Whether this class has any registered keyboard shortcuts that correspond
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 std::pair<std::string, std::string> > EventTargets; 91 std::pair<std::string, std::string> > EventTargets;
91 EventTargets event_targets_; 92 EventTargets event_targets_;
92 93
93 // The content notification registrar for listening to extension events. 94 // The content notification registrar for listening to extension events.
94 content::NotificationRegistrar registrar_; 95 content::NotificationRegistrar registrar_;
95 96
96 DISALLOW_COPY_AND_ASSIGN(ExtensionKeybindingRegistryGtk); 97 DISALLOW_COPY_AND_ASSIGN(ExtensionKeybindingRegistryGtk);
97 }; 98 };
98 99
99 #endif // CHROME_BROWSER_UI_GTK_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_GTK_H_ 100 #endif // CHROME_BROWSER_UI_GTK_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/browser_window_gtk.cc ('k') | chrome/browser/ui/gtk/extensions/extension_keybinding_registry_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698