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

Side by Side Diff: chrome/browser/ui/views/extensions/extension_keybinding_registry_views.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, 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 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_VIEWS_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_VIEWS_H _ 5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_VIEWS_H _
6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_VIEWS_H _ 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_VIEWS_H _
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 16 matching lines...) Expand all
27 // Note: It handles regular extension commands (not browserAction and pageAction 27 // Note: It handles regular extension commands (not browserAction and pageAction
28 // popups, which are handled elsewhere). This class registers the accelerators 28 // popups, which are handled elsewhere). This class registers the accelerators
29 // on behalf of the extensions and routes the commands to them via the 29 // on behalf of the extensions and routes the commands to them via the
30 // BrowserEventRouter. 30 // BrowserEventRouter.
31 class ExtensionKeybindingRegistryViews 31 class ExtensionKeybindingRegistryViews
32 : public extensions::ExtensionKeybindingRegistry, 32 : public extensions::ExtensionKeybindingRegistry,
33 public ui::AcceleratorTarget { 33 public ui::AcceleratorTarget {
34 public: 34 public:
35 ExtensionKeybindingRegistryViews(Profile* profile, 35 ExtensionKeybindingRegistryViews(Profile* profile,
36 views::FocusManager* focus_manager, 36 views::FocusManager* focus_manager,
37 ExtensionFilter extension_filter); 37 ExtensionFilter extension_filter,
38 Delegate* delegate);
38 virtual ~ExtensionKeybindingRegistryViews(); 39 virtual ~ExtensionKeybindingRegistryViews();
39 40
40 // Overridden from ui::AcceleratorTarget. 41 // Overridden from ui::AcceleratorTarget.
41 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; 42 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
42 virtual bool CanHandleAccelerators() const OVERRIDE; 43 virtual bool CanHandleAccelerators() const OVERRIDE;
43 44
44 private: 45 private:
45 // Overridden from ExtensionKeybindingRegistry: 46 // Overridden from ExtensionKeybindingRegistry:
46 virtual void AddExtensionKeybinding( 47 virtual void AddExtensionKeybinding(
47 const extensions::Extension* extension, 48 const extensions::Extension* extension,
(...skipping 16 matching lines...) Expand all
64 std::pair<std::string, std::string> > EventTargets; 65 std::pair<std::string, std::string> > EventTargets;
65 EventTargets event_targets_; 66 EventTargets event_targets_;
66 67
67 // The content notification registrar for listening to extension events. 68 // The content notification registrar for listening to extension events.
68 content::NotificationRegistrar registrar_; 69 content::NotificationRegistrar registrar_;
69 70
70 DISALLOW_COPY_AND_ASSIGN(ExtensionKeybindingRegistryViews); 71 DISALLOW_COPY_AND_ASSIGN(ExtensionKeybindingRegistryViews);
71 }; 72 };
72 73
73 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_VIEW S_H_ 74 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_VIEW S_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698