| OLD | NEW |
| 1 // Copyright (c) 2012 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/base/dragdrop/drag_utils.h" | 5 #include "ui/base/dragdrop/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" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 95 |
| 96 SetDragImageOnDataObject(image, size, | 96 SetDragImageOnDataObject(image, size, |
| 97 gfx::Point(size.width() / 2, kLinkDragImageVPadding), | 97 gfx::Point(size.width() / 2, kLinkDragImageVPadding), |
| 98 data_object); | 98 data_object); |
| 99 } | 99 } |
| 100 | 100 |
| 101 void SetDragImageOnDataObject(const gfx::Canvas& canvas, | 101 void SetDragImageOnDataObject(const gfx::Canvas& canvas, |
| 102 const gfx::Size& size, | 102 const gfx::Size& size, |
| 103 const gfx::Point& cursor_offset, | 103 const gfx::Point& cursor_offset, |
| 104 ui::OSExchangeData* data_object) { | 104 ui::OSExchangeData* data_object) { |
| 105 gfx::ImageSkia image = gfx::ImageSkia(canvas.ExtractImageSkiaRep()); | 105 gfx::ImageSkia image = gfx::ImageSkia(canvas.ExtractImageRep()); |
| 106 SetDragImageOnDataObject(image, size, cursor_offset, data_object); | 106 SetDragImageOnDataObject(image, size, cursor_offset, data_object); |
| 107 } | 107 } |
| 108 | 108 |
| 109 } // namespace drag_utils | 109 } // namespace drag_utils |
| OLD | NEW |