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

Side by Side Diff: chrome/browser/ui/gtk/bookmarks/bookmark_drag.cc

Issue 23743003: gtk: Fold bookmark_drag.* into bookmark_drag_drop_gtk.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/gtk/bookmarks/bookmark_drag.h"
6
7 #include "chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.h"
8
9 namespace {
10
11 const GdkDragAction kBookmarkDragAction =
12 static_cast<GdkDragAction>(GDK_ACTION_COPY | GDK_ACTION_MOVE);
13
14 } // namespace
15
16 // static
17 void BookmarkDrag::BeginDrag(Profile* profile,
18 const std::vector<const BookmarkNode*>& nodes) {
19 new BookmarkDrag(profile, nodes);
20 }
21
22 BookmarkDrag::BookmarkDrag(Profile* profile,
23 const std::vector<const BookmarkNode*>& nodes)
24 : CustomDrag(NULL, GetCodeMask(false), kBookmarkDragAction),
25 profile_(profile),
26 nodes_(nodes) {}
27
28 BookmarkDrag::~BookmarkDrag() {}
29
30 void BookmarkDrag::OnDragDataGet(GtkWidget* widget,
31 GdkDragContext* context,
32 GtkSelectionData* selection_data,
33 guint target_type,
34 guint time) {
35 WriteBookmarksToSelection(nodes_, selection_data, target_type, profile_);
36 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/bookmarks/bookmark_drag.h ('k') | chrome/browser/ui/gtk/bookmarks/bookmark_drag_drop_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698