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

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

Issue 2952763002: SearchBoxView now enables/disables cursor based on user interaction. (Closed)
Patch Set: SearchBoxView now enables/disables cursor based on user interaction. Created 3 years, 6 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
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_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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 // Sets the text to display when empty. 155 // Sets the text to display when empty.
156 void set_placeholder_text(const base::string16& text) { 156 void set_placeholder_text(const base::string16& text) {
157 placeholder_text_ = text; 157 placeholder_text_ = text;
158 } 158 }
159 base::string16 GetPlaceholderText() const; 159 base::string16 GetPlaceholderText() const;
160 160
161 void set_placeholder_text_color(SkColor color) { 161 void set_placeholder_text_color(SkColor color) {
162 placeholder_text_color_ = color; 162 placeholder_text_color_ = color;
163 } 163 }
164 164
165 SkColor placeholder_text_color() { return placeholder_text_color_; }
vadimt 2017/06/22 00:53:05 const
newcomer 2017/06/22 16:17:22 Done.
166
165 void set_placeholder_text_draw_flags(int flags) { 167 void set_placeholder_text_draw_flags(int flags) {
166 placeholder_text_draw_flags_ = flags; 168 placeholder_text_draw_flags_ = flags;
167 } 169 }
168 170
171 int placeholder_text_draw_flags() { return placeholder_text_draw_flags_; }
vadimt 2017/06/22 00:53:05 const
newcomer 2017/06/22 16:17:21 Done.
172
169 // Sets whether to indicate the textfield has invalid content. 173 // Sets whether to indicate the textfield has invalid content.
170 void SetInvalid(bool invalid); 174 void SetInvalid(bool invalid);
171 bool invalid() const { return invalid_; } 175 bool invalid() const { return invalid_; }
172 176
173 // Get or set the horizontal alignment used for the button from the underlying 177 // Get or set the horizontal alignment used for the button from the underlying
174 // RenderText object. 178 // RenderText object.
175 gfx::HorizontalAlignment GetHorizontalAlignment() const; 179 gfx::HorizontalAlignment GetHorizontalAlignment() const;
176 void SetHorizontalAlignment(gfx::HorizontalAlignment alignment); 180 void SetHorizontalAlignment(gfx::HorizontalAlignment alignment);
177 181
178 // Displays a virtual keyboard or alternate input view if enabled. 182 // Displays a virtual keyboard or alternate input view if enabled.
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 543
540 // Used to bind callback functions to this object. 544 // Used to bind callback functions to this object.
541 base::WeakPtrFactory<Textfield> weak_ptr_factory_; 545 base::WeakPtrFactory<Textfield> weak_ptr_factory_;
542 546
543 DISALLOW_COPY_AND_ASSIGN(Textfield); 547 DISALLOW_COPY_AND_ASSIGN(Textfield);
544 }; 548 };
545 549
546 } // namespace views 550 } // namespace views
547 551
548 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 552 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698