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_API_COMMANDS_COMMAND_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_COMMANDS_COMMAND_SERVICE_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_COMMANDS_COMMAND_SERVICE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_COMMANDS_COMMAND_SERVICE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 | 180 |
181 // ExtensionRegistryObserver. | 181 // ExtensionRegistryObserver. |
182 void OnExtensionWillBeInstalled(content::BrowserContext* browser_context, | 182 void OnExtensionWillBeInstalled(content::BrowserContext* browser_context, |
183 const Extension* extension, | 183 const Extension* extension, |
184 bool is_update, | 184 bool is_update, |
185 bool from_ephemeral, | 185 bool from_ephemeral, |
186 const std::string& old_name) override; | 186 const std::string& old_name) override; |
187 void OnExtensionUninstalled(content::BrowserContext* browser_context, | 187 void OnExtensionUninstalled(content::BrowserContext* browser_context, |
188 const Extension* extension, | 188 const Extension* extension, |
189 extensions::UninstallReason reason) override; | 189 extensions::UninstallReason reason) override; |
| 190 void OnExtensionLoaded(content::BrowserContext* browser_context, |
| 191 const Extension* extension) override; |
190 | 192 |
191 // Updates keybindings for a given |extension|'s page action, browser action | 193 // Updates keybindings for a given |extension|'s page action, browser action |
192 // and named commands. Assigns new keybindings and removes relinquished | 194 // and named commands. Assigns new keybindings and removes relinquished |
193 // keybindings if not changed by the user. In the case of adding keybindings, | 195 // keybindings if not changed by the user. In the case of adding keybindings, |
194 // if the suggested keybinding is free, it will be taken by this extension. If | 196 // if the suggested keybinding is free, it will be taken by this extension. If |
195 // not, the keybinding request is ignored. | 197 // not, the keybinding request is ignored. |
196 void UpdateKeybindings(const Extension* extension); | 198 void UpdateKeybindings(const Extension* extension); |
197 | 199 |
198 // On update, removes keybindings that the extension previously suggested but | 200 // On update, removes keybindings that the extension previously suggested but |
199 // now no longer does, as long as the user has not modified them. | 201 // now no longer does, as long as the user has not modified them. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 DISALLOW_COPY_AND_ASSIGN(CommandService); | 248 DISALLOW_COPY_AND_ASSIGN(CommandService); |
247 }; | 249 }; |
248 | 250 |
249 template <> | 251 template <> |
250 void | 252 void |
251 BrowserContextKeyedAPIFactory<CommandService>::DeclareFactoryDependencies(); | 253 BrowserContextKeyedAPIFactory<CommandService>::DeclareFactoryDependencies(); |
252 | 254 |
253 } // namespace extensions | 255 } // namespace extensions |
254 | 256 |
255 #endif // CHROME_BROWSER_EXTENSIONS_API_COMMANDS_COMMAND_SERVICE_H_ | 257 #endif // CHROME_BROWSER_EXTENSIONS_API_COMMANDS_COMMAND_SERVICE_H_ |
OLD | NEW |