| Index: ui/touch_selection/touch_selection_controller.h
|
| diff --git a/ui/touch_selection/touch_selection_controller.h b/ui/touch_selection/touch_selection_controller.h
|
| index 72e2ae23fe81f6dc1e08aa5fdc1a107bb7028524..797b7556444b46046c8f6b48908d4b8aae1af283 100644
|
| --- a/ui/touch_selection/touch_selection_controller.h
|
| +++ b/ui/touch_selection/touch_selection_controller.h
|
| @@ -56,6 +56,10 @@ class UI_TOUCH_SELECTION_EXPORT TouchSelectionController
|
| // Defaults to 8 DIPs.
|
| float tap_slop;
|
|
|
| + // Controls whether adaptive orientation for selection handles is enabled.
|
| + // Defaults to false.
|
| + bool enable_adaptive_handle_orientation;
|
| +
|
| // Controls whether drag selection after a longpress is enabled.
|
| // Defaults to false.
|
| bool enable_longpress_drag_selection;
|
| @@ -75,6 +79,10 @@ class UI_TOUCH_SELECTION_EXPORT TouchSelectionController
|
| void OnSelectionBoundsChanged(const SelectionBound& start,
|
| const SelectionBound& end);
|
|
|
| + // To be called when the viewport rect has been changed. This is used for
|
| + // setting the state of the handles.
|
| + void OnViewportChanged(const gfx::RectF viewport_rect);
|
| +
|
| // Allows touch-dragging of the handle.
|
| // Returns true iff the event was consumed, in which case the caller should
|
| // cease further handling of the event.
|
| @@ -148,6 +156,7 @@ class UI_TOUCH_SELECTION_EXPORT TouchSelectionController
|
| void SetNeedsAnimate() override;
|
| scoped_ptr<TouchHandleDrawable> CreateDrawable() override;
|
| base::TimeDelta GetMaxTapDuration() const override;
|
| + bool IsAdaptiveHandleOrientationEnabled() const override;
|
|
|
| // LongPressDragSelectorClient implementation.
|
| void OnLongPressDragActiveStateChanged() override;
|
| @@ -168,6 +177,7 @@ class UI_TOUCH_SELECTION_EXPORT TouchSelectionController
|
| bool ActivateSelectionIfNecessary();
|
| void DeactivateSelection();
|
| void ForceNextUpdateIfInactive();
|
| + void UpdateHandleLayoutIfNecessary();
|
|
|
| bool WillHandleTouchEventForLongPressDrag(const MotionEvent& event);
|
| void SetTemporarilyHiddenForLongPressDrag(bool hidden);
|
| @@ -218,6 +228,8 @@ class UI_TOUCH_SELECTION_EXPORT TouchSelectionController
|
| // Longpress drag allows direct manipulation of longpress-initiated selection.
|
| LongPressDragSelector longpress_drag_selector_;
|
|
|
| + gfx::RectF viewport_rect_;
|
| +
|
| base::TimeTicks selection_start_time_;
|
| // Whether a selection handle was dragged during the current 'selection
|
| // session' - i.e. since the current selection has been activated.
|
|
|