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

Unified Diff: ui/base/dragdrop/drag_utils_mac.mm

Issue 1964283002: MacViews: Implemented Drag & Drop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
Index: ui/base/dragdrop/drag_utils_mac.mm
diff --git a/ui/base/dragdrop/drag_utils_mac.mm b/ui/base/dragdrop/drag_utils_mac.mm
index 22171bde7fb1c12caa122755dec49d722785062a..ed1fde560538c67101d3e97d7d18243cc530cec8 100644
--- a/ui/base/dragdrop/drag_utils_mac.mm
+++ b/ui/base/dragdrop/drag_utils_mac.mm
@@ -5,19 +5,25 @@
#include "ui/base/dragdrop/drag_utils.h"
#include "base/logging.h"
+#include "ui/base/dragdrop/os_exchange_data.h"
+#include "ui/gfx/canvas.h"
+#include "ui/gfx/geometry/size.h"
+#include "ui/gfx/geometry/vector2d.h"
+#include "ui/gfx/image/image_skia.h"
namespace drag_utils {
void SetDragImageOnDataObject(const gfx::Canvas& canvas,
const gfx::Vector2d& cursor_offset,
ui::OSExchangeData* data_object) {
- NOTIMPLEMENTED();
+ gfx::ImageSkia image = gfx::ImageSkia(canvas.ExtractImageRep());
+ SetDragImageOnDataObject(image, cursor_offset, data_object);
}
void SetDragImageOnDataObject(const gfx::ImageSkia& image_skia,
const gfx::Vector2d& cursor_offset,
ui::OSExchangeData* data_object) {
- NOTIMPLEMENTED();
+ data_object->provider().SetDragImage(image_skia);
}
} // namespace drag_utils

Powered by Google App Engine
This is Rietveld 408576698