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

Unified Diff: app/gtk_dnd_util.cc

Issue 548067: Allow link drags from the star, bookmarks bar, and bookmark bar menus (Closed)
Patch Set: Created 10 years, 11 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 | chrome/browser/gtk/bookmark_bar_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/gtk_dnd_util.cc
diff --git a/app/gtk_dnd_util.cc b/app/gtk_dnd_util.cc
index da4362dcc9a1f03570d4ea91363435db7729182a..fb2f492225f72aa57c86ece7ef2e7bd9ba25ee0a 100644
--- a/app/gtk_dnd_util.cc
+++ b/app/gtk_dnd_util.cc
@@ -154,6 +154,17 @@ void GtkDndUtil::WriteURLWithName(GtkSelectionData* selection_data,
pickle.size());
break;
}
+ case NETSCAPE_URL: {
+ // _NETSCAPE_URL format is URL + \n + title.
+ std::string utf8_text = url.spec() + "\n" + UTF16ToUTF8(title);
+ gtk_selection_data_set(selection_data,
+ selection_data->target,
+ kBitsPerByte,
+ reinterpret_cast<const guchar*>(utf8_text.c_str()),
+ utf8_text.length());
+ break;
+ }
+
default: {
NOTREACHED();
break;
« no previous file with comments | « no previous file | chrome/browser/gtk/bookmark_bar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698