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 virtual void OnExtensionLoaded(content::BrowserContext* browser_context, |
| 191 const Extension* extension) override; |
| 192 virtual void OnExtensionUnloaded( |
| 193 content::BrowserContext* browser_context, |
| 194 const Extension* extension, |
| 195 UnloadedExtensionInfo::Reason reason) override; |
190 | 196 |
191 // Updates keybindings for a given |extension|'s page action, browser action | 197 // Updates keybindings for a given |extension|'s page action, browser action |
192 // and named commands. Assigns new keybindings and removes relinquished | 198 // and named commands. Assigns new keybindings and removes relinquished |
193 // keybindings if not changed by the user. In the case of adding keybindings, | 199 // 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 | 200 // if the suggested keybinding is free, it will be taken by this extension. If |
195 // not, the keybinding request is ignored. | 201 // not, the keybinding request is ignored. |
196 void UpdateKeybindings(const Extension* extension); | 202 void UpdateKeybindings(const Extension* extension); |
197 | 203 |
198 // On update, removes keybindings that the extension previously suggested but | 204 // On update, removes keybindings that the extension previously suggested but |
199 // now no longer does, as long as the user has not modified them. | 205 // 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); | 252 DISALLOW_COPY_AND_ASSIGN(CommandService); |
247 }; | 253 }; |
248 | 254 |
249 template <> | 255 template <> |
250 void | 256 void |
251 BrowserContextKeyedAPIFactory<CommandService>::DeclareFactoryDependencies(); | 257 BrowserContextKeyedAPIFactory<CommandService>::DeclareFactoryDependencies(); |
252 | 258 |
253 } // namespace extensions | 259 } // namespace extensions |
254 | 260 |
255 #endif // CHROME_BROWSER_EXTENSIONS_API_COMMANDS_COMMAND_SERVICE_H_ | 261 #endif // CHROME_BROWSER_EXTENSIONS_API_COMMANDS_COMMAND_SERVICE_H_ |
OLD | NEW |