| 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 2bcefbd20542c1a12477ccb93ed6eec25fc7a8ea..e144f632fed18a0b3d82b41c0c28b3cf4b98e704 100644
|
| --- a/ui/touch_selection/touch_selection_controller.h
|
| +++ b/ui/touch_selection/touch_selection_controller.h
|
| @@ -38,13 +38,14 @@ class UI_TOUCH_SELECTION_EXPORT TouchSelectionController
|
| public:
|
| TouchSelectionController(TouchSelectionControllerClient* client,
|
| base::TimeDelta tap_timeout,
|
| - float tap_slop);
|
| + float tap_slop,
|
| + bool show_on_tap_for_empty_editable);
|
| ~TouchSelectionController() override;
|
|
|
| - // To be called when the selection bounds have changed.
|
| + // To be called when the selection bounds info has been updated.
|
| // Note that such updates will trigger handle updates only if preceded
|
| // by an appropriate call to allow automatic showing.
|
| - void OnSelectionBoundsChanged(const SelectionBound& start,
|
| + void OnSelectionBoundsUpdated(const SelectionBound& start,
|
| const SelectionBound& end);
|
|
|
| // Allows touch-dragging of the handle.
|
| @@ -81,7 +82,17 @@ class UI_TOUCH_SELECTION_EXPORT TouchSelectionController
|
| // Returns true if an animation is active and requires further ticking.
|
| bool Animate(base::TimeTicks animate_time);
|
|
|
| + void TryActivateSelection();
|
| +
|
| + const SelectionBound& start() const { return start_; }
|
| + const SelectionBound& end() const { return end_; }
|
| +
|
| + bool is_insertion_active() const { return is_insertion_active_; }
|
| + bool is_selection_active() const { return is_selection_active_; }
|
| +
|
| private:
|
| + friend class TouchSelectionControllerAuraTest;
|
| +
|
| enum InputEventType { TAP, LONG_PRESS, INPUT_EVENT_TYPE_NONE };
|
|
|
| // TouchHandleClient implementation.
|
| @@ -115,10 +126,18 @@ class UI_TOUCH_SELECTION_EXPORT TouchSelectionController
|
| bool GetEndVisible() const;
|
| TouchHandle::AnimationStyle GetAnimationStyle(bool was_active) const;
|
|
|
| + TouchHandle* insertion_handle_for_testing() const {
|
| + return insertion_handle_.get();
|
| + }
|
| +
|
| TouchSelectionControllerClient* const client_;
|
| const base::TimeDelta tap_timeout_;
|
| const float tap_slop_;
|
|
|
| + // Controls whether an insertion handle is shown on a tap for an empty
|
| + // editable selection.
|
| + bool show_on_tap_for_empty_editable_;
|
| +
|
| InputEventType response_pending_input_event_;
|
|
|
| SelectionBound start_;
|
|
|