Make download item drags look like bookmark
https://codereview.chromium.org/2750253002
This commit is contained in:
parent
4bb95acc2b
commit
4fc2b3e642
1 changed files with 5 additions and 2 deletions
|
@ -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<base::FilePath>& 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<ui::FileInfo> file_infos;
|
||||
for (const base::FilePath& file : files) {
|
||||
|
|
Loading…
Reference in a new issue