OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_AURA_H_ | 5 #ifndef UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_AURA_H_ |
6 #define UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_AURA_H_ | 6 #define UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_AURA_H_ |
7 | 7 |
8 #include "base/timer/timer.h" | 8 #include "base/timer/timer.h" |
9 #include "ui/events/event_handler.h" | 9 #include "ui/events/event_handler.h" |
10 #include "ui/touch_selection/touch_selection_controller.h" | 10 #include "ui/touch_selection/touch_selection_controller.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 virtual void OpenContextMenu(const gfx::PointF& point) = 0; | 35 virtual void OpenContextMenu(const gfx::PointF& point) = 0; |
36 virtual gfx::Rect ConvertRectToScreen(const gfx::Rect& rect) const = 0; | 36 virtual gfx::Rect ConvertRectToScreen(const gfx::Rect& rect) const = 0; |
37 }; | 37 }; |
38 | 38 |
39 class UI_TOUCH_SELECTION_EXPORT TouchSelectionControllerAura | 39 class UI_TOUCH_SELECTION_EXPORT TouchSelectionControllerAura |
40 : public TouchSelectionControllerClient, | 40 : public TouchSelectionControllerClient, |
41 public TouchSelectionMenuClient, | 41 public TouchSelectionMenuClient, |
42 public EventHandler { | 42 public EventHandler { |
43 public: | 43 public: |
44 explicit TouchSelectionControllerAura( | 44 explicit TouchSelectionControllerAura( |
45 TouchSelectionControllerAuraClient* client); | 45 TouchSelectionControllerAuraClient* client, |
| 46 TextSelectionGranularityStrategy selection_granularity_strategy); |
46 ~TouchSelectionControllerAura() override; | 47 ~TouchSelectionControllerAura() override; |
47 | 48 |
| 49 void SetVelocityStrategyParameters(int halfDecayMs, int threshold); |
| 50 |
48 void OnSelectionEditable(bool editable); | 51 void OnSelectionEditable(bool editable); |
49 void OnSelectionEmpty(bool empty); | 52 void OnSelectionEmpty(bool empty); |
50 void OnSelectionBoundsUpdated(const SelectionBound& start, | 53 void OnSelectionBoundsUpdated(const SelectionBound& start, |
51 const SelectionBound& end); | 54 const SelectionBound& end); |
52 void HandleGestureEvent(GestureEvent* event); | 55 void HandleGestureEvent(GestureEvent* event); |
53 void HandleTouchEvent(TouchEvent* event); | 56 void HandleTouchEvent(TouchEvent* event); |
54 void HideAndDisallowShowingAutomatically(); | 57 void HideAndDisallowShowingAutomatically(); |
55 void OnWindowMoved(); | 58 void OnWindowMoved(); |
56 void OnOverscrollStarted(); | 59 void OnOverscrollStarted(); |
57 void OnOverscrollCompleted(); | 60 void OnOverscrollCompleted(); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 bool handle_drag_in_progress_; | 111 bool handle_drag_in_progress_; |
109 | 112 |
110 bool immediate_quick_menu_for_testing_; | 113 bool immediate_quick_menu_for_testing_; |
111 | 114 |
112 DISALLOW_COPY_AND_ASSIGN(TouchSelectionControllerAura); | 115 DISALLOW_COPY_AND_ASSIGN(TouchSelectionControllerAura); |
113 }; | 116 }; |
114 | 117 |
115 } // namespace ui | 118 } // namespace ui |
116 | 119 |
117 #endif // UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_AURA_H_ | 120 #endif // UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_AURA_H_ |
OLD | NEW |