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

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: fix merge Created 8 years, 2 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/ui/intents/web_intent_picker_model.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 90bf21f66d183d1c25d9dc59820e2bdcae740a04..c907325d36434b1904e23b04e09a8bb623080c77 100644
--- a/chrome/browser/ui/intents/web_intent_picker_model.cc
+++ b/chrome/browser/ui/intents/web_intent_picker_model.cc
@@ -26,7 +26,8 @@ const size_t kMaxSuggestionCount = 5; // Maximum number of visible suggestions.
WebIntentPickerModel::WebIntentPickerModel()
: observer_(NULL),
waiting_for_suggestions_(true),
- pending_extension_install_download_progress_(0) {
+ pending_extension_install_download_progress_(0),
+ pending_extension_install_delegate_(NULL) {
}
WebIntentPickerModel::~WebIntentPickerModel() {
@@ -208,10 +209,27 @@ void WebIntentPickerModel::SetPendingExtensionInstallStatusString(
observer_->OnModelChanged(this);
}
+void WebIntentPickerModel::SetPendingExtensionInstallDelegate(
+ ExtensionInstallPrompt::Delegate* delegate) {
+ pending_extension_install_delegate_ = delegate;
+ if (observer_)
+ observer_->OnModelChanged(this);
+}
+
+void WebIntentPickerModel::SetPendingExtensionInstallPrompt(
+ const ExtensionInstallPrompt::Prompt& prompt) {
+ pending_extension_install_prompt_.reset(
+ new ExtensionInstallPrompt::Prompt(prompt));
+ if (observer_)
+ observer_->OnModelChanged(this);
+}
+
void WebIntentPickerModel::ClearPendingExtensionInstall() {
pending_extension_install_id_.clear();
pending_extension_install_download_progress_ = 0;
pending_extension_install_status_string_.clear();
+ pending_extension_install_delegate_ = NULL;
+ pending_extension_install_prompt_.reset();
if (observer_)
observer_->OnModelChanged(this);
}
« no previous file with comments | « chrome/browser/ui/intents/web_intent_picker_model.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698