OLD | NEW |
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_TEXTFIELD_H_ | 5 #ifndef UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
6 #define UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ | 6 #define UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 void set_placeholder_text(const base::string16& text) { | 124 void set_placeholder_text(const base::string16& text) { |
125 placeholder_text_ = text; | 125 placeholder_text_ = text; |
126 } | 126 } |
127 virtual base::string16 GetPlaceholderText() const; | 127 virtual base::string16 GetPlaceholderText() const; |
128 | 128 |
129 SkColor placeholder_text_color() const { return placeholder_text_color_; } | 129 SkColor placeholder_text_color() const { return placeholder_text_color_; } |
130 void set_placeholder_text_color(SkColor color) { | 130 void set_placeholder_text_color(SkColor color) { |
131 placeholder_text_color_ = color; | 131 placeholder_text_color_ = color; |
132 } | 132 } |
133 | 133 |
| 134 // Displays a virtual keyboard or alternate input view if enabled. |
| 135 void ShowImeIfNeeded(); |
| 136 |
134 // Returns whether or not an IME is composing text. | 137 // Returns whether or not an IME is composing text. |
135 bool IsIMEComposing() const; | 138 bool IsIMEComposing() const; |
136 | 139 |
137 // Gets the selected logical text range. | 140 // Gets the selected logical text range. |
138 const gfx::Range& GetSelectedRange() const; | 141 const gfx::Range& GetSelectedRange() const; |
139 | 142 |
140 // Selects the specified logical text range. | 143 // Selects the specified logical text range. |
141 void SelectRange(const gfx::Range& range); | 144 void SelectRange(const gfx::Range& range); |
142 | 145 |
143 // Gets the text selection model. | 146 // Gets the text selection model. |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 | 421 |
419 // Used to bind callback functions to this object. | 422 // Used to bind callback functions to this object. |
420 base::WeakPtrFactory<Textfield> weak_ptr_factory_; | 423 base::WeakPtrFactory<Textfield> weak_ptr_factory_; |
421 | 424 |
422 DISALLOW_COPY_AND_ASSIGN(Textfield); | 425 DISALLOW_COPY_AND_ASSIGN(Textfield); |
423 }; | 426 }; |
424 | 427 |
425 } // namespace views | 428 } // namespace views |
426 | 429 |
427 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ | 430 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
OLD | NEW |