| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/views/drag_utils.h" | 5 #include "ui/views/drag_utils.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
| 11 #include "grit/ui_resources.h" | 11 #include "grit/ui_resources.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 | 87 |
| 88 SetDragImageOnDataObject(canvas, gfx::Size(width, height), | 88 SetDragImageOnDataObject(canvas, gfx::Size(width, height), |
| 89 gfx::Point(width / 2, kLinkDragImageVPadding), | 89 gfx::Point(width / 2, kLinkDragImageVPadding), |
| 90 data_object); | 90 data_object); |
| 91 } | 91 } |
| 92 | 92 |
| 93 void SetDragImageOnDataObject(const gfx::Canvas& canvas, | 93 void SetDragImageOnDataObject(const gfx::Canvas& canvas, |
| 94 const gfx::Size& size, | 94 const gfx::Size& size, |
| 95 const gfx::Point& cursor_offset, | 95 const gfx::Point& cursor_offset, |
| 96 ui::OSExchangeData* data_object) { | 96 ui::OSExchangeData* data_object) { |
| 97 SetDragImageOnDataObject( | 97 SetDragImageOnDataObject(canvas.ExtractBitmap(), size, cursor_offset, |
| 98 canvas.AsCanvasSkia()->ExtractBitmap(), size, cursor_offset, data_object); | 98 data_object); |
| 99 } | 99 } |
| 100 | 100 |
| 101 } // namespace drag_utils | 101 } // namespace drag_utils |
| OLD | NEW |