OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_REGISTRY_H_ |
6 #define EXTENSIONS_BROWSER_EXTENSION_REGISTRY_H_ | 6 #define EXTENSIONS_BROWSER_EXTENSION_REGISTRY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 95 |
96 // Invokes the observer method OnExtensionUnloaded(). The extension must not | 96 // Invokes the observer method OnExtensionUnloaded(). The extension must not |
97 // be enabled at the time of the call. | 97 // be enabled at the time of the call. |
98 void TriggerOnUnloaded(const Extension* extension, | 98 void TriggerOnUnloaded(const Extension* extension, |
99 UnloadedExtensionInfo::Reason reason); | 99 UnloadedExtensionInfo::Reason reason); |
100 | 100 |
101 // If this is a fresh install then |is_update| is false and there must not be | 101 // If this is a fresh install then |is_update| is false and there must not be |
102 // any installed extension with |extension|'s ID. If this is an update then | 102 // any installed extension with |extension|'s ID. If this is an update then |
103 // |is_update| is true and must be an installed extension with |extension|'s | 103 // |is_update| is true and must be an installed extension with |extension|'s |
104 // ID, and |old_name| must be non-empty. | 104 // ID, and |old_name| must be non-empty. |
105 // If true, |from_ephemeral| indicates that the extension was previously | |
106 // installed ephemerally and has been promoted to a regular installed | |
107 // extension. |is_update| should also be true. | |
108 void TriggerOnWillBeInstalled(const Extension* extension, | 105 void TriggerOnWillBeInstalled(const Extension* extension, |
109 bool is_update, | 106 bool is_update, |
110 bool from_ephemeral, | |
111 const std::string& old_name); | 107 const std::string& old_name); |
112 | 108 |
113 // Invokes the observer method OnExtensionInstalled(). The extension must be | 109 // Invokes the observer method OnExtensionInstalled(). The extension must be |
114 // contained in one of the registry's extension sets. | 110 // contained in one of the registry's extension sets. |
115 void TriggerOnInstalled(const Extension* extension, | 111 void TriggerOnInstalled(const Extension* extension, |
116 bool is_update); | 112 bool is_update); |
117 | 113 |
118 // Invokes the observer method OnExtensionUninstalled(). The extension must | 114 // Invokes the observer method OnExtensionUninstalled(). The extension must |
119 // not be any installed extension with |extension|'s ID. | 115 // not be any installed extension with |extension|'s ID. |
120 void TriggerOnUninstalled(const Extension* extension, UninstallReason reason); | 116 void TriggerOnUninstalled(const Extension* extension, UninstallReason reason); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 base::ObserverList<ExtensionRegistryObserver> observers_; | 194 base::ObserverList<ExtensionRegistryObserver> observers_; |
199 | 195 |
200 content::BrowserContext* const browser_context_; | 196 content::BrowserContext* const browser_context_; |
201 | 197 |
202 DISALLOW_COPY_AND_ASSIGN(ExtensionRegistry); | 198 DISALLOW_COPY_AND_ASSIGN(ExtensionRegistry); |
203 }; | 199 }; |
204 | 200 |
205 } // namespace extensions | 201 } // namespace extensions |
206 | 202 |
207 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_H_ | 203 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_H_ |
OLD | NEW |