| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "views/drag_utils.h" | 5 #include "views/drag_utils.h" |
| 6 | 6 |
| 7 #include <objidl.h> | 7 #include <objidl.h> |
| 8 #include <shlobj.h> | 8 #include <shlobj.h> |
| 9 #include <shobjidl.h> | 9 #include <shobjidl.h> |
| 10 | 10 |
| 11 #include "app/gfx/canvas.h" | 11 #include "app/gfx/canvas.h" |
| 12 #include "app/gfx/gdi_util.h" |
| 12 #include "app/os_exchange_data.h" | 13 #include "app/os_exchange_data.h" |
| 13 #include "app/os_exchange_data_provider_win.h" | 14 #include "app/os_exchange_data_provider_win.h" |
| 14 #include "base/gfx/gdi_util.h" | |
| 15 | 15 |
| 16 namespace drag_utils { | 16 namespace drag_utils { |
| 17 | 17 |
| 18 static void SetDragImageOnDataObject(HBITMAP hbitmap, | 18 static void SetDragImageOnDataObject(HBITMAP hbitmap, |
| 19 int width, | 19 int width, |
| 20 int height, | 20 int height, |
| 21 int cursor_offset_x, | 21 int cursor_offset_x, |
| 22 int cursor_offset_y, | 22 int cursor_offset_y, |
| 23 IDataObject* data_object) { | 23 IDataObject* data_object) { |
| 24 IDragSourceHelper* helper = NULL; | 24 IDragSourceHelper* helper = NULL; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 // SetDragImageOnDataObject(HBITMAP) takes ownership of the bitmap. | 69 // SetDragImageOnDataObject(HBITMAP) takes ownership of the bitmap. |
| 70 HBITMAP bitmap = CreateBitmapFromCanvas(canvas, width, height); | 70 HBITMAP bitmap = CreateBitmapFromCanvas(canvas, width, height); |
| 71 | 71 |
| 72 // Attach 'bitmap' to the data_object. | 72 // Attach 'bitmap' to the data_object. |
| 73 SetDragImageOnDataObject( | 73 SetDragImageOnDataObject( |
| 74 bitmap, width, height, cursor_x_offset, cursor_y_offset, | 74 bitmap, width, height, cursor_x_offset, cursor_y_offset, |
| 75 OSExchangeDataProviderWin::GetIDataObject(*data_object)); | 75 OSExchangeDataProviderWin::GetIDataObject(*data_object)); |
| 76 } | 76 } |
| 77 | 77 |
| 78 } // namespace drag_utils | 78 } // namespace drag_utils |
| OLD | NEW |