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

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

Issue 2124913002: Fix long press touch selection on empty text fields (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: EmptyTextfield -> ClearTextfield Created 4 years, 5 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 | « content/test/data/touch_selection.html ('k') | no next file » | 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 "base/macros.h" 8 #include "base/macros.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "ui/gfx/geometry/point_f.h" 10 #include "ui/gfx/geometry/point_f.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 // Returns the focal point of the start and end bounds, as defined by 140 // Returns the focal point of the start and end bounds, as defined by
141 // their bottom coordinate. 141 // their bottom coordinate.
142 const gfx::PointF& GetStartPosition() const; 142 const gfx::PointF& GetStartPosition() const;
143 const gfx::PointF& GetEndPosition() const; 143 const gfx::PointF& GetEndPosition() const;
144 144
145 const gfx::SelectionBound& start() const { return start_; } 145 const gfx::SelectionBound& start() const { return start_; }
146 const gfx::SelectionBound& end() const { return end_; } 146 const gfx::SelectionBound& end() const { return end_; }
147 147
148 ActiveStatus active_status() const { return active_status_; } 148 ActiveStatus active_status() const { return active_status_; }
149 149
150 bool insertion_active_or_requested() const {
151 return activate_insertion_automatically_;
152 }
153
150 private: 154 private:
151 friend class TouchSelectionControllerTestApi; 155 friend class TouchSelectionControllerTestApi;
152 156
153 enum InputEventType { TAP, REPEATED_TAP, LONG_PRESS, INPUT_EVENT_TYPE_NONE }; 157 enum InputEventType { TAP, REPEATED_TAP, LONG_PRESS, INPUT_EVENT_TYPE_NONE };
154 158
155 // TouchHandleClient implementation. 159 // TouchHandleClient implementation.
156 void OnDragBegin(const TouchSelectionDraggable& draggable, 160 void OnDragBegin(const TouchSelectionDraggable& draggable,
157 const gfx::PointF& drag_position) override; 161 const gfx::PointF& drag_position) override;
158 void OnDragUpdate(const TouchSelectionDraggable& draggable, 162 void OnDragUpdate(const TouchSelectionDraggable& draggable,
159 const gfx::PointF& drag_position) override; 163 const gfx::PointF& drag_position) override;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 // Whether a selection handle was dragged during the current 'selection 245 // Whether a selection handle was dragged during the current 'selection
242 // session' - i.e. since the current selection has been activated. 246 // session' - i.e. since the current selection has been activated.
243 bool selection_handle_dragged_; 247 bool selection_handle_dragged_;
244 248
245 DISALLOW_COPY_AND_ASSIGN(TouchSelectionController); 249 DISALLOW_COPY_AND_ASSIGN(TouchSelectionController);
246 }; 250 };
247 251
248 } // namespace ui 252 } // namespace ui
249 253
250 #endif // UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_H_ 254 #endif // UI_TOUCH_SELECTION_TOUCH_SELECTION_CONTROLLER_H_
OLDNEW
« no previous file with comments | « content/test/data/touch_selection.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698