| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "chrome/browser/extensions/extension_keybinding_registry.h" | 13 #include "chrome/browser/extensions/extension_keybinding_registry.h" |
| 14 #include "ui/base/accelerators/accelerator.h" | 14 #include "ui/base/accelerators/accelerator.h" |
| 15 | 15 |
| 16 class Extension; | 16 class Extension; |
| 17 class Profile; | 17 class Profile; |
| 18 | 18 |
| 19 namespace views { | 19 namespace views { |
| 20 class FocusManager; | 20 class FocusManager; |
| 21 } | 21 } |
| 22 | 22 |
| 23 // ExtensionKeybindingRegistryViews is a class that handles Views-specific | 23 // ExtensionKeybindingRegistryViews is a class that handles Views-specific |
| 24 // implemenation of the Extension Keybinding shortcuts (keyboard accelerators). | 24 // implementation of the Extension Keybinding shortcuts (keyboard accelerators). |
| 25 // Note: It handles regular extension commands (not browserAction and pageAction | 25 // Note: It handles regular extension commands (not browserAction and pageAction |
| 26 // popups, which are handled elsewhere). This class registers the accelerators | 26 // popups, which are handled elsewhere). This class registers the accelerators |
| 27 // on behalf of the extensions and routes the commands to them via the | 27 // on behalf of the extensions and routes the commands to them via the |
| 28 // BrowserEventRouter. | 28 // BrowserEventRouter. |
| 29 class ExtensionKeybindingRegistryViews : public ExtensionKeybindingRegistry, | 29 class ExtensionKeybindingRegistryViews : public ExtensionKeybindingRegistry, |
| 30 public ui::AcceleratorTarget { | 30 public ui::AcceleratorTarget { |
| 31 public: | 31 public: |
| 32 ExtensionKeybindingRegistryViews(Profile* profile, | 32 ExtensionKeybindingRegistryViews(Profile* profile, |
| 33 views::FocusManager* focus_manager); | 33 views::FocusManager* focus_manager); |
| 34 virtual ~ExtensionKeybindingRegistryViews(); | 34 virtual ~ExtensionKeybindingRegistryViews(); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 56 std::pair<std::string, std::string> > EventTargets; | 56 std::pair<std::string, std::string> > EventTargets; |
| 57 EventTargets event_targets_; | 57 EventTargets event_targets_; |
| 58 | 58 |
| 59 // The content notification registrar for listening to extension events. | 59 // The content notification registrar for listening to extension events. |
| 60 content::NotificationRegistrar registrar_; | 60 content::NotificationRegistrar registrar_; |
| 61 | 61 |
| 62 DISALLOW_COPY_AND_ASSIGN(ExtensionKeybindingRegistryViews); | 62 DISALLOW_COPY_AND_ASSIGN(ExtensionKeybindingRegistryViews); |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_VIEW
S_H_ | 65 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_VIEW
S_H_ |
| OLD | NEW |