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 "ash/drag_drop/drag_image_view.h" | 5 #include "ash/drag_drop/drag_image_view.h" |
6 | 6 |
7 #include "skia/ext/image_operations.h" | 7 #include "skia/ext/image_operations.h" |
8 #include "ui/aura/window.h" | 8 #include "ui/aura/window.h" |
9 #include "ui/base/resource/resource_bundle.h" | 9 #include "ui/base/resource/resource_bundle.h" |
10 #include "ui/compositor/dip_util.h" | 10 #include "ui/compositor/dip_util.h" |
11 #include "ui/gfx/canvas.h" | 11 #include "ui/gfx/canvas.h" |
12 #include "ui/gfx/size_conversions.h" | 12 #include "ui/gfx/geometry/size_conversions.h" |
13 #include "ui/resources/grit/ui_resources.h" | 13 #include "ui/resources/grit/ui_resources.h" |
14 #include "ui/views/widget/widget.h" | 14 #include "ui/views/widget/widget.h" |
15 #include "ui/wm/core/shadow_types.h" | 15 #include "ui/wm/core/shadow_types.h" |
16 | 16 |
17 namespace ash { | 17 namespace ash { |
18 namespace { | 18 namespace { |
19 using views::Widget; | 19 using views::Widget; |
20 | 20 |
21 Widget* CreateDragWidget(gfx::NativeView context) { | 21 Widget* CreateDragWidget(gfx::NativeView context) { |
22 Widget* drag_widget = new Widget; | 22 Widget* drag_widget = new Widget; |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 gfx::Rect drag_hint_bounds(drag_hint_position, drag_hint_size); | 163 gfx::Rect drag_hint_bounds(drag_hint_position, drag_hint_size); |
164 drag_hint_bounds.AdjustToFit(gfx::Rect(widget_size_)); | 164 drag_hint_bounds.AdjustToFit(gfx::Rect(widget_size_)); |
165 | 165 |
166 // Draw image. | 166 // Draw image. |
167 canvas->DrawImageInt(*(drag_hint->ToImageSkia()), | 167 canvas->DrawImageInt(*(drag_hint->ToImageSkia()), |
168 drag_hint_bounds.x(), drag_hint_bounds.y()); | 168 drag_hint_bounds.x(), drag_hint_bounds.y()); |
169 } | 169 } |
170 } | 170 } |
171 | 171 |
172 } // namespace ash | 172 } // namespace ash |
OLD | NEW |