| 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 16 matching lines...) Expand all Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |