Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(508)

Side by Side Diff: ui/touch_selection/touch_selection_controller.h

Issue 1127383007: Be explicit about forcing TouchSelectionController updates (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Initialize force_next_update_ Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ui/touch_selection/touch_selection_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 ResetCachedValuesIfInactive(); 135 void ForceNextUpdateIfInactive();
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
149 // Controls whether an insertion handle is shown on a tap for an empty 153 // Controls whether an insertion handle is shown on a tap for an empty
150 // editable text. 154 // editable text.
151 bool show_on_tap_for_empty_editable_; 155 bool show_on_tap_for_empty_editable_;
152 156
153 InputEventType response_pending_input_event_; 157 InputEventType response_pending_input_event_;
154 158
155 SelectionBound start_; 159 SelectionBound start_;
156 SelectionBound end_; 160 SelectionBound end_;
157 TouchHandleOrientation start_orientation_; 161 TouchHandleOrientation start_orientation_;
158 TouchHandleOrientation end_orientation_; 162 TouchHandleOrientation end_orientation_;
(...skipping 16 matching lines...) Expand all
175 // Whether a selection handle was dragged during the current 'selection 179 // Whether a selection handle was dragged during the current 'selection
176 // session' - i.e. since the current selection has been activated. 180 // session' - i.e. since the current selection has been activated.
177 bool selection_handle_dragged_; 181 bool selection_handle_dragged_;
178 182
179 DISALLOW_COPY_AND_ASSIGN(TouchSelectionController); 183 DISALLOW_COPY_AND_ASSIGN(TouchSelectionController);
180 }; 184 };
181 185
182 } // namespace ui 186 } // namespace ui
183 187
184 #endif // UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_H_ 188 #endif // UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | ui/touch_selection/touch_selection_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698