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

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

Issue 2514001: GTK: fix site type icon dragging. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/location_bar_view_gtk.cc
diff --git a/chrome/browser/gtk/location_bar_view_gtk.cc b/chrome/browser/gtk/location_bar_view_gtk.cc
index eb1ca61ee14542da339ce8acc6b3ee487b46857b..1b89b07dcf4569ddfa94f38c1be4c3de7c19083f 100644
--- a/chrome/browser/gtk/location_bar_view_gtk.cc
+++ b/chrome/browser/gtk/location_bar_view_gtk.cc
@@ -319,6 +319,12 @@ void LocationBarViewGtk::BuildSiteTypeArea() {
site_type_event_box_ = gtk_event_box_new();
gtk_widget_modify_bg(site_type_event_box_, GTK_STATE_NORMAL,
&kEvSecureBackgroundColor);
+ g_signal_connect(site_type_event_box_, "drag-data-get",
+ G_CALLBACK(&OnIconDragDataThunk), this);
+ g_signal_connect(site_type_event_box_, "drag-begin",
+ G_CALLBACK(&OnIconDragBeginThunk), this);
+ g_signal_connect(site_type_event_box_, "drag-end",
+ G_CALLBACK(&OnIconDragEndThunk), this);
// Make the event box not visible so it does not paint a background.
gtk_event_box_set_visible_window(GTK_EVENT_BOX(site_type_event_box_),
@@ -358,13 +364,6 @@ void LocationBarViewGtk::SetSiteTypeDragSource() {
gtk_dnd_util::TEXT_PLAIN |
gtk_dnd_util::TEXT_URI_LIST |
gtk_dnd_util::CHROME_NAMED_URL);
-
- g_signal_connect(site_type_event_box_, "drag-data-get",
- G_CALLBACK(&OnIconDragDataThunk), this);
- g_signal_connect(site_type_event_box_, "drag-begin",
- G_CALLBACK(&OnIconDragBeginThunk), this);
- g_signal_connect(site_type_event_box_, "drag-end",
- G_CALLBACK(&OnIconDragEndThunk), this);
}
void LocationBarViewGtk::SetProfile(Profile* profile) {
@@ -1006,6 +1005,7 @@ void LocationBarViewGtk::OnIconDragBegin(GtkWidget* sender,
void LocationBarViewGtk::OnIconDragEnd(GtkWidget* sender,
GdkDragContext* context) {
+ DCHECK(drag_icon_);
gtk_widget_destroy(drag_icon_);
drag_icon_ = NULL;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698