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

Unified Diff: chrome/browser/extensions/extension_install_prompt.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, 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
Index: chrome/browser/extensions/extension_install_prompt.cc
diff --git a/chrome/browser/extensions/extension_install_prompt.cc b/chrome/browser/extensions/extension_install_prompt.cc
index 48db2863b3421359c61a12d14409d0af42a5d25b..d0365bbe012ae98bda334792730fdfb4748445f7 100644
--- a/chrome/browser/extensions/extension_install_prompt.cc
+++ b/chrome/browser/extensions/extension_install_prompt.cc
@@ -355,16 +355,19 @@ void ExtensionInstallPrompt::ConfirmWebstoreInstall(Delegate* delegate,
// remaining fields.
extension_ = extension;
SetIcon(icon);
- ConfirmInstall(delegate, extension);
+ ConfirmInstall(delegate, extension, ShowDialogCallback());
}
-void ExtensionInstallPrompt::ConfirmInstall(Delegate* delegate,
- const Extension* extension) {
+void ExtensionInstallPrompt::ConfirmInstall(
+ Delegate* delegate,
+ const Extension* extension,
+ const ShowDialogCallback& show_dialog_callback) {
DCHECK(ui_loop_ == MessageLoop::current());
extension_ = extension;
permissions_ = extension->GetActivePermissions();
delegate_ = delegate;
prompt_type_ = INSTALL_PROMPT;
+ show_dialog_callback_ = show_dialog_callback;
// We special-case themes to not show any confirm UI. Instead they are
// immediately installed, and then we show an infobar (see OnInstallSuccess)
@@ -537,12 +540,20 @@ void ExtensionInstallPrompt::ShowConfirmation() {
case INSTALL_PROMPT: {
prompt_.set_extension(extension_);
prompt_.set_icon(gfx::Image(icon_));
- ShowExtensionInstallDialog(parent_, navigator_, delegate_, prompt_);
+ ShowExtensionInstallDialog(parent_,
+ navigator_,
+ delegate_,
+ prompt_,
+ show_dialog_callback_);
break;
}
case BUNDLE_INSTALL_PROMPT: {
prompt_.set_bundle(bundle_);
- ShowExtensionInstallDialog(parent_, navigator_, delegate_, prompt_);
+ ShowExtensionInstallDialog(parent_,
+ navigator_,
+ delegate_,
+ prompt_,
+ show_dialog_callback_);
break;
}
default:

Powered by Google App Engine
This is Rietveld 408576698