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

Unified Diff: ui/views/controls/textfield/textfield.cc

Issue 10310131: Support placeholder text in NativeTextfieldViews. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix lint Created 8 years, 7 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
Index: ui/views/controls/textfield/textfield.cc
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
index 2243e15f7978cfe4795aa888ed642463a332d315..4936ebf7ca859a14e210640d95993db71ba3ba75 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -29,6 +29,9 @@
namespace views {
+// Default placeholder text color.
+const SkColor kDefaultPlaceholderTextColor = SK_ColorLTGRAY;
+
// static
const char Textfield::kViewClassName[] = "views/Textfield";
@@ -51,6 +54,7 @@ Textfield::Textfield()
initialized_(false),
horizontal_margins_were_set_(false),
vertical_margins_were_set_(false),
+ placeholder_text_color_(kDefaultPlaceholderTextColor),
text_input_type_(ui::TEXT_INPUT_TYPE_TEXT) {
set_focusable(true);
}
@@ -71,6 +75,7 @@ Textfield::Textfield(StyleFlags style)
initialized_(false),
horizontal_margins_were_set_(false),
vertical_margins_were_set_(false),
+ placeholder_text_color_(kDefaultPlaceholderTextColor),
text_input_type_(ui::TEXT_INPUT_TYPE_TEXT) {
set_focusable(true);
if (IsObscured())

Powered by Google App Engine
This is Rietveld 408576698