| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 EXTENSIONS_BROWSER_EXTENSION_REGISTRY_OBSERVER_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_REGISTRY_OBSERVER_H_ |
| 6 #define EXTENSIONS_BROWSER_EXTENSION_REGISTRY_OBSERVER_H_ | 6 #define EXTENSIONS_BROWSER_EXTENSION_REGISTRY_OBSERVER_H_ |
| 7 | 7 |
| 8 #include "extensions/browser/uninstall_reason.h" | 8 #include "extensions/browser/uninstall_reason.h" |
| 9 #include "extensions/common/extension.h" | 9 #include "extensions/common/extension.h" |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 public: | 24 public: |
| 25 virtual ~ExtensionRegistryObserver() {} | 25 virtual ~ExtensionRegistryObserver() {} |
| 26 | 26 |
| 27 // Called after an extension is loaded. The extension will exclusively exist | 27 // Called after an extension is loaded. The extension will exclusively exist |
| 28 // in the enabled_extensions set of ExtensionRegistry. | 28 // in the enabled_extensions set of ExtensionRegistry. |
| 29 virtual void OnExtensionLoaded( | 29 virtual void OnExtensionLoaded( |
| 30 content::BrowserContext* browser_context, | 30 content::BrowserContext* browser_context, |
| 31 const Extension* extension) {} | 31 const Extension* extension) {} |
| 32 | 32 |
| 33 // Called after an extension is unloaded. The extension no longer exists in | 33 // Called after an extension is unloaded. The extension no longer exists in |
| 34 // any of the ExtensionRegistry sets (enabled, disabled, etc.). | 34 // the set |ExtensionRegistry::enabled_extensions()|, but it can still be a |
| 35 // member of one of the other sets, like disabled, blacklisted or terminated. |
| 35 virtual void OnExtensionUnloaded(content::BrowserContext* browser_context, | 36 virtual void OnExtensionUnloaded(content::BrowserContext* browser_context, |
| 36 const Extension* extension, | 37 const Extension* extension, |
| 37 UnloadedExtensionInfo::Reason reason) {} | 38 UnloadedExtensionInfo::Reason reason) {} |
| 38 | 39 |
| 39 // Called when |extension| is about to be installed. |is_update| is true if | 40 // Called when |extension| is about to be installed. |is_update| is true if |
| 40 // the installation is the result of it updating, in which case |old_name| is | 41 // the installation is the result of it updating, in which case |old_name| is |
| 41 // the name of the extension's previous version. | 42 // the name of the extension's previous version. |
| 42 // If true, |from_ephemeral| indicates that the extension was previously | 43 // If true, |from_ephemeral| indicates that the extension was previously |
| 43 // installed ephemerally and has been promoted to a regular installed | 44 // installed ephemerally and has been promoted to a regular installed |
| 44 // extension. |is_update| will be true, although the version has not | 45 // extension. |is_update| will be true, although the version has not |
| (...skipping 28 matching lines...) Expand all Loading... |
| 73 const Extension* extension, | 74 const Extension* extension, |
| 74 UninstallReason reason) {} | 75 UninstallReason reason) {} |
| 75 | 76 |
| 76 // Notifies observers that the observed object is going away. | 77 // Notifies observers that the observed object is going away. |
| 77 virtual void OnShutdown(ExtensionRegistry* registry) {} | 78 virtual void OnShutdown(ExtensionRegistry* registry) {} |
| 78 }; | 79 }; |
| 79 | 80 |
| 80 } // namespace extensions | 81 } // namespace extensions |
| 81 | 82 |
| 82 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_OBSERVER_H_ | 83 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_OBSERVER_H_ |
| OLD | NEW |