| 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/common/extension.h" | 9 #include "extensions/common/extension.h" |
| 9 | 10 |
| 10 namespace content { | 11 namespace content { |
| 11 class BrowserContext; | 12 class BrowserContext; |
| 12 } | 13 } |
| 13 | 14 |
| 14 namespace extensions { | 15 namespace extensions { |
| 15 | 16 |
| 16 class Extension; | 17 class Extension; |
| 17 class ExtensionRegistry; | 18 class ExtensionRegistry; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 // Called when the installation of |extension| is complete. At this point the | 63 // Called when the installation of |extension| is complete. At this point the |
| 63 // extension is tracked in one of the ExtensionRegistry sets, but is not | 64 // extension is tracked in one of the ExtensionRegistry sets, but is not |
| 64 // necessarily enabled. | 65 // necessarily enabled. |
| 65 virtual void OnExtensionInstalled(content::BrowserContext* browser_context, | 66 virtual void OnExtensionInstalled(content::BrowserContext* browser_context, |
| 66 const Extension* extension, | 67 const Extension* extension, |
| 67 bool is_update) {} | 68 bool is_update) {} |
| 68 | 69 |
| 69 // Called after an extension is uninstalled. The extension no longer exists in | 70 // Called after an extension is uninstalled. The extension no longer exists in |
| 70 // any of the ExtensionRegistry sets (enabled, disabled, etc.). | 71 // any of the ExtensionRegistry sets (enabled, disabled, etc.). |
| 71 virtual void OnExtensionUninstalled(content::BrowserContext* browser_context, | 72 virtual void OnExtensionUninstalled(content::BrowserContext* browser_context, |
| 72 const Extension* extension) {} | 73 const Extension* extension, |
| 74 UninstallReason reason) {} |
| 73 | 75 |
| 74 // Notifies observers that the observed object is going away. | 76 // Notifies observers that the observed object is going away. |
| 75 virtual void OnShutdown(ExtensionRegistry* registry) {} | 77 virtual void OnShutdown(ExtensionRegistry* registry) {} |
| 76 }; | 78 }; |
| 77 | 79 |
| 78 } // namespace extensions | 80 } // namespace extensions |
| 79 | 81 |
| 80 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_OBSERVER_H_ | 82 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_OBSERVER_H_ |
| OLD | NEW |