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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
114 // Returns true if we can find it, |extension_id| and |command_name| will be | 114 // Returns true if we can find it, |extension_id| and |command_name| will be |
115 // set to the right target; otherwise, false is returned and |extension_id|, | 115 // set to the right target; otherwise, false is returned and |extension_id|, |
116 // |command_name| are unchanged. | 116 // |command_name| are unchanged. |
117 bool GetFirstTarget(const ui::Accelerator& accelerator, | 117 bool GetFirstTarget(const ui::Accelerator& accelerator, |
118 std::string* extension_id, | 118 std::string* extension_id, |
119 std::string* command_name) const; | 119 std::string* command_name) const; |
120 | 120 |
121 // Returns true if the |event_targets_| is empty; otherwise returns false. | 121 // Returns true if the |event_targets_| is empty; otherwise returns false. |
122 bool IsEventTargetsEmpty() const; | 122 bool IsEventTargetsEmpty() const; |
123 | 123 |
124 content::BrowserContext* browser_context() const { return browser_context_; } | |
Finnur
2014/07/02 11:56:16
nit: doc.
Mike Wittman
2014/07/02 21:56:19
Done.
| |
125 | |
124 private: | 126 private: |
125 // Overridden from content::NotificationObserver: | 127 // Overridden from content::NotificationObserver: |
126 virtual void Observe(int type, | 128 virtual void Observe(int type, |
127 const content::NotificationSource& source, | 129 const content::NotificationSource& source, |
128 const content::NotificationDetails& details) OVERRIDE; | 130 const content::NotificationDetails& details) OVERRIDE; |
129 | 131 |
130 // ExtensionRegistryObserver implementation. | 132 // ExtensionRegistryObserver implementation. |
131 virtual void OnExtensionLoaded(content::BrowserContext* browser_context, | 133 virtual void OnExtensionLoaded(content::BrowserContext* browser_context, |
132 const Extension* extension) OVERRIDE; | 134 const Extension* extension) OVERRIDE; |
133 virtual void OnExtensionUnloaded( | 135 virtual void OnExtensionUnloaded( |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
170 // Listen to extension load, unloaded notifications. | 172 // Listen to extension load, unloaded notifications. |
171 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> | 173 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
172 extension_registry_observer_; | 174 extension_registry_observer_; |
173 | 175 |
174 DISALLOW_COPY_AND_ASSIGN(ExtensionKeybindingRegistry); | 176 DISALLOW_COPY_AND_ASSIGN(ExtensionKeybindingRegistry); |
175 }; | 177 }; |
176 | 178 |
177 } // namespace extensions | 179 } // namespace extensions |
178 | 180 |
179 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_H_ | 181 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_KEYBINDING_REGISTRY_H_ |
OLD | NEW |