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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 | 194 |
195 // ExtensionRegistryObserver. | 195 // ExtensionRegistryObserver. |
196 void OnExtensionWillBeInstalled(content::BrowserContext* browser_context, | 196 void OnExtensionWillBeInstalled(content::BrowserContext* browser_context, |
197 const Extension* extension, | 197 const Extension* extension, |
198 bool is_update, | 198 bool is_update, |
199 bool from_ephemeral, | 199 bool from_ephemeral, |
200 const std::string& old_name) override; | 200 const std::string& old_name) override; |
201 void OnExtensionUninstalled(content::BrowserContext* browser_context, | 201 void OnExtensionUninstalled(content::BrowserContext* browser_context, |
202 const Extension* extension, | 202 const Extension* extension, |
203 extensions::UninstallReason reason) override; | 203 extensions::UninstallReason reason) override; |
| 204 void OnExtensionLoaded(content::BrowserContext* browser_context, |
| 205 const Extension* extension) override; |
204 | 206 |
205 // Updates keybindings for a given |extension|'s page action, browser action | 207 // Updates keybindings for a given |extension|'s page action, browser action |
206 // and named commands. Assigns new keybindings and removes relinquished | 208 // and named commands. Assigns new keybindings and removes relinquished |
207 // keybindings if not changed by the user. In the case of adding keybindings, | 209 // keybindings if not changed by the user. In the case of adding keybindings, |
208 // if the suggested keybinding is free, it will be taken by this extension. If | 210 // if the suggested keybinding is free, it will be taken by this extension. If |
209 // not, the keybinding request is ignored. | 211 // not, the keybinding request is ignored. |
210 void UpdateKeybindings(const Extension* extension); | 212 void UpdateKeybindings(const Extension* extension); |
211 | 213 |
212 // On update, removes keybindings that the extension previously suggested but | 214 // On update, removes keybindings that the extension previously suggested but |
213 // now no longer does, as long as the user has not modified them. | 215 // 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... |
260 DISALLOW_COPY_AND_ASSIGN(CommandService); | 262 DISALLOW_COPY_AND_ASSIGN(CommandService); |
261 }; | 263 }; |
262 | 264 |
263 template <> | 265 template <> |
264 void | 266 void |
265 BrowserContextKeyedAPIFactory<CommandService>::DeclareFactoryDependencies(); | 267 BrowserContextKeyedAPIFactory<CommandService>::DeclareFactoryDependencies(); |
266 | 268 |
267 } // namespace extensions | 269 } // namespace extensions |
268 | 270 |
269 #endif // CHROME_BROWSER_EXTENSIONS_API_COMMANDS_COMMAND_SERVICE_H_ | 271 #endif // CHROME_BROWSER_EXTENSIONS_API_COMMANDS_COMMAND_SERVICE_H_ |
OLD | NEW |