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

Unified Diff: chrome/browser/ui/intents/web_intent_picker_controller.h

Issue 10980002: Mac Web Intents Part 1: Show extension download progress (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
Index: chrome/browser/ui/intents/web_intent_picker_controller.h
diff --git a/chrome/browser/ui/intents/web_intent_picker_controller.h b/chrome/browser/ui/intents/web_intent_picker_controller.h
index 78d3c37b2cc718a3599e641c654715049b24985b..05d07890d27d894120a0ec2a47c365598e7c4ad2 100644
--- a/chrome/browser/ui/intents/web_intent_picker_controller.h
+++ b/chrome/browser/ui/intents/web_intent_picker_controller.h
@@ -113,9 +113,15 @@ class WebIntentPickerController
virtual void OnClosing() OVERRIDE;
// extensions::WebstoreInstaller::Delegate implementation.
+ virtual void OnExtensionDownloadStarted(const std::string& id,
+ content::DownloadItem* item) OVERRIDE;
+ virtual void OnExtensionDownloadProgress(
+ const std::string& id,
+ content::DownloadItem* item) OVERRIDE;
virtual void OnExtensionInstallSuccess(const std::string& id) OVERRIDE;
virtual void OnExtensionInstallFailure(const std::string& id,
- const std::string& error) OVERRIDE;
+ const std::string& error,
+ bool cancelled) OVERRIDE;
private:
friend class WebIntentPickerControllerTest;
@@ -244,6 +250,12 @@ class WebIntentPickerController
// loading the picker model and showing the dialog.
void ShowDialog(bool suppress_defaults);
+ // Update the download progress and status string.
+ void UpdateDownloadState(const std::string& id, content::DownloadItem* item);
+
+ // Cancel a pending download if any.
+ void CancelDownload();
+
WebIntentPickerState dialog_state_; // Current state of the dialog.
// A weak pointer to the tab contents that the picker is displayed on.
@@ -324,6 +336,9 @@ class WebIntentPickerController
// |intents_dispatcher_| is set.
web_intents::UMABucket uma_bucket_;
+ // The ID of a pending extension download.
+ content::DownloadId download_id_;
+
DISALLOW_COPY_AND_ASSIGN(WebIntentPickerController);
};

Powered by Google App Engine
This is Rietveld 408576698