| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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/download/download_item_drag.h" | 5 #include "chrome/browser/ui/gtk/download/download_item_drag.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/download/drag_download_item.h" |
| 9 #include "content/public/browser/download_item.h" | 10 #include "content/public/browser/download_item.h" |
| 10 #include "net/base/net_util.h" | 11 #include "net/base/net_util.h" |
| 11 #include "ui/base/dragdrop/gtk_dnd_util.h" | 12 #include "ui/base/dragdrop/gtk_dnd_util.h" |
| 12 #include "ui/gfx/image/image.h" | 13 #include "ui/gfx/image/image.h" |
| 13 #include "url/gurl.h" | 14 #include "url/gurl.h" |
| 14 | 15 |
| 15 using content::DownloadItem; | 16 using content::DownloadItem; |
| 16 | 17 |
| 17 namespace { | 18 namespace { |
| 18 | 19 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 120 |
| 120 DownloadItemDrag::~DownloadItemDrag() {} | 121 DownloadItemDrag::~DownloadItemDrag() {} |
| 121 | 122 |
| 122 void DownloadItemDrag::OnDragDataGet(GtkWidget* widget, | 123 void DownloadItemDrag::OnDragDataGet(GtkWidget* widget, |
| 123 GdkDragContext* context, | 124 GdkDragContext* context, |
| 124 GtkSelectionData* selection_data, | 125 GtkSelectionData* selection_data, |
| 125 guint target_type, | 126 guint target_type, |
| 126 guint time) { | 127 guint time) { |
| 127 drag_data_->OnDragDataGet(widget, context, selection_data, target_type, time); | 128 drag_data_->OnDragDataGet(widget, context, selection_data, target_type, time); |
| 128 } | 129 } |
| 130 |
| 131 void DragDownloadItem(const content::DownloadItem* download, |
| 132 gfx::Image* icon, |
| 133 gfx::NativeView view) { |
| 134 DownloadItemDrag::BeginDrag(download, icon); |
| 135 } |
| OLD | NEW |