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

Unified Diff: chrome/browser/gtk/bookmark_utils_gtk.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 | « chrome/browser/gtk/bookmark_menu_controller_gtk.cc ('k') | chrome/browser/gtk/tab_contents_drag_source.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
diff --git a/chrome/browser/gtk/bookmark_utils_gtk.cc b/chrome/browser/gtk/bookmark_utils_gtk.cc
index fd09af2f86effcf9c6fb91b6ee05f44abaf64d0e..05aef1230580dfc9519bf2cc93e5c1ef4fdb56ee 100644
--- a/chrome/browser/gtk/bookmark_utils_gtk.cc
+++ b/chrome/browser/gtk/bookmark_utils_gtk.cc
@@ -224,6 +224,17 @@ void WriteBookmarksToSelection(const std::vector<const BookmarkNode*>& nodes,
pickle.size());
break;
}
+ case GtkDndUtil::NETSCAPE_URL: {
+ // _NETSCAPE_URL format is URL + \n + title.
+ std::string utf8_text = nodes[0]->GetURL().spec() + "\n" + UTF16ToUTF8(
+ nodes[0]->GetTitleAsString16());
+ gtk_selection_data_set(selection_data,
+ selection_data->target,
+ kBitsInAByte,
+ reinterpret_cast<const guchar*>(utf8_text.c_str()),
+ utf8_text.length());
+ break;
+ }
case GtkDndUtil::TEXT_URI_LIST: {
gchar** uris = reinterpret_cast<gchar**>(malloc(sizeof(gchar*) *
(nodes.size() + 1)));
« no previous file with comments | « chrome/browser/gtk/bookmark_menu_controller_gtk.cc ('k') | chrome/browser/gtk/tab_contents_drag_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698