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

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

Issue 279073003: Add a function triggering extension installed to ExtensionRegistryObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_OBSERVER_H_ 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_REGISTRY_OBSERVER_H_
6 #define EXTENSIONS_BROWSER_EXTENSION_REGISTRY_OBSERVER_H_ 6 #define EXTENSIONS_BROWSER_EXTENSION_REGISTRY_OBSERVER_H_
7 7
8 #include "extensions/common/extension.h" 8 #include "extensions/common/extension.h"
9 9
10 namespace content { 10 namespace content {
(...skipping 15 matching lines...) Expand all
26 // in the enabled_extensions set of ExtensionRegistry. 26 // in the enabled_extensions set of ExtensionRegistry.
27 virtual void OnExtensionLoaded( 27 virtual void OnExtensionLoaded(
28 content::BrowserContext* browser_context, 28 content::BrowserContext* browser_context,
29 const Extension* extension) {} 29 const Extension* extension) {}
30 30
31 // Called after an extension is unloaded. The extension no longer exists in 31 // Called after an extension is unloaded. The extension no longer exists in
32 // any of the ExtensionRegistry sets (enabled, disabled, etc.). 32 // any of the ExtensionRegistry sets (enabled, disabled, etc.).
33 virtual void OnExtensionUnloaded(content::BrowserContext* browser_context, 33 virtual void OnExtensionUnloaded(content::BrowserContext* browser_context,
34 const Extension* extension, 34 const Extension* extension,
35 UnloadedExtensionInfo::Reason reason) {} 35 UnloadedExtensionInfo::Reason reason) {}
36
37 // Called an extension is about to finish install. The extension won't be in
not at google - send to devlin 2014/05/16 23:03:35 Thanks for adding the comment. How about a slight
limasdf 2014/05/17 06:16:19 Done. Thank you.
38 // ExtensionRegistry and about to appear in the ExtensionRegistry.
39 // (But could be in any of the sets(terminated, blacklisted, enabled ,.).
40 // Caller probably want to listen for |OnExtensionLoaded()| unless they really
41 // want to know when an extension is about to be installed.
42 virtual void OnExtensionWillBeInstalled(
43 content::BrowserContext* browser_context,
44 const Extension* extension,
45 bool is_update,
46 const std::string& old_name) {}
36 }; 47 };
37 48
38 } // namespace extensions 49 } // namespace extensions
39 50
40 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_OBSERVER_H_ 51 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698