Chromium Code Reviews| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 30 class ExtensionKeybindingRegistryViews | 30 class ExtensionKeybindingRegistryViews |
| 31 : public extensions::ExtensionKeybindingRegistry, | 31 : public extensions::ExtensionKeybindingRegistry, |
| 32 public ui::AcceleratorTarget { | 32 public ui::AcceleratorTarget { |
| 33 public: | 33 public: |
| 34 ExtensionKeybindingRegistryViews(Profile* profile, | 34 ExtensionKeybindingRegistryViews(Profile* profile, |
| 35 views::FocusManager* focus_manager, | 35 views::FocusManager* focus_manager, |
| 36 ExtensionFilter extension_filter, | 36 ExtensionFilter extension_filter, |
| 37 Delegate* delegate); | 37 Delegate* delegate); |
| 38 ~ExtensionKeybindingRegistryViews() override; | 38 ~ExtensionKeybindingRegistryViews() override; |
| 39 | 39 |
| 40 // Overridden from ExtensingKeybindingRegistry. | |
| 41 void SetShortcutHandlingSuspended(bool suspended) override; | |
|
Devlin
2015/01/15 22:41:43
Is there a reason this can't go at line 48 with th
Andre
2015/01/16 18:40:15
Done.
| |
| 42 | |
| 40 // Overridden from ui::AcceleratorTarget. | 43 // Overridden from ui::AcceleratorTarget. |
| 41 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; | 44 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; |
| 42 bool CanHandleAccelerators() const override; | 45 bool CanHandleAccelerators() const override; |
| 43 | 46 |
| 44 private: | 47 private: |
| 45 // Overridden from ExtensionKeybindingRegistry: | 48 // Overridden from ExtensionKeybindingRegistry: |
| 46 void AddExtensionKeybindings(const extensions::Extension* extension, | 49 void AddExtensionKeybindings(const extensions::Extension* extension, |
| 47 const std::string& command_name) override; | 50 const std::string& command_name) override; |
| 48 void RemoveExtensionKeybindingImpl(const ui::Accelerator& accelerator, | 51 void RemoveExtensionKeybindingImpl(const ui::Accelerator& accelerator, |
| 49 const std::string& command_name) override; | 52 const std::string& command_name) override; |
| 50 | 53 |
| 51 // Weak pointer to the our profile. Not owned by us. | 54 // Weak pointer to the our profile. Not owned by us. |
| 52 Profile* profile_; | 55 Profile* profile_; |
| 53 | 56 |
| 54 // Weak pointer back to the focus manager to use to register and unregister | 57 // Weak pointer back to the focus manager to use to register and unregister |
| 55 // accelerators with. Not owned by us. | 58 // accelerators with. Not owned by us. |
| 56 views::FocusManager* focus_manager_; | 59 views::FocusManager* focus_manager_; |
| 57 | 60 |
| 58 // The content notification registrar for listening to extension events. | 61 // The content notification registrar for listening to extension events. |
| 59 content::NotificationRegistrar registrar_; | 62 content::NotificationRegistrar registrar_; |
| 60 | 63 |
| 61 DISALLOW_COPY_AND_ASSIGN(ExtensionKeybindingRegistryViews); | 64 DISALLOW_COPY_AND_ASSIGN(ExtensionKeybindingRegistryViews); |
| 62 }; | 65 }; |
| 63 | 66 |
| 64 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_VIEW S_H_ | 67 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_VIEW S_H_ |
| OLD | NEW |