Chromium Code Reviews| 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 { |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 30 | 30 |
| 31 // Called after an extension is unloaded. The extension no longer exists in | 31 // Called after an extension is unloaded. The extension no longer exists in |
| 32 // any of the ExtensionRegistry sets (enabled, disabled, etc.). | 32 // any of the ExtensionRegistry sets (enabled, disabled, etc.). |
| 33 virtual void OnExtensionUnloaded(content::BrowserContext* browser_context, | 33 virtual void OnExtensionUnloaded(content::BrowserContext* browser_context, |
| 34 const Extension* extension, | 34 const Extension* extension, |
| 35 UnloadedExtensionInfo::Reason reason) {} | 35 UnloadedExtensionInfo::Reason reason) {} |
| 36 | 36 |
| 37 // Called when |extension| is about to be installed. |is_update| is true if | 37 // Called when |extension| is about to be installed. |is_update| is true if |
| 38 // the installation is the result of it updating, in which case |old_name| is | 38 // the installation is the result of it updating, in which case |old_name| is |
| 39 // the name of the extension's previous version. | 39 // the name of the extension's previous version. |
| 40 // If true, |from_ephemeral| indicates that the extension was previously | |
| 41 // installed ephemerally and has been promoted to a regular installed | |
| 42 // extension. |is_update| will be true, although the version has not | |
| 43 // necessarily changed. | |
| 40 // The ExtensionRegistry will not be tracking |extension| at the time this | 44 // The ExtensionRegistry will not be tracking |extension| at the time this |
| 41 // event is fired, but will be immediately afterwards (note: not necessarily | 45 // event is fired, but will be immediately afterwards (note: not necessarily |
| 42 // enabled; it might be installed in the disabled or even blacklisted sets, | 46 // enabled; it might be installed in the disabled or even blacklisted sets, |
| 43 // for example). | 47 // for example). |
| 44 // Note that it's much more common to care about extensions being loaded | 48 // Note that it's much more common to care about extensions being loaded |
| 45 // (OnExtensionLoaded). | 49 // (OnExtensionLoaded). |
| 46 virtual void OnExtensionWillBeInstalled( | 50 virtual void OnExtensionWillBeInstalled( |
| 47 content::BrowserContext* browser_context, | 51 content::BrowserContext* browser_context, |
| 48 const Extension* extension, | 52 const Extension* extension, |
| 49 bool is_update, | 53 bool is_update, |
| 54 bool from_ephemeral, | |
|
tmdiep
2014/05/25 23:10:38
This flags will be required by these patches (whic
| |
| 50 const std::string& old_name) {} | 55 const std::string& old_name) {} |
| 51 | 56 |
| 52 // Called after an extension is uninstalled. The extension no longer exsit in | 57 // Called after an extension is uninstalled. The extension no longer exsit in |
| 53 // any of the ExtensionRegistry sets (enabled, disabled, etc.). | 58 // any of the ExtensionRegistry sets (enabled, disabled, etc.). |
| 54 virtual void OnExtensionUninstalled(content::BrowserContext* browser_context, | 59 virtual void OnExtensionUninstalled(content::BrowserContext* browser_context, |
| 55 const Extension* extension) {} | 60 const Extension* extension) {} |
| 56 }; | 61 }; |
| 57 | 62 |
| 58 } // namespace extensions | 63 } // namespace extensions |
| 59 | 64 |
| 60 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_OBSERVER_H_ | 65 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_OBSERVER_H_ |
| OLD | NEW |