| 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 #ifndef ASH_DRAG_DROP_DRAG_IMAGE_VIEW_H_ | 5 #ifndef ASH_DRAG_DROP_DRAG_IMAGE_VIEW_H_ |
| 6 #define ASH_DRAG_DROP_DRAG_IMAGE_VIEW_H_ | 6 #define ASH_DRAG_DROP_DRAG_IMAGE_VIEW_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "ui/base/dragdrop/drag_drop_types.h" | 11 #include "ui/base/dragdrop/drag_drop_types.h" |
| 10 #include "ui/views/controls/image_view.h" | 12 #include "ui/views/controls/image_view.h" |
| 11 | 13 |
| 12 namespace gfx { | 14 namespace gfx { |
| 13 class Image; | 15 class Image; |
| 14 } | 16 } |
| 15 | 17 |
| 16 namespace views { | 18 namespace views { |
| 17 class Widget; | 19 class Widget; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 66 |
| 65 private: | 67 private: |
| 66 gfx::Image* DragHint() const; | 68 gfx::Image* DragHint() const; |
| 67 | 69 |
| 68 // Overridden from views::ImageView. | 70 // Overridden from views::ImageView. |
| 69 void OnPaint(gfx::Canvas* canvas) override; | 71 void OnPaint(gfx::Canvas* canvas) override; |
| 70 | 72 |
| 71 // Overridden from views::view | 73 // Overridden from views::view |
| 72 void Layout() override; | 74 void Layout() override; |
| 73 | 75 |
| 74 scoped_ptr<views::Widget> widget_; | 76 std::unique_ptr<views::Widget> widget_; |
| 75 gfx::Size widget_size_; | 77 gfx::Size widget_size_; |
| 76 | 78 |
| 77 ui::DragDropTypes::DragEventSource drag_event_source_; | 79 ui::DragDropTypes::DragEventSource drag_event_source_; |
| 78 int touch_drag_operation_; | 80 int touch_drag_operation_; |
| 79 gfx::Point touch_drag_operation_indicator_position_; | 81 gfx::Point touch_drag_operation_indicator_position_; |
| 80 | 82 |
| 81 DISALLOW_COPY_AND_ASSIGN(DragImageView); | 83 DISALLOW_COPY_AND_ASSIGN(DragImageView); |
| 82 }; | 84 }; |
| 83 | 85 |
| 84 } // namespace ash | 86 } // namespace ash |
| 85 | 87 |
| 86 #endif // ASH_DRAG_DROP_DRAG_IMAGE_VIEW_H_ | 88 #endif // ASH_DRAG_DROP_DRAG_IMAGE_VIEW_H_ |
| OLD | NEW |