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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 } | 178 } |
179 static const bool kServiceRedirectedInIncognito = true; | 179 static const bool kServiceRedirectedInIncognito = true; |
180 | 180 |
181 // ExtensionRegistryObserver. | 181 // ExtensionRegistryObserver. |
182 virtual void OnExtensionWillBeInstalled( | 182 virtual void OnExtensionWillBeInstalled( |
183 content::BrowserContext* browser_context, | 183 content::BrowserContext* browser_context, |
184 const Extension* extension, | 184 const Extension* extension, |
185 bool is_update, | 185 bool is_update, |
186 bool from_ephemeral, | 186 bool from_ephemeral, |
187 const std::string& old_name) OVERRIDE; | 187 const std::string& old_name) OVERRIDE; |
188 virtual void OnExtensionUninstalled(content::BrowserContext* browser_context, | 188 virtual void OnExtensionUninstalled( |
189 const Extension* extension) OVERRIDE; | 189 content::BrowserContext* browser_context, |
| 190 const Extension* extension, |
| 191 extensions::UninstallReason reason) 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 |