diff --git a/atom/browser/ui/drag_util_views.cc b/atom/browser/ui/drag_util_views.cc index b7215e5dd48e..aded2ae0c344 100644 --- a/atom/browser/ui/drag_util_views.cc +++ b/atom/browser/ui/drag_util_views.cc @@ -7,12 +7,13 @@ #include "ui/aura/client/drag_drop_client.h" #include "ui/aura/window.h" #include "ui/base/dragdrop/drag_drop_types.h" -#include "ui/base/dragdrop/drag_utils.h" #include "ui/base/dragdrop/file_info.h" #include "ui/base/dragdrop/os_exchange_data.h" #include "ui/display/screen.h" #include "ui/gfx/geometry/point.h" +#include "ui/views/button_drag_utils.h" #include "ui/views/widget/widget.h" +#include "url/gurl.h" namespace atom { @@ -22,7 +23,9 @@ void DragFileItems(const std::vector& files, // Set up our OLE machinery ui::OSExchangeData data; - drag_utils::CreateDragImageForFile(files[0], icon.AsImageSkia(), &data); + button_drag_utils::SetDragImage(GURL(), files[0].LossyDisplayName(), + icon.AsImageSkia(), nullptr, + *views::Widget::GetTopLevelWidgetForNativeView(view), &data); std::vector file_infos; for (const base::FilePath& file : files) {