| 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 // BrowserContextKeyedAPI implementation. | 206 // BrowserContextKeyedAPI implementation. |
| 207 static const char* service_name() { | 207 static const char* service_name() { |
| 208 return "CommandService"; | 208 return "CommandService"; |
| 209 } | 209 } |
| 210 static const bool kServiceRedirectedInIncognito = true; | 210 static const bool kServiceRedirectedInIncognito = true; |
| 211 | 211 |
| 212 // ExtensionRegistryObserver. | 212 // ExtensionRegistryObserver. |
| 213 void OnExtensionWillBeInstalled(content::BrowserContext* browser_context, | 213 void OnExtensionWillBeInstalled(content::BrowserContext* browser_context, |
| 214 const Extension* extension, | 214 const Extension* extension, |
| 215 bool is_update, | 215 bool is_update, |
| 216 bool from_ephemeral, | |
| 217 const std::string& old_name) override; | 216 const std::string& old_name) override; |
| 218 void OnExtensionUninstalled(content::BrowserContext* browser_context, | 217 void OnExtensionUninstalled(content::BrowserContext* browser_context, |
| 219 const Extension* extension, | 218 const Extension* extension, |
| 220 extensions::UninstallReason reason) override; | 219 extensions::UninstallReason reason) override; |
| 221 | 220 |
| 222 // Updates keybindings for a given |extension|'s page action, browser action | 221 // Updates keybindings for a given |extension|'s page action, browser action |
| 223 // and named commands. Assigns new keybindings and removes relinquished | 222 // and named commands. Assigns new keybindings and removes relinquished |
| 224 // keybindings if not changed by the user. In the case of adding keybindings, | 223 // keybindings if not changed by the user. In the case of adding keybindings, |
| 225 // if the suggested keybinding is free, it will be taken by this extension. If | 224 // if the suggested keybinding is free, it will be taken by this extension. If |
| 226 // not, the keybinding request is ignored. | 225 // not, the keybinding request is ignored. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 DISALLOW_COPY_AND_ASSIGN(CommandService); | 278 DISALLOW_COPY_AND_ASSIGN(CommandService); |
| 280 }; | 279 }; |
| 281 | 280 |
| 282 template <> | 281 template <> |
| 283 void | 282 void |
| 284 BrowserContextKeyedAPIFactory<CommandService>::DeclareFactoryDependencies(); | 283 BrowserContextKeyedAPIFactory<CommandService>::DeclareFactoryDependencies(); |
| 285 | 284 |
| 286 } // namespace extensions | 285 } // namespace extensions |
| 287 | 286 |
| 288 #endif // CHROME_BROWSER_EXTENSIONS_API_COMMANDS_COMMAND_SERVICE_H_ | 287 #endif // CHROME_BROWSER_EXTENSIONS_API_COMMANDS_COMMAND_SERVICE_H_ |
| OLD | NEW |