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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
67 | 67 |
68 // Invokes the observer method OnExtensionLoaded(). The extension must be | 68 // Invokes the observer method OnExtensionLoaded(). The extension must be |
69 // enabled at the time of the call. | 69 // enabled at the time of the call. |
70 void TriggerOnLoaded(const Extension* extension); | 70 void TriggerOnLoaded(const Extension* extension); |
71 | 71 |
72 // Invokes the observer method OnExtensionUnloaded(). The extension must not | 72 // Invokes the observer method OnExtensionUnloaded(). The extension must not |
73 // be enabled at the time of the call. | 73 // be enabled at the time of the call. |
74 void TriggerOnUnloaded(const Extension* extension, | 74 void TriggerOnUnloaded(const Extension* extension, |
75 UnloadedExtensionInfo::Reason reason); | 75 UnloadedExtensionInfo::Reason reason); |
76 | 76 |
77 // Invokes the observer method OnExtensionWillBeInstalled(). The extension | |
78 // must not be tracked at the time of the call, and the caller should ensure | |
79 // to track it afterward. | |
not at google - send to devlin
2014/05/20 18:27:12
This comment is wrong again. It needs to take into
limasdf
2014/05/21 15:35:08
Done.
| |
80 void TriggerOnWillBeInstalled(const Extension* extension, | |
81 bool is_update, | |
82 const std::string& old_name); | |
83 | |
77 // Find an extension by ID using |include_mask| to pick the sets to search: | 84 // Find an extension by ID using |include_mask| to pick the sets to search: |
78 // * enabled_extensions() --> ExtensionRegistry::ENABLED | 85 // * enabled_extensions() --> ExtensionRegistry::ENABLED |
79 // * disabled_extensions() --> ExtensionRegistry::DISABLED | 86 // * disabled_extensions() --> ExtensionRegistry::DISABLED |
80 // * terminated_extensions() --> ExtensionRegistry::TERMINATED | 87 // * terminated_extensions() --> ExtensionRegistry::TERMINATED |
81 // * blacklisted_extensions() --> ExtensionRegistry::BLACKLISTED | 88 // * blacklisted_extensions() --> ExtensionRegistry::BLACKLISTED |
82 // Returns NULL if the extension is not found in the selected sets. | 89 // Returns NULL if the extension is not found in the selected sets. |
83 const Extension* GetExtensionById(const std::string& id, | 90 const Extension* GetExtensionById(const std::string& id, |
84 int include_mask) const; | 91 int include_mask) const; |
85 | 92 |
86 // Adds the specified extension to the enabled set. The registry becomes an | 93 // Adds the specified extension to the enabled set. The registry becomes an |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
139 ObserverList<ExtensionRegistryObserver> observers_; | 146 ObserverList<ExtensionRegistryObserver> observers_; |
140 | 147 |
141 content::BrowserContext* const browser_context_; | 148 content::BrowserContext* const browser_context_; |
142 | 149 |
143 DISALLOW_COPY_AND_ASSIGN(ExtensionRegistry); | 150 DISALLOW_COPY_AND_ASSIGN(ExtensionRegistry); |
144 }; | 151 }; |
145 | 152 |
146 } // namespace extensions | 153 } // namespace extensions |
147 | 154 |
148 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_H_ | 155 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_H_ |
OLD | NEW |