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

Unified Diff: chrome/browser/ui/intents/web_intent_picker_controller.cc

Issue 10796116: [Web Intents] Basic location bar UI for window disposition picker affordance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactor content settings to PageTool base class. Add stubs for mac/win. Created 8 years, 5 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 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);

Powered by Google App Engine
This is Rietveld 408576698