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_controller.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
Index: chrome/browser/ui/intents/web_intent_picker_controller.cc
diff --git a/chrome/browser/ui/intents/web_intent_picker_controller.cc b/chrome/browser/ui/intents/web_intent_picker_controller.cc
index a389e63cf398c1330ce14b8639f8df522bcf7c29..5e1716c8068f22652ce42bca4bf818cc6b7f6f8e 100644
--- a/chrome/browser/ui/intents/web_intent_picker_controller.cc
+++ b/chrome/browser/ui/intents/web_intent_picker_controller.cc
@@ -448,6 +448,9 @@ void WebIntentPickerController::OnExtensionInstallRequested(
// Don't show a bubble pointing to the extension or any other post
// installation UI.
approval->skip_post_install_ui = true;
+ approval->show_dialog_callback = base::Bind(
+ &WebIntentPickerController::OnShowExtensionInstallDialog,
+ weak_ptr_factory_.GetWeakPtr());
scoped_refptr<WebstoreInstaller> installer = new WebstoreInstaller(
profile_, this,
@@ -865,6 +868,17 @@ void WebIntentPickerController::OnExtensionIconUnavailable(
AsyncOperationFinished();
}
+void WebIntentPickerController::OnShowExtensionInstallDialog(
+ gfx::NativeWindow parent,
+ content::PageNavigator* navigator,
+ ExtensionInstallPrompt::Delegate* delegate,
+ const ExtensionInstallPrompt::Prompt& prompt) {
+ picker_model_->SetPendingExtensionInstallDelegate(delegate);
+ picker_model_->SetPendingExtensionInstallPrompt(prompt);
+ if (picker_)
+ picker_->OnShowExtensionInstallDialog(parent, navigator, delegate, prompt);
+}
+
void WebIntentPickerController::SetWindowDispositionSource(
content::WebContents* source,
content::WebIntentsDispatcher* dispatcher) {
« no previous file with comments | « chrome/browser/ui/intents/web_intent_picker_controller.h ('k') | chrome/browser/ui/intents/web_intent_picker_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698