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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // If true, |from_ephemeral| indicates that the extension was previously | 81 // If true, |from_ephemeral| indicates that the extension was previously |
82 // installed ephemerally and has been promoted to a regular installed | 82 // installed ephemerally and has been promoted to a regular installed |
83 // extension. |is_update| should also be true. | 83 // extension. |is_update| should also be true. |
84 void TriggerOnWillBeInstalled(const Extension* extension, | 84 void TriggerOnWillBeInstalled(const Extension* extension, |
85 bool is_update, | 85 bool is_update, |
86 bool from_ephemeral, | 86 bool from_ephemeral, |
87 const std::string& old_name); | 87 const std::string& old_name); |
88 | 88 |
89 // Invokes the observer method OnExtensionInstalled(). The extension must be | 89 // Invokes the observer method OnExtensionInstalled(). The extension must be |
90 // contained in one of the registry's extension sets. | 90 // contained in one of the registry's extension sets. |
91 void TriggerOnInstalled(const Extension* extension); | 91 void TriggerOnInstalled(const Extension* extension, |
| 92 bool is_update); |
92 | 93 |
93 // Invokes the observer method OnExtensionUninstalled(). The extension must | 94 // Invokes the observer method OnExtensionUninstalled(). The extension must |
94 // not be any installed extension with |extension|'s ID. | 95 // not be any installed extension with |extension|'s ID. |
95 void TriggerOnUninstalled(const Extension* extension); | 96 void TriggerOnUninstalled(const Extension* extension); |
96 | 97 |
97 // Find an extension by ID using |include_mask| to pick the sets to search: | 98 // Find an extension by ID using |include_mask| to pick the sets to search: |
98 // * enabled_extensions() --> ExtensionRegistry::ENABLED | 99 // * enabled_extensions() --> ExtensionRegistry::ENABLED |
99 // * disabled_extensions() --> ExtensionRegistry::DISABLED | 100 // * disabled_extensions() --> ExtensionRegistry::DISABLED |
100 // * terminated_extensions() --> ExtensionRegistry::TERMINATED | 101 // * terminated_extensions() --> ExtensionRegistry::TERMINATED |
101 // * blacklisted_extensions() --> ExtensionRegistry::BLACKLISTED | 102 // * blacklisted_extensions() --> ExtensionRegistry::BLACKLISTED |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 ObserverList<ExtensionRegistryObserver> observers_; | 160 ObserverList<ExtensionRegistryObserver> observers_; |
160 | 161 |
161 content::BrowserContext* const browser_context_; | 162 content::BrowserContext* const browser_context_; |
162 | 163 |
163 DISALLOW_COPY_AND_ASSIGN(ExtensionRegistry); | 164 DISALLOW_COPY_AND_ASSIGN(ExtensionRegistry); |
164 }; | 165 }; |
165 | 166 |
166 } // namespace extensions | 167 } // namespace extensions |
167 | 168 |
168 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_H_ | 169 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_H_ |
OLD | NEW |