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

Side by Side Diff: views/controls/textfield/native_textfield_wrapper.h

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 | « views/controls/textfield/native_textfield_win.cc ('k') | views/controls/textfield/textfield.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 #ifndef VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WRAPPER_H_ 5 #ifndef VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WRAPPER_H_
6 #define VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WRAPPER_H_ 6 #define VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WRAPPER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "ui/gfx/native_widget_types.h" 10 #include "ui/gfx/native_widget_types.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 // Retrieves the views::View that hosts the native control. 93 // Retrieves the views::View that hosts the native control.
94 virtual View* GetView() = 0; 94 virtual View* GetView() = 0;
95 95
96 // Returns a handle to the underlying native view for testing. 96 // Returns a handle to the underlying native view for testing.
97 virtual gfx::NativeView GetTestingHandle() const = 0; 97 virtual gfx::NativeView GetTestingHandle() const = 0;
98 98
99 // Returns whether or not an IME is composing text. 99 // Returns whether or not an IME is composing text.
100 virtual bool IsIMEComposing() const = 0; 100 virtual bool IsIMEComposing() const = 0;
101 101
102 // Gets the selected range.
103 virtual void GetSelectedRange(ui::Range* range) const = 0;
104
105 // Selects the text given by |range|.
106 virtual void SelectRange(const ui::Range& range) = 0;
107
102 // Gets the selection model. 108 // Gets the selection model.
103 virtual void GetSelectionModel(gfx::SelectionModel* sel) const = 0; 109 virtual void GetSelectionModel(gfx::SelectionModel* sel) const = 0;
104 110
105 // Selects the text given by |sel|. 111 // Selects the text given by |sel|.
106 virtual void SelectSelectionModel(const gfx::SelectionModel& sel) = 0; 112 virtual void SelectSelectionModel(const gfx::SelectionModel& sel) = 0;
107 113
108 // Returns the currnet cursor position. 114 // Returns the currnet cursor position.
109 virtual size_t GetCursorPosition() const = 0; 115 virtual size_t GetCursorPosition() const = 0;
110 116
111 // Following methods are to forward key/focus related events to the 117 // Following methods are to forward key/focus related events to the
(...skipping 26 matching lines...) Expand all
138 // Clears Edit history. 144 // Clears Edit history.
139 virtual void ClearEditHistory() = 0; 145 virtual void ClearEditHistory() = 0;
140 146
141 // Creates an appropriate NativeTextfieldWrapper for the platform. 147 // Creates an appropriate NativeTextfieldWrapper for the platform.
142 static NativeTextfieldWrapper* CreateWrapper(Textfield* field); 148 static NativeTextfieldWrapper* CreateWrapper(Textfield* field);
143 }; 149 };
144 150
145 } // namespace views 151 } // namespace views
146 152
147 #endif // VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WRAPPER_H_ 153 #endif // VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WRAPPER_H_
OLDNEW
« no previous file with comments | « views/controls/textfield/native_textfield_win.cc ('k') | views/controls/textfield/textfield.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698