| 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_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 // Overridden from content::NotificationObserver: | 134 // Overridden from content::NotificationObserver: |
| 135 void Observe(int type, | 135 void Observe(int type, |
| 136 const content::NotificationSource& source, | 136 const content::NotificationSource& source, |
| 137 const content::NotificationDetails& details) override; | 137 const content::NotificationDetails& details) override; |
| 138 | 138 |
| 139 // ExtensionRegistryObserver implementation. | 139 // ExtensionRegistryObserver implementation. |
| 140 void OnExtensionLoaded(content::BrowserContext* browser_context, | 140 void OnExtensionLoaded(content::BrowserContext* browser_context, |
| 141 const Extension* extension) override; | 141 const Extension* extension) override; |
| 142 void OnExtensionUnloaded(content::BrowserContext* browser_context, | 142 void OnExtensionUnloaded(content::BrowserContext* browser_context, |
| 143 const Extension* extension, | 143 const Extension* extension, |
| 144 UnloadedExtensionInfo::Reason reason) override; | 144 UnloadedExtensionReason reason) override; |
| 145 | 145 |
| 146 // Returns true if the |extension| matches our extension filter. | 146 // Returns true if the |extension| matches our extension filter. |
| 147 bool ExtensionMatchesFilter(const extensions::Extension* extension); | 147 bool ExtensionMatchesFilter(const extensions::Extension* extension); |
| 148 | 148 |
| 149 // Execute commands for |accelerator|. If |extension_id| is empty, execute all | 149 // Execute commands for |accelerator|. If |extension_id| is empty, execute all |
| 150 // commands bound to |accelerator|, otherwise execute only commands bound by | 150 // commands bound to |accelerator|, otherwise execute only commands bound by |
| 151 // the corresponding extension. Returns true if at least one command was | 151 // the corresponding extension. Returns true if at least one command was |
| 152 // executed. | 152 // executed. |
| 153 bool ExecuteCommands(const ui::Accelerator& accelerator, | 153 bool ExecuteCommands(const ui::Accelerator& accelerator, |
| 154 const std::string& extension_id); | 154 const std::string& extension_id); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 185 // capturing then trying to assign Ctrl+F to a command would instead result | 185 // capturing then trying to assign Ctrl+F to a command would instead result |
| 186 // in the Find box opening. | 186 // in the Find box opening. |
| 187 bool shortcut_handling_suspended_; | 187 bool shortcut_handling_suspended_; |
| 188 | 188 |
| 189 DISALLOW_COPY_AND_ASSIGN(ExtensionKeybindingRegistry); | 189 DISALLOW_COPY_AND_ASSIGN(ExtensionKeybindingRegistry); |
| 190 }; | 190 }; |
| 191 | 191 |
| 192 } // namespace extensions | 192 } // namespace extensions |
| 193 | 193 |
| 194 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_H_ | 194 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_H_ |
| OLD | NEW |