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 64463a8a23073a8232211952567fe8ac2810c387..f5fd2e36ea0e37149808088438670f8bfd69784c 100644 |
--- a/chrome/browser/ui/intents/web_intent_picker_controller.cc |
+++ b/chrome/browser/ui/intents/web_intent_picker_controller.cc |
@@ -147,6 +147,7 @@ WebIntentPickerController::WebIntentPickerController( |
pending_async_count_(0), |
pending_registry_calls_count_(0), |
picker_shown_(false), |
+ window_disposition_target_(false), |
intents_dispatcher_(NULL), |
service_tab_(NULL), |
weak_ptr_factory_(this) { |
@@ -247,7 +248,7 @@ void WebIntentPickerController::ShowDialog(const string16& action, |
action, type, |
base::Bind(&WebIntentPickerController::OnCWSIntentServicesAvailable, |
weak_ptr_factory_.GetWeakPtr())); |
- } |
+} |
void WebIntentPickerController::Observe( |
int type, |
@@ -291,6 +292,11 @@ void WebIntentPickerController::OnServiceChosen(const GURL& url, |
tab_contents_->profile(), url), |
MSG_ROUTING_NONE, NULL, NULL); |
+ // Let the controller for the target TabContents know that it is hosting a |
+ // web intents service. |
+ contents->web_intent_picker_controller()->set_window_disposition_target( |
+ true); |
+ |
intents_dispatcher_->DispatchIntent(contents->web_contents()); |
service_tab_ = contents->web_contents(); |
@@ -681,6 +687,10 @@ void WebIntentPickerController::OnExtensionIconUnavailable( |
AsyncOperationFinished(); |
} |
+bool WebIntentPickerController::ShowLocationBarPickerTool() { |
+ return window_disposition_target_; |
+} |
+ |
void WebIntentPickerController::OnExtensionInstallServiceAvailable( |
const std::vector<webkit_glue::WebIntentServiceData>& services) { |
DCHECK(services.size() > 0); |