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

Unified Diff: chrome/browser/download/drag_download_item_views.cc

Issue 2740433005: Make download item drags look like bookmark drags. (Closed)
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/base/dragdrop/drag_utils.h » ('j') | ui/base/dragdrop/drag_utils.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/drag_download_item_views.cc
diff --git a/chrome/browser/download/drag_download_item_views.cc b/chrome/browser/download/drag_download_item_views.cc
index c5f81094656d0310684d59ecca8e9ff56fc4600d..95fdabb596cc1994f0b9713efb8fdf27b2aa582f 100644
--- a/chrome/browser/download/drag_download_item_views.cc
+++ b/chrome/browser/download/drag_download_item_views.cc
@@ -14,13 +14,13 @@
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.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/gfx/image/image.h"
#include "ui/gfx/image/image_skia.h"
+#include "ui/views/button_drag_utils.h"
#include "ui/views/widget/widget.h"
#include "url/gurl.h"
@@ -37,10 +37,10 @@ void DragDownloadItem(const content::DownloadItem* download,
// Set up our OLE machinery
ui::OSExchangeData data;
- drag_utils::CreateDragImageForFile(
- download->GetFileNameToReportUser(),
- icon ? icon->AsImageSkia() : gfx::ImageSkia(),
- &data);
+ button_drag_utils::SetDragImage(
+ GURL(), download->GetFileNameToReportUser().BaseName().LossyDisplayName(),
+ icon ? icon->AsImageSkia() : gfx::ImageSkia(), nullptr, &data,
+ views::Widget::GetWidgetForNativeView(view));
base::FilePath full_path = download->GetTargetFilePath();
#if defined(OS_CHROMEOS)
« no previous file with comments | « no previous file | ui/base/dragdrop/drag_utils.h » ('j') | ui/base/dragdrop/drag_utils.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698