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

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

Issue 149301: Gtk: URI list dragging for bookmarks (source side only)... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: undo accidental change Created 11 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
« no previous file with comments | « chrome/browser/gtk/bookmark_manager_gtk.cc ('k') | chrome/browser/gtk/gtk_dnd_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/bookmark_utils_gtk.cc
===================================================================
--- chrome/browser/gtk/bookmark_utils_gtk.cc (revision 20047)
+++ chrome/browser/gtk/bookmark_utils_gtk.cc (working copy)
@@ -190,6 +190,24 @@
pickle.size());
break;
}
+ case GtkDndUtil::X_CHROME_TEXT_URI_LIST: {
+ gchar** uris = reinterpret_cast<gchar**>(malloc(sizeof(gchar*) *
+ (nodes.size() + 1)));
+ for (size_t i = 0; i < nodes.size(); ++i) {
+ // If the node is a folder, this will be empty. TODO(estade): figure out
+ // if there are any ramifications to passing an empty URI. After a
+ // lttle testing, it seems fine.
+ const GURL& url = nodes[i]->GetURL();
+ // This const cast should be safe as gtk_selection_data_set_uris()
+ // makes copies.
+ uris[i] = const_cast<gchar*>(url.spec().c_str());
+ }
+ uris[nodes.size()] = NULL;
+
+ gtk_selection_data_set_uris(selection_data, uris);
+ free(uris);
+ break;
+ }
default: {
DLOG(ERROR) << "Unsupported drag get type!";
}
« no previous file with comments | « chrome/browser/gtk/bookmark_manager_gtk.cc ('k') | chrome/browser/gtk/gtk_dnd_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698