| 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_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 15 matching lines...) Expand all Loading... |
| 26 // implementation of the Extension Keybinding shortcuts (keyboard accelerators). | 26 // implementation of the Extension Keybinding shortcuts (keyboard accelerators). |
| 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 virtual ~ExtensionKeybindingRegistryViews(); | 38 virtual ~ExtensionKeybindingRegistryViews(); |
| 38 | 39 |
| 39 // Overridden from ui::AcceleratorTarget. | 40 // Overridden from ui::AcceleratorTarget. |
| 40 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; | 41 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; |
| 41 virtual bool CanHandleAccelerators() const OVERRIDE; | 42 virtual bool CanHandleAccelerators() const OVERRIDE; |
| 42 | 43 |
| 43 private: | 44 private: |
| 44 // Overridden from ExtensionKeybindingRegistry: | 45 // Overridden from ExtensionKeybindingRegistry: |
| 45 virtual void AddExtensionKeybinding( | 46 virtual void AddExtensionKeybinding( |
| 46 const extensions::Extension* extension, | 47 const extensions::Extension* extension, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 63 std::pair<std::string, std::string> > EventTargets; | 64 std::pair<std::string, std::string> > EventTargets; |
| 64 EventTargets event_targets_; | 65 EventTargets event_targets_; |
| 65 | 66 |
| 66 // The content notification registrar for listening to extension events. | 67 // The content notification registrar for listening to extension events. |
| 67 content::NotificationRegistrar registrar_; | 68 content::NotificationRegistrar registrar_; |
| 68 | 69 |
| 69 DISALLOW_COPY_AND_ASSIGN(ExtensionKeybindingRegistryViews); | 70 DISALLOW_COPY_AND_ASSIGN(ExtensionKeybindingRegistryViews); |
| 70 }; | 71 }; |
| 71 | 72 |
| 72 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_VIEW
S_H_ | 73 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_VIEW
S_H_ |
| OLD | NEW |