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

Unified Diff: ui/views/examples/textfield_example.cc

Issue 138363004: Views Textfield fixes and cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync and rebase. Created 6 years, 11 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
« no previous file with comments | « ui/views/examples/multiline_example.cc ('k') | ui/views/view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/textfield_example.cc
diff --git a/ui/views/examples/textfield_example.cc b/ui/views/examples/textfield_example.cc
index 4ae31f90d8f2d30094c0078dc0f2cde30c1defb2..7dae434f353b6d4d55ba5c50d4a76f8ae0dc7911 100644
--- a/ui/views/examples/textfield_example.cc
+++ b/ui/views/examples/textfield_example.cc
@@ -37,7 +37,8 @@ TextfieldExample::~TextfieldExample() {
void TextfieldExample::CreateExampleView(View* container) {
name_ = new Textfield();
- password_ = new Textfield(Textfield::STYLE_OBSCURED);
+ password_ = new Textfield();
+ password_->SetTextInputType(ui::TEXT_INPUT_TYPE_PASSWORD);
password_->set_placeholder_text(ASCIIToUTF16("password"));
read_only_ = new Textfield();
read_only_->SetReadOnly(true);
@@ -47,8 +48,8 @@ void TextfieldExample::CreateExampleView(View* container) {
append_ = new LabelButton(this, ASCIIToUTF16("Append"));
set_ = new LabelButton(this, ASCIIToUTF16("Set"));
set_style_ = new LabelButton(this, ASCIIToUTF16("Set Styles"));
- name_->SetController(this);
- password_->SetController(this);
+ name_->set_controller(this);
+ password_->set_controller(this);
GridLayout* layout = new GridLayout(container);
container->SetLayoutManager(layout);
« no previous file with comments | « ui/views/examples/multiline_example.cc ('k') | ui/views/view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698