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 b18353b5287556d58fa447110cf54fb4e08c7d3a..69982875892382034e1829407b8ca3f637cffc1f 100644 |
--- a/ui/touch_selection/touch_selection_controller.h |
+++ b/ui/touch_selection/touch_selection_controller.h |
@@ -15,6 +15,7 @@ |
namespace ui { |
class MotionEvent; |
+class GranularityStrategy; |
// Interface through which |TouchSelectionController| issues selection-related |
// commands, notifications and requests. |
@@ -39,12 +40,16 @@ class UI_TOUCH_SELECTION_EXPORT TouchSelectionControllerClient { |
class UI_TOUCH_SELECTION_EXPORT TouchSelectionController |
: public TouchHandleClient { |
public: |
- TouchSelectionController(TouchSelectionControllerClient* client, |
- base::TimeDelta tap_timeout, |
- float tap_slop, |
- bool show_on_tap_for_empty_editable); |
+ TouchSelectionController( |
+ TouchSelectionControllerClient* client, |
+ base::TimeDelta tap_timeout, |
+ float tap_slop, |
+ bool show_on_tap_for_empty_editable, |
+ TextSelectionGranularityStrategy selection_granularity_strategy); |
~TouchSelectionController() override; |
+ void SetVelocityStrategyParameters(int halfDecayMs, int threshold); |
+ |
// 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. |
@@ -99,9 +104,11 @@ class UI_TOUCH_SELECTION_EXPORT TouchSelectionController |
enum InputEventType { TAP, LONG_PRESS, INPUT_EVENT_TYPE_NONE }; |
// TouchHandleClient implementation. |
- void OnHandleDragBegin(const TouchHandle& handle) override; |
+ void OnHandleDragBegin(const TouchHandle& handle, |
+ base::TimeTicks event_time) override; |
void OnHandleDragUpdate(const TouchHandle& handle, |
- const gfx::PointF& new_position) override; |
+ const gfx::PointF& new_position, |
+ base::TimeTicks event_time) override; |
void OnHandleDragEnd(const TouchHandle& handle) override; |
void OnHandleTapped(const TouchHandle& handle) override; |
void SetNeedsAnimate() override; |
@@ -154,6 +161,7 @@ class UI_TOUCH_SELECTION_EXPORT TouchSelectionController |
scoped_ptr<TouchHandle> start_selection_handle_; |
scoped_ptr<TouchHandle> end_selection_handle_; |
+ |
bool is_selection_active_; |
bool activate_selection_automatically_; |
@@ -162,6 +170,9 @@ class UI_TOUCH_SELECTION_EXPORT TouchSelectionController |
bool temporarily_hidden_; |
+ TextSelectionGranularityStrategy selection_granularity_strategy_; |
+ scoped_ptr<GranularityStrategy> granularity_strategy_; |
+ |
DISALLOW_COPY_AND_ASSIGN(TouchSelectionController); |
}; |