Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: extensions/browser/extension_registry.h

Issue 279073003: Add a function triggering extension installed to ExtensionRegistryObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback3 Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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.
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698