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 24 matching lines...) Expand all Loading... |
35 BLACKLISTED = 1 << 3, | 35 BLACKLISTED = 1 << 3, |
36 EVERYTHING = (1 << 4) - 1, | 36 EVERYTHING = (1 << 4) - 1, |
37 }; | 37 }; |
38 | 38 |
39 explicit ExtensionRegistry(content::BrowserContext* browser_context); | 39 explicit ExtensionRegistry(content::BrowserContext* browser_context); |
40 virtual ~ExtensionRegistry(); | 40 virtual ~ExtensionRegistry(); |
41 | 41 |
42 // Returns the instance for the given |browser_context|. | 42 // Returns the instance for the given |browser_context|. |
43 static ExtensionRegistry* Get(content::BrowserContext* browser_context); | 43 static ExtensionRegistry* Get(content::BrowserContext* browser_context); |
44 | 44 |
| 45 content::BrowserContext* browser_context() const { return browser_context_; } |
| 46 |
45 // NOTE: These sets are *eventually* mututally exclusive, but an extension can | 47 // NOTE: These sets are *eventually* mututally exclusive, but an extension can |
46 // appear in two sets for short periods of time. | 48 // appear in two sets for short periods of time. |
47 const ExtensionSet& enabled_extensions() const { | 49 const ExtensionSet& enabled_extensions() const { |
48 return enabled_extensions_; | 50 return enabled_extensions_; |
49 } | 51 } |
50 const ExtensionSet& disabled_extensions() const { | 52 const ExtensionSet& disabled_extensions() const { |
51 return disabled_extensions_; | 53 return disabled_extensions_; |
52 } | 54 } |
53 const ExtensionSet& terminated_extensions() const { | 55 const ExtensionSet& terminated_extensions() const { |
54 return terminated_extensions_; | 56 return terminated_extensions_; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 ObserverList<ExtensionRegistryObserver> observers_; | 162 ObserverList<ExtensionRegistryObserver> observers_; |
161 | 163 |
162 content::BrowserContext* const browser_context_; | 164 content::BrowserContext* const browser_context_; |
163 | 165 |
164 DISALLOW_COPY_AND_ASSIGN(ExtensionRegistry); | 166 DISALLOW_COPY_AND_ASSIGN(ExtensionRegistry); |
165 }; | 167 }; |
166 | 168 |
167 } // namespace extensions | 169 } // namespace extensions |
168 | 170 |
169 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_H_ | 171 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_H_ |
OLD | NEW |