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 "ui/base/dragdrop/drag_drop_types.h" | 8 #include "ui/base/dragdrop/drag_drop_types.h" |
9 #include "ui/views/controls/image_view.h" | 9 #include "ui/views/controls/image_view.h" |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 // |operation| is a bit field indicating allowable drag operations from | 52 // |operation| is a bit field indicating allowable drag operations from |
53 // ui::DragDropTypes::DragOperation. | 53 // ui::DragDropTypes::DragOperation. |
54 void SetTouchDragOperation(int operation); | 54 void SetTouchDragOperation(int operation); |
55 void SetTouchDragOperationHintPosition(const gfx::Point& position); | 55 void SetTouchDragOperationHintPosition(const gfx::Point& position); |
56 | 56 |
57 // Sets the |opacity| of the image view between 0.0 and 1.0. | 57 // Sets the |opacity| of the image view between 0.0 and 1.0. |
58 void SetOpacity(float opacity); | 58 void SetOpacity(float opacity); |
59 | 59 |
60 private: | 60 private: |
61 // Overridden from views::ImageView. | 61 // Overridden from views::ImageView. |
62 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 62 virtual void OnPaint(gfx::Canvas* canvas) override; |
63 | 63 |
64 scoped_ptr<views::Widget> widget_; | 64 scoped_ptr<views::Widget> widget_; |
65 gfx::Size widget_size_; | 65 gfx::Size widget_size_; |
66 | 66 |
67 ui::DragDropTypes::DragEventSource drag_event_source_; | 67 ui::DragDropTypes::DragEventSource drag_event_source_; |
68 int touch_drag_operation_; | 68 int touch_drag_operation_; |
69 gfx::Point touch_drag_operation_indicator_position_; | 69 gfx::Point touch_drag_operation_indicator_position_; |
70 | 70 |
71 DISALLOW_COPY_AND_ASSIGN(DragImageView); | 71 DISALLOW_COPY_AND_ASSIGN(DragImageView); |
72 }; | 72 }; |
73 | 73 |
74 } // namespace ash | 74 } // namespace ash |
75 | 75 |
76 #endif // ASH_DRAG_DROP_DRAG_IMAGE_VIEW_H_ | 76 #endif // ASH_DRAG_DROP_DRAG_IMAGE_VIEW_H_ |
OLD | NEW |