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 OnExtensionInstalled(). The extension must not | |
78 // be installed at the time of the call. | |
79 void TriggerOnInstalled(const Extension* extension, | |
80 InstalledExtensionInfo info); | |
81 | |
not at google - send to devlin
2014/05/14 18:17:50
you might as well add the Uninstalled observer her
limasdf
2014/05/16 01:02:35
Yep, That's my plan. Can I do it from seperate CL?
not at google - send to devlin
2014/05/16 13:49:03
Sure.
| |
77 // Find an extension by ID using |include_mask| to pick the sets to search: | 82 // Find an extension by ID using |include_mask| to pick the sets to search: |
78 // * enabled_extensions() --> ExtensionRegistry::ENABLED | 83 // * enabled_extensions() --> ExtensionRegistry::ENABLED |
79 // * disabled_extensions() --> ExtensionRegistry::DISABLED | 84 // * disabled_extensions() --> ExtensionRegistry::DISABLED |
80 // * terminated_extensions() --> ExtensionRegistry::TERMINATED | 85 // * terminated_extensions() --> ExtensionRegistry::TERMINATED |
81 // * blacklisted_extensions() --> ExtensionRegistry::BLACKLISTED | 86 // * blacklisted_extensions() --> ExtensionRegistry::BLACKLISTED |
82 // Returns NULL if the extension is not found in the selected sets. | 87 // Returns NULL if the extension is not found in the selected sets. |
83 const Extension* GetExtensionById(const std::string& id, | 88 const Extension* GetExtensionById(const std::string& id, |
84 int include_mask) const; | 89 int include_mask) const; |
85 | 90 |
86 // Adds the specified extension to the enabled set. The registry becomes an | 91 // 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_; | 144 ObserverList<ExtensionRegistryObserver> observers_; |
140 | 145 |
141 content::BrowserContext* const browser_context_; | 146 content::BrowserContext* const browser_context_; |
142 | 147 |
143 DISALLOW_COPY_AND_ASSIGN(ExtensionRegistry); | 148 DISALLOW_COPY_AND_ASSIGN(ExtensionRegistry); |
144 }; | 149 }; |
145 | 150 |
146 } // namespace extensions | 151 } // namespace extensions |
147 | 152 |
148 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_H_ | 153 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_H_ |
OLD | NEW |