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

Unified Diff: chrome/browser/extensions/install_observer.h

Issue 175263003: Add chrome.webstore API methods to allow sites to see progress of installation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/crx_installer.cc ('k') | chrome/browser/extensions/install_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/install_observer.h
diff --git a/chrome/browser/extensions/install_observer.h b/chrome/browser/extensions/install_observer.h
index 72a7a09cfbecf6cdbac84162e21f2f7058dcae05..18231701a784612969c1ff63d2d10b8b278ead68 100644
--- a/chrome/browser/extensions/install_observer.h
+++ b/chrome/browser/extensions/install_observer.h
@@ -33,35 +33,44 @@ class InstallObserver {
// Called at the beginning of the complete installation process, i.e., this
// is called before the extension download begins.
- virtual void OnBeginExtensionInstall(const ExtensionInstallParams& params);
+ virtual void OnBeginExtensionInstall(const ExtensionInstallParams& params) {}
+
+ // Called when the Extension begins the download process. This typically
+ // happens right after OnBeginExtensionInstall(), unless the extension has
+ // already been downloaded.
+ virtual void OnBeginExtensionDownload(const std::string& extension_id) {}
// Called whenever the extension download is updated.
// Note: Some extensions have multiple modules, so the percent included here
// is a simple calculation of:
// (finished_files * 100 + current_file_progress) / (total files * 100).
virtual void OnDownloadProgress(const std::string& extension_id,
- int percent_downloaded);
+ int percent_downloaded) {}
+
+ // Called when the necessary downloads have completed, and the crx
+ // installation is due to start.
+ virtual void OnBeginCrxInstall(const std::string& extension_id) {}
// Called if the extension fails to install.
- virtual void OnInstallFailure(const std::string& extension_id);
+ virtual void OnInstallFailure(const std::string& extension_id) {}
// Called if the installation succeeds.
- virtual void OnExtensionInstalled(const Extension* extension);
+ virtual void OnExtensionInstalled(const Extension* extension) {}
// Called when an extension is [Loaded, Unloaded, Uninstalled] or an app is
// installed to the app list. These are simply forwarded from the
// chrome::NOTIFICATIONs.
- virtual void OnExtensionLoaded(const Extension* extension);
- virtual void OnExtensionUnloaded(const Extension* extension);
- virtual void OnExtensionUninstalled(const Extension* extension);
- virtual void OnDisabledExtensionUpdated(const Extension* extension);
- virtual void OnAppInstalledToAppList(const std::string& extension_id);
+ virtual void OnExtensionLoaded(const Extension* extension) {}
+ virtual void OnExtensionUnloaded(const Extension* extension) {}
+ virtual void OnExtensionUninstalled(const Extension* extension) {}
+ virtual void OnDisabledExtensionUpdated(const Extension* extension) {}
+ virtual void OnAppInstalledToAppList(const std::string& extension_id) {}
// Called when the app list is reordered.
- virtual void OnAppsReordered();
+ virtual void OnAppsReordered() {}
// Notifies observers that the observed object is going away.
- virtual void OnShutdown();
+ virtual void OnShutdown() {}
protected:
virtual ~InstallObserver() {}
« no previous file with comments | « chrome/browser/extensions/crx_installer.cc ('k') | chrome/browser/extensions/install_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698