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

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: Forgot to add the test 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..9bd44d5acfb740fa121a0ac7de438d03a6ee1cf7 100644
--- a/ui/base/dragdrop/drag_utils_mac.mm
+++ b/ui/base/dragdrop/drag_utils_mac.mm
@@ -5,19 +5,23 @@
#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/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, cursor_offset);
tapted 2016/05/24 08:06:00 hum - these are the same implementations provided
spqchan 2016/05/26 01:56:53 Done.
}
} // namespace drag_utils

Powered by Google App Engine
This is Rietveld 408576698