| 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/common/extension.h" | 8 #include "extensions/common/extension.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| 11 class BrowserContext; | 11 class BrowserContext; |
| 12 } | 12 } |
| 13 | 13 |
| 14 namespace extensions { | 14 namespace extensions { |
| 15 | 15 |
| 16 class Extension; | 16 class Extension; |
| 17 class ExtensionRegistry; |
| 17 struct UnloadedExtensionInfo; | 18 struct UnloadedExtensionInfo; |
| 18 | 19 |
| 19 // Observer for ExtensionRegistry. Exists in a separate header file to reduce | 20 // Observer for ExtensionRegistry. Exists in a separate header file to reduce |
| 20 // the include file burden for typical clients of ExtensionRegistry. | 21 // the include file burden for typical clients of ExtensionRegistry. |
| 21 class ExtensionRegistryObserver { | 22 class ExtensionRegistryObserver { |
| 22 public: | 23 public: |
| 23 virtual ~ExtensionRegistryObserver() {} | 24 virtual ~ExtensionRegistryObserver() {} |
| 24 | 25 |
| 25 // Called after an extension is loaded. The extension will exclusively exist | 26 // Called after an extension is loaded. The extension will exclusively exist |
| 26 // in the enabled_extensions set of ExtensionRegistry. | 27 // in the enabled_extensions set of ExtensionRegistry. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 55 content::BrowserContext* browser_context, | 56 content::BrowserContext* browser_context, |
| 56 const Extension* extension, | 57 const Extension* extension, |
| 57 bool is_update, | 58 bool is_update, |
| 58 bool from_ephemeral, | 59 bool from_ephemeral, |
| 59 const std::string& old_name) {} | 60 const std::string& old_name) {} |
| 60 | 61 |
| 61 // Called after an extension is uninstalled. The extension no longer exsit in | 62 // Called after an extension is uninstalled. The extension no longer exsit in |
| 62 // any of the ExtensionRegistry sets (enabled, disabled, etc.). | 63 // any of the ExtensionRegistry sets (enabled, disabled, etc.). |
| 63 virtual void OnExtensionUninstalled(content::BrowserContext* browser_context, | 64 virtual void OnExtensionUninstalled(content::BrowserContext* browser_context, |
| 64 const Extension* extension) {} | 65 const Extension* extension) {} |
| 66 |
| 67 // Notifies observers that the observed object is going away. |
| 68 virtual void OnShutdown(ExtensionRegistry* registry) {} |
| 65 }; | 69 }; |
| 66 | 70 |
| 67 } // namespace extensions | 71 } // namespace extensions |
| 68 | 72 |
| 69 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_OBSERVER_H_ | 73 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_OBSERVER_H_ |
| OLD | NEW |