OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/base/dragdrop/drag_utils.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "third_party/skia/include/core/SkBitmap.h" | 8 #include "third_party/skia/include/core/SkBitmap.h" |
9 #include "ui/base/dragdrop/os_exchange_data.h" | 9 #include "ui/base/dragdrop/os_exchange_data.h" |
10 #include "ui/base/dragdrop/os_exchange_data_provider_aura.h" | 10 #include "ui/base/dragdrop/os_exchange_data_provider_aura.h" |
11 #include "ui/gfx/canvas.h" | 11 #include "ui/gfx/canvas.h" |
12 #include "ui/gfx/point.h" | 12 #include "ui/gfx/point.h" |
13 #include "ui/gfx/size.h" | 13 #include "ui/gfx/size.h" |
14 | 14 |
15 namespace drag_utils { | 15 namespace drag_utils { |
16 | 16 |
17 void SetDragImageOnDataObject(const SkBitmap& bitmap, | 17 void SetDragImageOnDataObject(const SkBitmap& bitmap, |
18 const gfx::Size& size, | 18 const gfx::Size& size, |
19 const gfx::Point& cursor_offset, | 19 const gfx::Point& cursor_offset, |
20 ui::OSExchangeData* data_object) { | 20 ui::OSExchangeData* data_object) { |
21 ui::OSExchangeDataProviderAura& provider( | 21 ui::OSExchangeDataProviderAura& provider( |
22 static_cast<ui::OSExchangeDataProviderAura&>(data_object->provider())); | 22 static_cast<ui::OSExchangeDataProviderAura&>(data_object->provider())); |
23 provider.set_drag_image(bitmap); | 23 provider.set_drag_image(bitmap); |
24 } | 24 } |
25 | 25 |
26 } // namespace drag_utils | 26 } // namespace drag_utils |
OLD | NEW |