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

Unified Diff: chrome/browser/ui/gtk/location_bar_view_gtk.cc

Issue 10959045: Switch WebIntentPickerController to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/gtk/location_bar_view_gtk.cc
diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.cc b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
index 5f355e2da2625992c5d4f194aeee4e1a1fda1488..1a079469dd9c0591c1401e3d700f6fa342d7c187 100644
--- a/chrome/browser/ui/gtk/location_bar_view_gtk.cc
+++ b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
@@ -340,12 +340,13 @@ class WebIntentsButtonViewGtk : public LocationBarViewGtk::PageToolViewGtk {
DISALLOW_COPY_AND_ASSIGN(WebIntentsButtonViewGtk);
};
-void WebIntentsButtonViewGtk::Update(
- TabContents* tab_contents) {
- if (!tab_contents ||
- !tab_contents->web_intent_picker_controller() ||
- !tab_contents->web_intent_picker_controller()->
- ShowLocationBarPickerTool()) {
+void WebIntentsButtonViewGtk::Update(TabContents* tab_contents) {
+ WebIntentPickerController* web_intent_picker_controller =
+ tab_contents ? WebIntentPickerController::FromWebContents(
+ tab_contents->web_contents())
+ : NULL;
+ if (!web_intent_picker_controller ||
+ !web_intent_picker_controller->ShowLocationBarPickerTool()) {
gtk_widget_hide(widget());
return;
}
@@ -365,7 +366,8 @@ void WebIntentsButtonViewGtk::OnClick(GtkWidget* sender) {
if (!tab_contents)
return;
- tab_contents->web_intent_picker_controller()->LocationBarPickerToolClicked();
+ WebIntentPickerController::FromWebContents(tab_contents->web_contents())->
+ LocationBarPickerToolClicked();
}
GdkColor WebIntentsButtonViewGtk::button_border_color() const {

Powered by Google App Engine
This is Rietveld 408576698