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

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

Issue 2313123002: Harmony - set correct textfield placeholder text color (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | ui/views/controls/textfield/textfield.cc » ('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) 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 void set_default_width_in_chars(int default_width) { 145 void set_default_width_in_chars(int default_width) {
146 default_width_in_chars_ = default_width; 146 default_width_in_chars_ = default_width;
147 } 147 }
148 148
149 // Sets the text to display when empty. 149 // Sets the text to display when empty.
150 void set_placeholder_text(const base::string16& text) { 150 void set_placeholder_text(const base::string16& text) {
151 placeholder_text_ = text; 151 placeholder_text_ = text;
152 } 152 }
153 base::string16 GetPlaceholderText() const; 153 base::string16 GetPlaceholderText() const;
154 154
155 SkColor placeholder_text_color() const { return placeholder_text_color_; }
156 void set_placeholder_text_color(SkColor color) { 155 void set_placeholder_text_color(SkColor color) {
157 placeholder_text_color_ = color; 156 placeholder_text_color_ = color;
158 } 157 }
159 158
160 // Get or set the horizontal alignment used for the button from the underlying 159 // Get or set the horizontal alignment used for the button from the underlying
161 // RenderText object. 160 // RenderText object.
162 gfx::HorizontalAlignment GetHorizontalAlignment() const; 161 gfx::HorizontalAlignment GetHorizontalAlignment() const;
163 void SetHorizontalAlignment(gfx::HorizontalAlignment alignment); 162 void SetHorizontalAlignment(gfx::HorizontalAlignment alignment);
164 163
165 // Displays a virtual keyboard or alternate input view if enabled. 164 // Displays a virtual keyboard or alternate input view if enabled.
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 bool use_default_selection_background_color_; 420 bool use_default_selection_background_color_;
422 SkColor text_color_; 421 SkColor text_color_;
423 SkColor background_color_; 422 SkColor background_color_;
424 SkColor selection_text_color_; 423 SkColor selection_text_color_;
425 SkColor selection_background_color_; 424 SkColor selection_background_color_;
426 425
427 // Text to display when empty. 426 // Text to display when empty.
428 base::string16 placeholder_text_; 427 base::string16 placeholder_text_;
429 428
430 // Placeholder text color. 429 // Placeholder text color.
430 // TODO(estade): remove this when Harmony/MD is default.
431 SkColor placeholder_text_color_; 431 SkColor placeholder_text_color_;
432 432
433 // The accessible name of the text field. 433 // The accessible name of the text field.
434 base::string16 accessible_name_; 434 base::string16 accessible_name_;
435 435
436 // The input type of this text field. 436 // The input type of this text field.
437 ui::TextInputType text_input_type_; 437 ui::TextInputType text_input_type_;
438 438
439 // The input flags of this text field. 439 // The input flags of this text field.
440 int text_input_flags_; 440 int text_input_flags_;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 488
489 // Used to bind callback functions to this object. 489 // Used to bind callback functions to this object.
490 base::WeakPtrFactory<Textfield> weak_ptr_factory_; 490 base::WeakPtrFactory<Textfield> weak_ptr_factory_;
491 491
492 DISALLOW_COPY_AND_ASSIGN(Textfield); 492 DISALLOW_COPY_AND_ASSIGN(Textfield);
493 }; 493 };
494 494
495 } // namespace views 495 } // namespace views
496 496
497 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 497 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698