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; | |
206 | 204 |
207 // Updates keybindings for a given |extension|'s page action, browser action | 205 // Updates keybindings for a given |extension|'s page action, browser action |
208 // and named commands. Assigns new keybindings and removes relinquished | 206 // and named commands. Assigns new keybindings and removes relinquished |
209 // keybindings if not changed by the user. In the case of adding keybindings, | 207 // keybindings if not changed by the user. In the case of adding keybindings, |
210 // if the suggested keybinding is free, it will be taken by this extension. If | 208 // if the suggested keybinding is free, it will be taken by this extension. If |
211 // not, the keybinding request is ignored. | 209 // not, the keybinding request is ignored. |
212 void UpdateKeybindings(const Extension* extension); | 210 void UpdateKeybindings(const Extension* extension); |
213 | 211 |
214 // On update, removes keybindings that the extension previously suggested but | 212 // On update, removes keybindings that the extension previously suggested but |
215 // now no longer does, as long as the user has not modified them. | 213 // 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... |
262 DISALLOW_COPY_AND_ASSIGN(CommandService); | 260 DISALLOW_COPY_AND_ASSIGN(CommandService); |
263 }; | 261 }; |
264 | 262 |
265 template <> | 263 template <> |
266 void | 264 void |
267 BrowserContextKeyedAPIFactory<CommandService>::DeclareFactoryDependencies(); | 265 BrowserContextKeyedAPIFactory<CommandService>::DeclareFactoryDependencies(); |
268 | 266 |
269 } // namespace extensions | 267 } // namespace extensions |
270 | 268 |
271 #endif // CHROME_BROWSER_EXTENSIONS_API_COMMANDS_COMMAND_SERVICE_H_ | 269 #endif // CHROME_BROWSER_EXTENSIONS_API_COMMANDS_COMMAND_SERVICE_H_ |
OLD | NEW |