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

Unified Diff: chrome/browser/ui/intents/web_intent_picker_model.cc

Issue 11035017: Mac Web Intents Part 15: Inline extension install prompt (model) (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_model.cc
diff --git a/chrome/browser/ui/intents/web_intent_picker_model.cc b/chrome/browser/ui/intents/web_intent_picker_model.cc
index bd38ec2863729a2004034a1031f3f3883a664d65..4e03b9dd9a56bef875c6cffb279e8cbbc60aa391 100644
--- a/chrome/browser/ui/intents/web_intent_picker_model.cc
+++ b/chrome/browser/ui/intents/web_intent_picker_model.cc
@@ -25,7 +25,8 @@ WebIntentPickerModel::WebIntentPickerModel()
: observer_(NULL),
waiting_for_suggestions_(true),
default_service_hash_(0),
- pending_install_download_percent_(0) {
+ pending_install_download_percent_(0),
+ pending_install_prompt_(NULL) {
}
WebIntentPickerModel::~WebIntentPickerModel() {
@@ -197,10 +198,26 @@ void WebIntentPickerModel::SetPendingInstallStatusString(
observer_->OnModelChanged(this);
}
+void WebIntentPickerModel::SetPendingInstallDelegate(
+ ExtensionInstallPrompt::Delegate* delegate) {
+ pending_install_delegate_ = delegate;
+ if (observer_)
+ observer_->OnModelChanged(this);
+}
+
+void WebIntentPickerModel::SetPendingInstallPrompt(
+ const ExtensionInstallPrompt::Prompt& prompt) {
+ pending_install_prompt_.reset(new ExtensionInstallPrompt::Prompt(prompt));
+ if (observer_)
+ observer_->OnModelChanged(this);
+}
+
void WebIntentPickerModel::ClearPendingInstall() {
pending_install_extension_id_.clear();
pending_install_download_percent_ = 0;
pending_install_status_string_.clear();
+ pending_install_delegate_ = NULL;
+ pending_install_prompt_.reset();
if (observer_)
observer_->OnModelChanged(this);
}

Powered by Google App Engine
This is Rietveld 408576698