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

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

Issue 117983002: Prefix string16 with base:: in ui/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_NATIVE_TEXTFIELD_WRAPPER_H_ 5 #ifndef UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WRAPPER_H_
6 #define UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WRAPPER_H_ 6 #define UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WRAPPER_H_
7 7
8 #include "base/i18n/rtl.h" 8 #include "base/i18n/rtl.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "ui/gfx/native_widget_types.h" 10 #include "ui/gfx/native_widget_types.h"
(...skipping 19 matching lines...) Expand all
30 30
31 // An interface implemented by an object that provides a platform-native 31 // An interface implemented by an object that provides a platform-native
32 // text field. 32 // text field.
33 class VIEWS_EXPORT NativeTextfieldWrapper { 33 class VIEWS_EXPORT NativeTextfieldWrapper {
34 public: 34 public:
35 // The Textfield calls this when it is destroyed to clean up the wrapper 35 // The Textfield calls this when it is destroyed to clean up the wrapper
36 // object. 36 // object.
37 virtual ~NativeTextfieldWrapper() {} 37 virtual ~NativeTextfieldWrapper() {}
38 38
39 // Gets the text displayed in the wrapped native text field. 39 // Gets the text displayed in the wrapped native text field.
40 virtual string16 GetText() const = 0; 40 virtual base::string16 GetText() const = 0;
41 41
42 // Updates the text displayed with the text held by the Textfield. 42 // Updates the text displayed with the text held by the Textfield.
43 virtual void UpdateText() = 0; 43 virtual void UpdateText() = 0;
44 44
45 // Adds the specified text to the text already displayed by the wrapped native 45 // Adds the specified text to the text already displayed by the wrapped native
46 // text field. 46 // text field.
47 virtual void AppendText(const string16& text) = 0; 47 virtual void AppendText(const base::string16& text) = 0;
48 48
49 // Inserts |text| at the current cursor position, replacing any selected text. 49 // Inserts |text| at the current cursor position, replacing any selected text.
50 virtual void InsertOrReplaceText(const string16& text) = 0; 50 virtual void InsertOrReplaceText(const base::string16& text) = 0;
51 51
52 // Returns the text direction. 52 // Returns the text direction.
53 virtual base::i18n::TextDirection GetTextDirection() const = 0; 53 virtual base::i18n::TextDirection GetTextDirection() const = 0;
54 54
55 // Gets the text that is selected in the wrapped native text field. 55 // Gets the text that is selected in the wrapped native text field.
56 virtual string16 GetSelectedText() const = 0; 56 virtual base::string16 GetSelectedText() const = 0;
57 57
58 // Select the entire text range. If |reversed| is true, the range will end at 58 // Select the entire text range. If |reversed| is true, the range will end at
59 // the logical beginning of the text; this generally shows the leading portion 59 // the logical beginning of the text; this generally shows the leading portion
60 // of text that overflows its display area. 60 // of text that overflows its display area.
61 virtual void SelectAll(bool reversed) = 0; 61 virtual void SelectAll(bool reversed) = 0;
62 62
63 // Clears the selection within the edit field and sets the caret to the end. 63 // Clears the selection within the edit field and sets the caret to the end.
64 virtual void ClearSelection() = 0; 64 virtual void ClearSelection() = 0;
65 65
66 // Updates whether there is a visible border. 66 // Updates whether there is a visible border.
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 // Returns the location for keyboard-triggered context menus. 179 // Returns the location for keyboard-triggered context menus.
180 virtual gfx::Point GetContextMenuLocation() = 0; 180 virtual gfx::Point GetContextMenuLocation() = 0;
181 181
182 // Creates an appropriate NativeTextfieldWrapper for the platform. 182 // Creates an appropriate NativeTextfieldWrapper for the platform.
183 static NativeTextfieldWrapper* CreateWrapper(Textfield* field); 183 static NativeTextfieldWrapper* CreateWrapper(Textfield* field);
184 }; 184 };
185 185
186 } // namespace views 186 } // namespace views
187 187
188 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WRAPPER_H_ 188 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WRAPPER_H_
OLDNEW
« no previous file with comments | « ui/views/controls/textfield/native_textfield_views_unittest.cc ('k') | ui/views/controls/textfield/textfield.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698