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 94a4bbf2ad9532c7ef956399f4e288021bc15758..58f93a4cb332be2dae1e9917b6dbdc3404c2e62e 100644 |
--- a/chrome/browser/ui/gtk/location_bar_view_gtk.cc |
+++ b/chrome/browser/ui/gtk/location_bar_view_gtk.cc |
@@ -1184,10 +1184,7 @@ void LocationBarViewGtk::OnIconDragData(GtkWidget* sender, |
GdkDragContext* context, |
GtkSelectionData* data, |
guint info, guint time) { |
- WebContents* tab = GetWebContents(); |
- if (!tab) |
- return; |
- ui::WriteURLWithName(data, tab->GetURL(), tab->GetTitle(), info); |
+ ui::WriteURLWithName(data, drag_url_, drag_title_, info); |
} |
void LocationBarViewGtk::OnIconDragBegin(GtkWidget* sender, |
@@ -1200,6 +1197,12 @@ void LocationBarViewGtk::OnIconDragBegin(GtkWidget* sender, |
GetTitle(), theme_service_); |
g_object_unref(pixbuf); |
gtk_drag_set_icon_widget(context, drag_icon_, 0, 0); |
+ |
+ WebContents* tab = GetWebContents(); |
+ if (!tab) |
+ return; |
+ drag_url_ = tab->GetURL(); |
+ drag_title_ = tab->GetTitle(); |
} |
void LocationBarViewGtk::OnIconDragEnd(GtkWidget* sender, |
@@ -1207,6 +1210,8 @@ void LocationBarViewGtk::OnIconDragEnd(GtkWidget* sender, |
DCHECK(drag_icon_); |
gtk_widget_destroy(drag_icon_); |
drag_icon_ = NULL; |
+ drag_url_ = GURL::EmptyGURL(); |
+ drag_title_.clear(); |
} |
void LocationBarViewGtk::OnHboxSizeAllocate(GtkWidget* sender, |