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

Side by Side Diff: ui/gfx/selection_model.cc

Issue 8044004: Clean up of SelectionModel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: add comment about 'next' in ReplaceTextInternal Created 9 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « ui/gfx/selection_model.h ('k') | views/controls/textfield/native_textfield_gtk.h » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "ui/gfx/selection_model.h" 5 #include "ui/gfx/selection_model.h"
6 6
7 namespace gfx { 7 namespace gfx {
8 8
9 SelectionModel::SelectionModel() { 9 SelectionModel::SelectionModel() {
10 Init(0, 0, 0, LEADING); 10 Init(0, 0, 0, LEADING);
11 } 11 }
12 12
13 SelectionModel::SelectionModel(size_t pos) { 13 SelectionModel::SelectionModel(size_t pos) {
14 Init(pos, pos, pos, LEADING); 14 Init(pos, pos, pos, LEADING);
15 } 15 }
16 16
17 SelectionModel::SelectionModel(size_t start, size_t end) {
18 Init(start, end, end, LEADING);
19 }
20
21 SelectionModel::SelectionModel(size_t end, 17 SelectionModel::SelectionModel(size_t end,
22 size_t pos, 18 size_t pos,
23 CaretPlacement placement) { 19 CaretPlacement placement) {
24 Init(end, end, pos, placement); 20 Init(end, end, pos, placement);
25 } 21 }
26 22
27 SelectionModel::SelectionModel(size_t start, 23 SelectionModel::SelectionModel(size_t start,
28 size_t end, 24 size_t end,
29 size_t pos, 25 size_t pos,
30 CaretPlacement placement) { 26 CaretPlacement placement) {
(...skipping 14 matching lines...) Expand all
45 size_t end, 41 size_t end,
46 size_t pos, 42 size_t pos,
47 CaretPlacement placement) { 43 CaretPlacement placement) {
48 selection_start_ = start; 44 selection_start_ = start;
49 selection_end_ = end; 45 selection_end_ = end;
50 caret_pos_ = pos; 46 caret_pos_ = pos;
51 caret_placement_ = placement; 47 caret_placement_ = placement;
52 } 48 }
53 49
54 } // namespace gfx 50 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/selection_model.h ('k') | views/controls/textfield/native_textfield_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698