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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/base/dragdrop/drag_utils.h" 5 #include "ui/base/dragdrop/drag_utils.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/base/dragdrop/os_exchange_data.h"
9 #include "ui/gfx/canvas.h"
10 #include "ui/gfx/image/image_skia.h"
8 11
9 namespace drag_utils { 12 namespace drag_utils {
10 13
11 void SetDragImageOnDataObject(const gfx::Canvas& canvas, 14 void SetDragImageOnDataObject(const gfx::Canvas& canvas,
12 const gfx::Vector2d& cursor_offset, 15 const gfx::Vector2d& cursor_offset,
13 ui::OSExchangeData* data_object) { 16 ui::OSExchangeData* data_object) {
14 NOTIMPLEMENTED(); 17 gfx::ImageSkia image = gfx::ImageSkia(canvas.ExtractImageRep());
18 SetDragImageOnDataObject(image, cursor_offset, data_object);
15 } 19 }
16 20
17 void SetDragImageOnDataObject(const gfx::ImageSkia& image_skia, 21 void SetDragImageOnDataObject(const gfx::ImageSkia& image_skia,
18 const gfx::Vector2d& cursor_offset, 22 const gfx::Vector2d& cursor_offset,
19 ui::OSExchangeData* data_object) { 23 ui::OSExchangeData* data_object) {
20 NOTIMPLEMENTED(); 24 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.
21 } 25 }
22 26
23 } // namespace drag_utils 27 } // namespace drag_utils
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698