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

Unified Diff: views/controls/textfield/native_textfield_wrapper.h

Issue 6318004: Add TextRange and related methods to Textfield Views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/controls/textfield/native_textfield_win.cc ('k') | views/controls/textfield/textfield.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/textfield/native_textfield_wrapper.h
diff --git a/views/controls/textfield/native_textfield_wrapper.h b/views/controls/textfield/native_textfield_wrapper.h
index c45243e029ed891cc600dccea6cec3f212ec5833..e2ef2bd6545588df8a572d0f08830e9d5f2a71ac 100644
--- a/views/controls/textfield/native_textfield_wrapper.h
+++ b/views/controls/textfield/native_textfield_wrapper.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -17,6 +17,7 @@ namespace views {
class KeyEvent;
class Textfield;
+class TextRange;
class View;
// An interface implemented by an object that provides a platform-native
@@ -91,6 +92,15 @@ class NativeTextfieldWrapper {
// Returns whether or not an IME is composing text.
virtual bool IsIMEComposing() const = 0;
+ // Gets the selected range.
+ virtual void GetSelectedRange(TextRange* range) const = 0;
+
+ // Selects the text given by |range|.
+ virtual void SelectRange(const TextRange& range) = 0;
+
+ // Returns the currnet cursor position.
+ virtual size_t GetCursorPosition() const = 0;
+
// Following methods are to forward key/focus related events to the
// views wrapper so that TextfieldViews can handle key inputs without
// having focus.
« 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