| 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_EXTENSION_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 // Updates a currently-installed extension with the contents from | 332 // Updates a currently-installed extension with the contents from |
| 333 // |extension_path|. | 333 // |extension_path|. |
| 334 // TODO(aa): This method can be removed. ExtensionUpdater could use | 334 // TODO(aa): This method can be removed. ExtensionUpdater could use |
| 335 // CrxInstaller directly instead. | 335 // CrxInstaller directly instead. |
| 336 virtual bool UpdateExtension( | 336 virtual bool UpdateExtension( |
| 337 const std::string& id, | 337 const std::string& id, |
| 338 const FilePath& extension_path, | 338 const FilePath& extension_path, |
| 339 const GURL& download_url, | 339 const GURL& download_url, |
| 340 extensions::CrxInstaller** out_crx_installer) OVERRIDE; | 340 extensions::CrxInstaller** out_crx_installer) OVERRIDE; |
| 341 | 341 |
| 342 // Reloads the specified extension. | 342 // Reloads the specified extension, sending the onLaunched() event to it if it |
| 343 // currently has any window showing. |
| 343 void ReloadExtension(const std::string& extension_id); | 344 void ReloadExtension(const std::string& extension_id); |
| 344 | 345 |
| 345 // Restarts the specified extension. | 346 // Reloads an extension, sending the onRestarted() event to it if it currently |
| 347 // has any window showing. |
| 346 void RestartExtension(const std::string& extension_id); | 348 void RestartExtension(const std::string& extension_id); |
| 347 | 349 |
| 350 // Restarts an extension, unconditionally sending the onRestarted() event to |
| 351 // it. |
| 352 void ReloadExtensionWithRestartEvent(const std::string& extension_id); |
| 353 |
| 348 // Uninstalls the specified extension. Callers should only call this method | 354 // Uninstalls the specified extension. Callers should only call this method |
| 349 // with extensions that exist. |external_uninstall| is a magical parameter | 355 // with extensions that exist. |external_uninstall| is a magical parameter |
| 350 // that is only used to send information to ExtensionPrefs, which external | 356 // that is only used to send information to ExtensionPrefs, which external |
| 351 // callers should never set to true. | 357 // callers should never set to true. |
| 352 // | 358 // |
| 353 // We pass the |extension_id| by value to avoid having it deleted from under | 359 // We pass the |extension_id| by value to avoid having it deleted from under |
| 354 // us incase someone calls it with Extension::id() or another string that we | 360 // us incase someone calls it with Extension::id() or another string that we |
| 355 // are going to delete in this function. | 361 // are going to delete in this function. |
| 356 // | 362 // |
| 357 // TODO(aa): Remove |external_uninstall| -- this information should be passed | 363 // TODO(aa): Remove |external_uninstall| -- this information should be passed |
| (...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 994 #endif | 1000 #endif |
| 995 | 1001 |
| 996 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 1002 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 997 InstallAppsWithUnlimtedStorage); | 1003 InstallAppsWithUnlimtedStorage); |
| 998 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 1004 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 999 InstallAppsAndCheckStorageProtection); | 1005 InstallAppsAndCheckStorageProtection); |
| 1000 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 1006 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 1001 }; | 1007 }; |
| 1002 | 1008 |
| 1003 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 1009 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |