| 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_H_ | 5 #ifndef UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_H_ |
| 6 #define UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_H_ | 6 #define UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "ui/base/touch/selection_bound.h" | 8 #include "ui/base/touch/selection_bound.h" |
| 9 #include "ui/gfx/geometry/point_f.h" | 9 #include "ui/gfx/geometry/point_f.h" |
| 10 #include "ui/gfx/geometry/rect_f.h" | 10 #include "ui/gfx/geometry/rect_f.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 void ShowInsertionHandleAutomatically(); | 125 void ShowInsertionHandleAutomatically(); |
| 126 void ShowSelectionHandlesAutomatically(); | 126 void ShowSelectionHandlesAutomatically(); |
| 127 | 127 |
| 128 void OnInsertionChanged(); | 128 void OnInsertionChanged(); |
| 129 void OnSelectionChanged(); | 129 void OnSelectionChanged(); |
| 130 | 130 |
| 131 void ActivateInsertion(); | 131 void ActivateInsertion(); |
| 132 void DeactivateInsertion(); | 132 void DeactivateInsertion(); |
| 133 void ActivateSelection(); | 133 void ActivateSelection(); |
| 134 void DeactivateSelection(); | 134 void DeactivateSelection(); |
| 135 void ForceNextUpdateIfInactive(); | 135 void ResetCachedValuesIfInactive(); |
| 136 | 136 |
| 137 gfx::Vector2dF GetStartLineOffset() const; | 137 gfx::Vector2dF GetStartLineOffset() const; |
| 138 gfx::Vector2dF GetEndLineOffset() const; | 138 gfx::Vector2dF GetEndLineOffset() const; |
| 139 bool GetStartVisible() const; | 139 bool GetStartVisible() const; |
| 140 bool GetEndVisible() const; | 140 bool GetEndVisible() const; |
| 141 TouchHandle::AnimationStyle GetAnimationStyle(bool was_active) const; | 141 TouchHandle::AnimationStyle GetAnimationStyle(bool was_active) const; |
| 142 | 142 |
| 143 void LogSelectionEnd(); | 143 void LogSelectionEnd(); |
| 144 | 144 |
| 145 TouchSelectionControllerClient* const client_; | 145 TouchSelectionControllerClient* const client_; |
| 146 const base::TimeDelta tap_timeout_; | 146 const base::TimeDelta tap_timeout_; |
| 147 const float tap_slop_; | 147 const float tap_slop_; |
| 148 | 148 |
| 149 // Whether to force an update on the next selection event even if the | |
| 150 // cached selection matches the new selection. | |
| 151 bool force_next_update_; | |
| 152 | |
| 153 // Controls whether an insertion handle is shown on a tap for an empty | 149 // Controls whether an insertion handle is shown on a tap for an empty |
| 154 // editable text. | 150 // editable text. |
| 155 bool show_on_tap_for_empty_editable_; | 151 bool show_on_tap_for_empty_editable_; |
| 156 | 152 |
| 157 InputEventType response_pending_input_event_; | 153 InputEventType response_pending_input_event_; |
| 158 | 154 |
| 159 SelectionBound start_; | 155 SelectionBound start_; |
| 160 SelectionBound end_; | 156 SelectionBound end_; |
| 161 TouchHandleOrientation start_orientation_; | 157 TouchHandleOrientation start_orientation_; |
| 162 TouchHandleOrientation end_orientation_; | 158 TouchHandleOrientation end_orientation_; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 179 // Whether a selection handle was dragged during the current 'selection | 175 // Whether a selection handle was dragged during the current 'selection |
| 180 // session' - i.e. since the current selection has been activated. | 176 // session' - i.e. since the current selection has been activated. |
| 181 bool selection_handle_dragged_; | 177 bool selection_handle_dragged_; |
| 182 | 178 |
| 183 DISALLOW_COPY_AND_ASSIGN(TouchSelectionController); | 179 DISALLOW_COPY_AND_ASSIGN(TouchSelectionController); |
| 184 }; | 180 }; |
| 185 | 181 |
| 186 } // namespace ui | 182 } // namespace ui |
| 187 | 183 |
| 188 #endif // UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_H_ | 184 #endif // UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_H_ |
| OLD | NEW |