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

Unified Diff: ui/base/dragdrop/drag_utils.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: more vector use fixes 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.cc
diff --git a/ui/base/dragdrop/drag_utils.cc b/ui/base/dragdrop/drag_utils.cc
index 97e855c667b864a1cdeb43d6cfca5bb12b1b5cf2..9c5849175b0e10f560052a06fcd10bcbebf7f899 100644
--- a/ui/base/dragdrop/drag_utils.cc
+++ b/ui/base/dragdrop/drag_utils.cc
@@ -93,14 +93,13 @@ void CreateDragImageForFile(const FilePath& file_name,
// ImageSkia takes ownership of |source|.
gfx::ImageSkia image = gfx::ImageSkia(source, size);
- SetDragImageOnDataObject(image, size,
- gfx::Point(size.width() / 2, kLinkDragImageVPadding),
- data_object);
+ gfx::Vector2d cursor_offset(size.width() / 2, kLinkDragImageVPadding);
Peter Kasting 2012/10/30 01:14:14 Nit: Inline
+ SetDragImageOnDataObject(image, size, cursor_offset, data_object);
}
void SetDragImageOnDataObject(const gfx::Canvas& canvas,
const gfx::Size& size,
- const gfx::Point& cursor_offset,
+ const gfx::Vector2d& cursor_offset,
ui::OSExchangeData* data_object) {
gfx::ImageSkia image = gfx::ImageSkia(canvas.ExtractImageRep());
SetDragImageOnDataObject(image, size, cursor_offset, data_object);

Powered by Google App Engine
This is Rietveld 408576698