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

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

Issue 328993002: Ensure that the size passed down to the SetDragImageOnDataObject function called from drag_utils::S… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed compile errors Created 6 years, 6 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
« ui/base/dragdrop/drag_utils.cc ('K') | « ui/base/dragdrop/drag_utils.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ebb4c7e8740b8a4978248a99c8a95d4c10ffc139..fbde99851bbd1d830ef184182595472fb4bfe22c 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::Size& size_in_pixels,
const gfx::Vector2d& cursor_offset,
IDataObject* data_object) {
base::win::ScopedComPtr<IDragSourceHelper> helper;
@@ -29,7 +29,7 @@ static void SetDragImageOnDataObject(HBITMAP hbitmap,
IID_IDragSourceHelper, helper.ReceiveVoid());
if (SUCCEEDED(rv)) {
SHDRAGIMAGE sdi;
- sdi.sizeDragImage = size.ToSIZE();
+ sdi.sizeDragImage = size_in_pixels.ToSIZE();
sdi.crColorKey = 0xFFFFFFFF;
sdi.hbmpDragImage = hbitmap;
sdi.ptOffset = gfx::PointAtOffsetFromOrigin(cursor_offset).ToPOINT();
@@ -57,10 +57,10 @@ static HBITMAP CreateHBITMAPFromSkBitmap(const SkBitmap& sk_bitmap) {
}
void SetDragImageOnDataObject(const gfx::ImageSkia& image_skia,
- const gfx::Size& size,
+ const gfx::Size& size_in_pixels,
const gfx::Vector2d& cursor_offset,
ui::OSExchangeData* data_object) {
- DCHECK(data_object && !size.IsEmpty());
+ DCHECK(data_object && !size_in_pixels.IsEmpty());
// InitializeFromBitmap() doesn't expect an alpha channel and is confused
// by premultiplied colors, so unpremultiply the bitmap.
// SetDragImageOnDataObject(HBITMAP) takes ownership of the bitmap.
@@ -68,7 +68,7 @@ void SetDragImageOnDataObject(const gfx::ImageSkia& image_skia,
SkBitmapOperations::UnPreMultiply(*image_skia.bitmap()));
if (bitmap) {
// Attach 'bitmap' to the data_object.
- SetDragImageOnDataObject(bitmap, size, cursor_offset,
+ SetDragImageOnDataObject(bitmap, size_in_pixels, cursor_offset,
ui::OSExchangeDataProviderWin::GetIDataObject(*data_object));
}
« ui/base/dragdrop/drag_utils.cc ('K') | « ui/base/dragdrop/drag_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698