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/common/drag_drop/drag_image_view.h" | 5 #include "ash/drag_drop/drag_image_view.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "ash/common/wm_window.h" | |
10 #include "ash/public/cpp/shell_window_ids.h" | 9 #include "ash/public/cpp/shell_window_ids.h" |
11 #include "ash/root_window_controller.h" | 10 #include "ash/root_window_controller.h" |
| 11 #include "ash/wm_window.h" |
12 #include "skia/ext/image_operations.h" | 12 #include "skia/ext/image_operations.h" |
13 #include "ui/base/resource/resource_bundle.h" | 13 #include "ui/base/resource/resource_bundle.h" |
14 #include "ui/display/display.h" | 14 #include "ui/display/display.h" |
15 #include "ui/gfx/canvas.h" | 15 #include "ui/gfx/canvas.h" |
16 #include "ui/resources/grit/ui_resources.h" | 16 #include "ui/resources/grit/ui_resources.h" |
17 #include "ui/views/widget/widget.h" | 17 #include "ui/views/widget/widget.h" |
18 | 18 |
19 namespace ash { | 19 namespace ash { |
20 namespace { | 20 namespace { |
21 using views::Widget; | 21 using views::Widget; |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 // Enlarge widget if required to fit the drag hint image. | 199 // Enlarge widget if required to fit the drag hint image. |
200 gfx::Size widget_size = widget_->GetWindowBoundsInScreen().size(); | 200 gfx::Size widget_size = widget_->GetWindowBoundsInScreen().size(); |
201 if (drag_hint_size.width() > widget_size.width() || | 201 if (drag_hint_size.width() > widget_size.width() || |
202 drag_hint_size.height() > widget_size.height()) { | 202 drag_hint_size.height() > widget_size.height()) { |
203 widget_size.SetToMax(drag_hint_size); | 203 widget_size.SetToMax(drag_hint_size); |
204 widget_->SetSize(widget_size); | 204 widget_->SetSize(widget_size); |
205 } | 205 } |
206 } | 206 } |
207 | 207 |
208 } // namespace ash | 208 } // namespace ash |
OLD | NEW |