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

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: 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.cc
diff --git a/chrome/browser/ui/intents/web_intent_picker_controller.cc b/chrome/browser/ui/intents/web_intent_picker_controller.cc
index 5cc1ac2112a95f35caf577331f795519f69f320f..30f545dc98c57fe60b0ea4e4aa7cecd65fb10c54 100644
--- a/chrome/browser/ui/intents/web_intent_picker_controller.cc
+++ b/chrome/browser/ui/intents/web_intent_picker_controller.cc
@@ -461,6 +461,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->custom_install_dialog_callback = base::Bind(
+ &WebIntentPickerController::OnShowExtensionInstallDialog,
+ weak_ptr_factory_.GetWeakPtr());
scoped_refptr<WebstoreInstaller> installer = new WebstoreInstaller(
profile_, this,
@@ -877,6 +880,17 @@ void WebIntentPickerController::OnExtensionIconUnavailable(
AsyncOperationFinished();
}
+void WebIntentPickerController::OnShowExtensionInstallDialog(
+ gfx::NativeWindow parent,
+ content::PageNavigator* navigator,
+ ExtensionInstallPrompt::Delegate* delegate,
+ const ExtensionInstallPrompt::Prompt& prompt) {
+ picker_model_->SetPendingInstallDelegate(delegate);
+ picker_model_->SetPendingInstallPrompt(prompt);
+ if (picker_)
+ picker_->OnShowExtensionInstallDialog(parent, navigator, delegate, prompt);
+}
+
void WebIntentPickerController::SetWindowDispositionSource(
content::WebContents* source,
content::WebIntentsDispatcher* dispatcher) {

Powered by Google App Engine
This is Rietveld 408576698