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

Unified Diff: ui/base/dragdrop/drag_utils_win.cc

Issue 11269022: Add Vector2d classes that represent offsets, instead of using Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: RenderText fixup Created 8 years, 2 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_win.cc
diff --git a/ui/base/dragdrop/drag_utils_win.cc b/ui/base/dragdrop/drag_utils_win.cc
index f7d05ee686140b21d91fed635717221b65512549..9a3ab56ef32c7f04c6d5880407dd7ccbcb2e426e 100644
--- a/ui/base/dragdrop/drag_utils_win.cc
+++ b/ui/base/dragdrop/drag_utils_win.cc
@@ -21,7 +21,7 @@ namespace drag_utils {
static void SetDragImageOnDataObject(HBITMAP hbitmap,
const gfx::Size& size,
- const gfx::Point& cursor_offset,
+ const gfx::Vector2d& cursor_offset,
IDataObject* data_object) {
base::win::ScopedComPtr<IDragSourceHelper> helper;
HRESULT rv = CoCreateInstance(CLSID_DragDropHelper, 0, CLSCTX_INPROC_SERVER,
@@ -31,7 +31,7 @@ static void SetDragImageOnDataObject(HBITMAP hbitmap,
sdi.sizeDragImage = size.ToSIZE();
sdi.crColorKey = 0xFFFFFFFF;
sdi.hbmpDragImage = hbitmap;
- sdi.ptOffset = cursor_offset.ToPOINT();
+ sdi.ptOffset = gfx::PointAtOffsetFromOrigin(cursor_offset).ToPOINT();
helper->InitializeFromBitmap(&sdi, data_object);
}
}
@@ -56,7 +56,7 @@ static HBITMAP CreateHBITMAPFromSkBitmap(const SkBitmap& sk_bitmap) {
void SetDragImageOnDataObject(const gfx::ImageSkia& image_skia,
const gfx::Size& size,
- const gfx::Point& cursor_offset,
+ const gfx::Vector2d& cursor_offset,
ui::OSExchangeData* data_object) {
DCHECK(data_object && !size.IsEmpty());
// InitializeFromBitmap() doesn't expect an alpha channel and is confused

Powered by Google App Engine
This is Rietveld 408576698