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 115dd0d637046b44aa49c42e832fc5e82489cc95..9065b7801eb4fa316b971ca2970399ce651f0b13 100644 |
--- a/ui/touch_selection/touch_selection_controller.h |
+++ b/ui/touch_selection/touch_selection_controller.h |
@@ -36,6 +36,12 @@ class UI_TOUCH_SELECTION_EXPORT TouchSelectionControllerClient { |
class UI_TOUCH_SELECTION_EXPORT TouchSelectionController |
: public TouchHandleClient { |
public: |
+ enum ActiveStatus { |
jdduke (slow)
2015/05/07 20:38:15
Do we need to expose this publicly?
mohsen
2015/05/07 21:21:55
In a few places for Aura implementation, we'll nee
|
+ INACTIVE, |
+ INSERTION_ACTIVE, |
+ SELECTION_ACTIVE, |
+ }; |
+ |
TouchSelectionController(TouchSelectionControllerClient* client, |
base::TimeDelta tap_timeout, |
float tap_slop, |
@@ -78,6 +84,9 @@ class UI_TOUCH_SELECTION_EXPORT TouchSelectionController |
// To be called when the contents of the focused region changes. |
void OnSelectionEmpty(bool empty); |
+ // To be called when native view moves around. |
+ void OnNativeViewMoved(); |
+ |
// Ticks an active animation, as requested to the client by |SetNeedsAnimate|. |
// Returns true if an animation is active and requires further ticking. |
bool Animate(base::TimeTicks animate_time); |
@@ -97,6 +106,11 @@ class UI_TOUCH_SELECTION_EXPORT TouchSelectionController |
const gfx::PointF& GetStartPosition() const; |
const gfx::PointF& GetEndPosition() const; |
+ const SelectionBound& start() const { return start_; } |
+ const SelectionBound& end() const { return end_; } |
+ |
+ ActiveStatus active_status() const { return active_status_; } |
+ |
private: |
enum InputEventType { TAP, LONG_PRESS, INPUT_EVENT_TYPE_NONE }; |
@@ -146,13 +160,13 @@ class UI_TOUCH_SELECTION_EXPORT TouchSelectionController |
TouchHandleOrientation start_orientation_; |
TouchHandleOrientation end_orientation_; |
+ ActiveStatus active_status_; |
+ |
scoped_ptr<TouchHandle> insertion_handle_; |
- bool is_insertion_active_; |
bool activate_insertion_automatically_; |
scoped_ptr<TouchHandle> start_selection_handle_; |
scoped_ptr<TouchHandle> end_selection_handle_; |
- bool is_selection_active_; |
bool activate_selection_automatically_; |
bool selection_empty_; |