OLD | NEW |
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/custom_drag.h" | 5 #include "chrome/browser/ui/gtk/custom_drag.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/download/download_item.h" | 8 #include "chrome/browser/download/download_item.h" |
9 #include "chrome/browser/ui/gtk/bookmark_utils_gtk.h" | 9 #include "chrome/browser/ui/gtk/bookmark_utils_gtk.h" |
10 #include "gfx/gtk_util.h" | |
11 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
12 #include "net/base/net_util.h" | 11 #include "net/base/net_util.h" |
13 #include "third_party/skia/include/core/SkBitmap.h" | 12 #include "third_party/skia/include/core/SkBitmap.h" |
14 #include "ui/base/dragdrop/gtk_dnd_util.h" | 13 #include "ui/base/dragdrop/gtk_dnd_util.h" |
| 14 #include "ui/gfx/gtk_util.h" |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 const int kDownloadItemCodeMask = ui::TEXT_URI_LIST | ui::CHROME_NAMED_URL; | 18 const int kDownloadItemCodeMask = ui::TEXT_URI_LIST | ui::CHROME_NAMED_URL; |
19 const GdkDragAction kDownloadItemDragAction = GDK_ACTION_COPY; | 19 const GdkDragAction kDownloadItemDragAction = GDK_ACTION_COPY; |
20 const GdkDragAction kBookmarkDragAction = | 20 const GdkDragAction kBookmarkDragAction = |
21 static_cast<GdkDragAction>(GDK_ACTION_COPY | GDK_ACTION_MOVE); | 21 static_cast<GdkDragAction>(GDK_ACTION_COPY | GDK_ACTION_MOVE); |
22 | 22 |
23 void OnDragDataGetForDownloadItem(GtkSelectionData* selection_data, | 23 void OnDragDataGetForDownloadItem(GtkSelectionData* selection_data, |
24 guint target_type, | 24 guint target_type, |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 guint target_type, guint time) { | 139 guint target_type, guint time) { |
140 bookmark_utils::WriteBookmarksToSelection(nodes_, selection_data, | 140 bookmark_utils::WriteBookmarksToSelection(nodes_, selection_data, |
141 target_type, profile_); | 141 target_type, profile_); |
142 } | 142 } |
143 | 143 |
144 // static | 144 // static |
145 void BookmarkDrag::BeginDrag(Profile* profile, | 145 void BookmarkDrag::BeginDrag(Profile* profile, |
146 const std::vector<const BookmarkNode*>& nodes) { | 146 const std::vector<const BookmarkNode*>& nodes) { |
147 new BookmarkDrag(profile, nodes); | 147 new BookmarkDrag(profile, nodes); |
148 } | 148 } |
OLD | NEW |