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

Side by Side Diff: chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc

Issue 8606007: Linux/Gtk: Drag source should not delete source data on drop success on omnibox. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.h" 5 #include "chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1543 matching lines...) Expand 10 before | Expand all | Expand 10 after
1554 if (context->source_window == text_view_->window) 1554 if (context->source_window == text_view_->window)
1555 return; 1555 return;
1556 1556
1557 guchar* text = gtk_selection_data_get_text(selection_data); 1557 guchar* text = gtk_selection_data_get_text(selection_data);
1558 if (!text) 1558 if (!text)
1559 return; 1559 return;
1560 1560
1561 string16 possible_url = UTF8ToUTF16(reinterpret_cast<char*>(text)); 1561 string16 possible_url = UTF8ToUTF16(reinterpret_cast<char*>(text));
1562 g_free(text); 1562 g_free(text);
1563 if (OnPerformDropImpl(possible_url)) { 1563 if (OnPerformDropImpl(possible_url)) {
1564 gtk_drag_finish(context, TRUE, TRUE, time); 1564 gtk_drag_finish(context, TRUE, FALSE, time);
1565 1565
1566 static guint signal_id = 1566 static guint signal_id =
1567 g_signal_lookup("drag-data-received", GTK_TYPE_WIDGET); 1567 g_signal_lookup("drag-data-received", GTK_TYPE_WIDGET);
1568 g_signal_stop_emission(text_view_, signal_id, 0); 1568 g_signal_stop_emission(text_view_, signal_id, 0);
1569 } 1569 }
1570 } 1570 }
1571 1571
1572 void OmniboxViewGtk::HandleDragDataGet(GtkWidget* widget, 1572 void OmniboxViewGtk::HandleDragDataGet(GtkWidget* widget,
1573 GdkDragContext* context, 1573 GdkDragContext* context,
1574 GtkSelectionData* selection_data, 1574 GtkSelectionData* selection_data,
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
2394 2394
2395 // Make all the children of the widget visible. NOTE: this won't display 2395 // Make all the children of the widget visible. NOTE: this won't display
2396 // anything, it just toggles the visible flag. 2396 // anything, it just toggles the visible flag.
2397 gtk_widget_show_all(omnibox_view->GetNativeView()); 2397 gtk_widget_show_all(omnibox_view->GetNativeView());
2398 // Hide the widget. NativeViewHostGtk will make it visible again as necessary. 2398 // Hide the widget. NativeViewHostGtk will make it visible again as necessary.
2399 gtk_widget_hide(omnibox_view->GetNativeView()); 2399 gtk_widget_hide(omnibox_view->GetNativeView());
2400 2400
2401 return omnibox_view; 2401 return omnibox_view;
2402 } 2402 }
2403 #endif 2403 #endif
OLDNEW
« 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