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

Side by Side Diff: ui/views/controls/textfield/textfield_model.h

Issue 2228833002: MacViews: Fix behavior of move and select commands when selection direction changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@use_text_commands
Patch Set: Add apple rdar in comment. Created 4 years, 4 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
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_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_MODEL_H_ 5 #ifndef UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_MODEL_H_
6 #define UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_MODEL_H_ 6 #define UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_MODEL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 // Cursor related methods. 114 // Cursor related methods.
115 115
116 // Returns the current cursor position. 116 // Returns the current cursor position.
117 size_t GetCursorPosition() const; 117 size_t GetCursorPosition() const;
118 118
119 // Moves the cursor, see RenderText for additional details. 119 // Moves the cursor, see RenderText for additional details.
120 // The current composition text will be confirmed. 120 // The current composition text will be confirmed.
121 void MoveCursor(gfx::BreakType break_type, 121 void MoveCursor(gfx::BreakType break_type,
122 gfx::VisualCursorDirection direction, 122 gfx::VisualCursorDirection direction,
123 bool select); 123 gfx::SelectionBehavior selection_behavior);
124 124
125 // Updates the cursor to the specified selection model. Any composition text 125 // Updates the cursor to the specified selection model. Any composition text
126 // will be confirmed, which may alter the specified selection range start. 126 // will be confirmed, which may alter the specified selection range start.
127 bool MoveCursorTo(const gfx::SelectionModel& cursor); 127 bool MoveCursorTo(const gfx::SelectionModel& cursor);
128 128
129 // Helper function to call MoveCursorTo on the TextfieldModel. 129 // Helper function to call MoveCursorTo on the TextfieldModel.
130 bool MoveCursorTo(const gfx::Point& point, bool select); 130 bool MoveCursorTo(const gfx::Point& point, bool select);
131 131
132 // Selection related methods. 132 // Selection related methods.
133 133
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 // 2) new edit is added. (redo history is cleared) 310 // 2) new edit is added. (redo history is cleared)
311 // 3) redone all undone edits. 311 // 3) redone all undone edits.
312 EditHistory::iterator current_edit_; 312 EditHistory::iterator current_edit_;
313 313
314 DISALLOW_COPY_AND_ASSIGN(TextfieldModel); 314 DISALLOW_COPY_AND_ASSIGN(TextfieldModel);
315 }; 315 };
316 316
317 } // namespace views 317 } // namespace views
318 318
319 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_MODEL_H_ 319 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698