| Index: ui/touch_selection/touch_handle.h
|
| diff --git a/ui/touch_selection/touch_handle.h b/ui/touch_selection/touch_handle.h
|
| index 12c66d09983626db3c3f9b4a356aa80a2a9d9178..a668235cb963d91d06e43eea36c4e73cdf0d0cb1 100644
|
| --- a/ui/touch_selection/touch_handle.h
|
| +++ b/ui/touch_selection/touch_handle.h
|
| @@ -24,7 +24,9 @@ class UI_TOUCH_SELECTION_EXPORT TouchHandleDrawable {
|
| public:
|
| virtual ~TouchHandleDrawable() {}
|
| virtual void SetEnabled(bool enabled) = 0;
|
| - virtual void SetOrientation(TouchHandleOrientation orientation) = 0;
|
| + virtual void SetOrientation(TouchHandleOrientation orientation,
|
| + bool mirror_vertical,
|
| + bool mirror_horizontal) = 0;
|
| virtual void SetAlpha(float alpha) = 0;
|
| virtual void SetFocus(const gfx::PointF& position) = 0;
|
| virtual gfx::RectF GetVisibleBounds() const = 0;
|
| @@ -74,7 +76,9 @@ class UI_TOUCH_SELECTION_EXPORT TouchHandle {
|
| // Update the handle visuals to |orientation|.
|
| // Note: If the handle is being dragged, the orientation change will be
|
| // deferred until the drag has ceased.
|
| - void SetOrientation(TouchHandleOrientation orientation);
|
| + void SetOrientation(TouchHandleOrientation orientation,
|
| + const gfx::RectF viewport_rect,
|
| + const gfx::PointF handle_bottom);
|
|
|
| // Allows touch-dragging of the handle. Returns true if the event was
|
| // consumed, in which case the caller should cease further handling.
|
| @@ -84,7 +88,12 @@ class UI_TOUCH_SELECTION_EXPORT TouchHandle {
|
| // Returns true if an animation is active and requires further ticking.
|
| bool Animate(base::TimeTicks frame_time);
|
|
|
| + // Returns the visible bounds of the handle
|
| + gfx::RectF GetHandleBounds();
|
| +
|
| bool is_dragging() const { return is_dragging_; }
|
| + bool is_inverted() const { return mirror_vertical_; }
|
| + bool is_flipped() const { return mirror_horizontal_; }
|
| const gfx::PointF& position() const { return position_; }
|
| TouchHandleOrientation orientation() const { return orientation_; }
|
|
|
| @@ -94,6 +103,8 @@ class UI_TOUCH_SELECTION_EXPORT TouchHandle {
|
| void BeginFade();
|
| void EndFade();
|
| void SetAlpha(float alpha);
|
| + bool SetInvertHandleParameters(const gfx::RectF viewport_rect,
|
| + const gfx::PointF handle_bottom);
|
|
|
| scoped_ptr<TouchHandleDrawable> drawable_;
|
|
|
| @@ -102,6 +113,8 @@ class UI_TOUCH_SELECTION_EXPORT TouchHandle {
|
| gfx::PointF position_;
|
| TouchHandleOrientation orientation_;
|
| TouchHandleOrientation deferred_orientation_;
|
| + gfx::RectF deferred_viewport_rect_;
|
| + gfx::PointF deferred_handle_bottom_;
|
|
|
| gfx::PointF touch_down_position_;
|
| gfx::Vector2dF touch_to_focus_offset_;
|
| @@ -120,6 +133,10 @@ class UI_TOUCH_SELECTION_EXPORT TouchHandle {
|
| bool is_dragging_;
|
| bool is_drag_within_tap_region_;
|
|
|
| + // Mirror variables determine if the handles should be inverted or not.
|
| + bool mirror_vertical_;
|
| + bool mirror_horizontal_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(TouchHandle);
|
| };
|
|
|
|
|