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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 return terminated_extensions_; | 63 return terminated_extensions_; |
64 } | 64 } |
65 const ExtensionSet& blacklisted_extensions() const { | 65 const ExtensionSet& blacklisted_extensions() const { |
66 return blacklisted_extensions_; | 66 return blacklisted_extensions_; |
67 } | 67 } |
68 const ExtensionSet& blocked_extensions() const { return blocked_extensions_; } | 68 const ExtensionSet& blocked_extensions() const { return blocked_extensions_; } |
69 const ExtensionSet& ready_extensions() const { return ready_extensions_; } | 69 const ExtensionSet& ready_extensions() const { return ready_extensions_; } |
70 | 70 |
71 // Returns the set of all installed extensions, regardless of state (enabled, | 71 // Returns the set of all installed extensions, regardless of state (enabled, |
72 // disabled, etc). Equivalent to GenerateInstalledExtensionSet(EVERYTHING). | 72 // disabled, etc). Equivalent to GenerateInstalledExtensionSet(EVERYTHING). |
73 scoped_ptr<ExtensionSet> GenerateInstalledExtensionsSet() const; | 73 std::unique_ptr<ExtensionSet> GenerateInstalledExtensionsSet() const; |
74 | 74 |
75 // Returns a set of all extensions in the subsets specified by |include_mask|. | 75 // Returns a set of all extensions in the subsets specified by |include_mask|. |
76 // * enabled_extensions() --> ExtensionRegistry::ENABLED | 76 // * enabled_extensions() --> ExtensionRegistry::ENABLED |
77 // * disabled_extensions() --> ExtensionRegistry::DISABLED | 77 // * disabled_extensions() --> ExtensionRegistry::DISABLED |
78 // * terminated_extensions() --> ExtensionRegistry::TERMINATED | 78 // * terminated_extensions() --> ExtensionRegistry::TERMINATED |
79 // * blacklisted_extensions() --> ExtensionRegistry::BLACKLISTED | 79 // * blacklisted_extensions() --> ExtensionRegistry::BLACKLISTED |
80 // * blocked_extensions() --> ExtensionRegistry::BLOCKED | 80 // * blocked_extensions() --> ExtensionRegistry::BLOCKED |
81 scoped_ptr<ExtensionSet> GenerateInstalledExtensionsSet( | 81 std::unique_ptr<ExtensionSet> GenerateInstalledExtensionsSet( |
82 int include_mask) const; | 82 int include_mask) const; |
83 | 83 |
84 // The usual observer interface. | 84 // The usual observer interface. |
85 void AddObserver(ExtensionRegistryObserver* observer); | 85 void AddObserver(ExtensionRegistryObserver* observer); |
86 void RemoveObserver(ExtensionRegistryObserver* observer); | 86 void RemoveObserver(ExtensionRegistryObserver* observer); |
87 | 87 |
88 // Invokes the observer method OnExtensionLoaded(). The extension must be | 88 // Invokes the observer method OnExtensionLoaded(). The extension must be |
89 // enabled at the time of the call. | 89 // enabled at the time of the call. |
90 void TriggerOnLoaded(const Extension* extension); | 90 void TriggerOnLoaded(const Extension* extension); |
91 | 91 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 base::ObserverList<ExtensionRegistryObserver> observers_; | 195 base::ObserverList<ExtensionRegistryObserver> observers_; |
196 | 196 |
197 content::BrowserContext* const browser_context_; | 197 content::BrowserContext* const browser_context_; |
198 | 198 |
199 DISALLOW_COPY_AND_ASSIGN(ExtensionRegistry); | 199 DISALLOW_COPY_AND_ASSIGN(ExtensionRegistry); |
200 }; | 200 }; |
201 | 201 |
202 } // namespace extensions | 202 } // namespace extensions |
203 | 203 |
204 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_H_ | 204 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_H_ |
OLD | NEW |