| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 UI_TOUCH_SELECTION_TOUCH_HANDLE_H_ | 5 #ifndef UI_TOUCH_SELECTION_TOUCH_HANDLE_H_ |
| 6 #define UI_TOUCH_SELECTION_TOUCH_HANDLE_H_ | 6 #define UI_TOUCH_SELECTION_TOUCH_HANDLE_H_ |
| 7 | 7 |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| 11 #include "ui/events/gesture_detection/motion_event.h" | 11 #include "ui/events/gesture_detection/motion_event.h" |
| 12 #include "ui/gfx/geometry/point_f.h" | 12 #include "ui/gfx/geometry/point_f.h" |
| 13 #include "ui/gfx/geometry/rect_f.h" | 13 #include "ui/gfx/geometry/rect_f.h" |
| 14 #include "ui/gfx/geometry/vector2d_f.h" | 14 #include "ui/gfx/geometry/vector2d_f.h" |
| 15 #include "ui/touch_selection/touch_handle_orientation.h" |
| 15 #include "ui/touch_selection/ui_touch_selection_export.h" | 16 #include "ui/touch_selection/ui_touch_selection_export.h" |
| 16 | 17 |
| 17 namespace ui { | 18 namespace ui { |
| 18 | 19 |
| 19 class TouchHandle; | 20 class TouchHandle; |
| 20 | 21 |
| 21 enum TouchHandleOrientation { | |
| 22 TOUCH_HANDLE_LEFT, | |
| 23 TOUCH_HANDLE_CENTER, | |
| 24 TOUCH_HANDLE_RIGHT, | |
| 25 TOUCH_HANDLE_ORIENTATION_UNDEFINED, | |
| 26 }; | |
| 27 | |
| 28 // Interface through which |TouchHandle| delegates rendering-specific duties. | 22 // Interface through which |TouchHandle| delegates rendering-specific duties. |
| 29 class UI_TOUCH_SELECTION_EXPORT TouchHandleDrawable { | 23 class UI_TOUCH_SELECTION_EXPORT TouchHandleDrawable { |
| 30 public: | 24 public: |
| 31 virtual ~TouchHandleDrawable() {} | 25 virtual ~TouchHandleDrawable() {} |
| 32 virtual void SetEnabled(bool enabled) = 0; | 26 virtual void SetEnabled(bool enabled) = 0; |
| 33 virtual void SetOrientation(TouchHandleOrientation orientation) = 0; | 27 virtual void SetOrientation(TouchHandleOrientation orientation) = 0; |
| 34 virtual void SetAlpha(float alpha) = 0; | 28 virtual void SetAlpha(float alpha) = 0; |
| 35 virtual void SetFocus(const gfx::PointF& position) = 0; | 29 virtual void SetFocus(const gfx::PointF& position) = 0; |
| 36 virtual gfx::RectF GetVisibleBounds() const = 0; | 30 virtual gfx::RectF GetVisibleBounds() const = 0; |
| 37 }; | 31 }; |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 bool is_visible_; | 119 bool is_visible_; |
| 126 bool is_dragging_; | 120 bool is_dragging_; |
| 127 bool is_drag_within_tap_region_; | 121 bool is_drag_within_tap_region_; |
| 128 | 122 |
| 129 DISALLOW_COPY_AND_ASSIGN(TouchHandle); | 123 DISALLOW_COPY_AND_ASSIGN(TouchHandle); |
| 130 }; | 124 }; |
| 131 | 125 |
| 132 } // namespace ui | 126 } // namespace ui |
| 133 | 127 |
| 134 #endif // UI_TOUCH_SELECTION_TOUCH_HANDLE_H_ | 128 #endif // UI_TOUCH_SELECTION_TOUCH_HANDLE_H_ |
| OLD | NEW |