summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/webstore_installer.h
diff options
context:
space:
mode:
authorsail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-03 05:42:29 +0000
committersail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-03 05:42:29 +0000
commitbcd1eaf7295568d672bd856d6f6e4061bb3a5d2e (patch)
tree23c161c1f0bff0caf9db1ab9a9b9a476d3461025 /chrome/browser/extensions/webstore_installer.h
parent0f6f446b9e6c6ac11b6359d205a88ae80716fa8e (diff)
downloadchromium_src-bcd1eaf7295568d672bd856d6f6e4061bb3a5d2e.zip
chromium_src-bcd1eaf7295568d672bd856d6f6e4061bb3a5d2e.tar.gz
chromium_src-bcd1eaf7295568d672bd856d6f6e4061bb3a5d2e.tar.bz2
Mac Web Intents Part 1: Show extension download progress
As per spec we want to show the extension download UI through the Web Intents Picker dialog. This CL also pipes download progress to the WebIntentPickerModel. I'll send out a separate CL to update the Mac UI to show the download progress. I also have a separate CL out for review to hide the download from the browser download shelf: https://codereview.chromium.org/11016022 BUG=152010 TEST=Go to http://webintents.org. Click share. Click "Add to Chrome". Verify that the download shelf is not shown. Review URL: https://chromiumcodereview.appspot.com/10980002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159836 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/webstore_installer.h')
-rw-r--r--chrome/browser/extensions/webstore_installer.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/chrome/browser/extensions/webstore_installer.h b/chrome/browser/extensions/webstore_installer.h
index 1555234..2224305 100644
--- a/chrome/browser/extensions/webstore_installer.h
+++ b/chrome/browser/extensions/webstore_installer.h
@@ -44,11 +44,21 @@ class WebstoreInstaller :public content::NotificationObserver,
FLAG_INLINE_INSTALL = 1 << 0
};
+ enum FailureReason {
+ FAILURE_REASON_CANCELLED,
+ FAILURE_REASON_OTHER
+ };
+
class Delegate {
public:
+ virtual void OnExtensionDownloadStarted(const std::string& id,
+ content::DownloadItem* item);
+ virtual void OnExtensionDownloadProgress(const std::string& id,
+ content::DownloadItem* item);
virtual void OnExtensionInstallSuccess(const std::string& id) = 0;
virtual void OnExtensionInstallFailure(const std::string& id,
- const std::string& error) = 0;
+ const std::string& error,
+ FailureReason reason) = 0;
protected:
virtual ~Delegate() {}
@@ -145,7 +155,7 @@ class WebstoreInstaller :public content::NotificationObserver,
// Reports an install |error| to the delegate for the given extension if this
// managed its installation. This also removes the associated PendingInstall.
- void ReportFailure(const std::string& error);
+ void ReportFailure(const std::string& error, FailureReason reason);
// Reports a successful install to the delegate for the given extension if
// this managed its installation. This also removes the associated