OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/chromeos/login/existing_user_view.h" | 5 #include "chrome/browser/chromeos/login/existing_user_view.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "chrome/browser/chromeos/login/helper.h" | 8 #include "chrome/browser/chromeos/login/helper.h" |
9 #include "chrome/browser/chromeos/login/user_controller.h" | 9 #include "chrome/browser/chromeos/login/user_controller.h" |
10 #include "chrome/browser/chromeos/login/textfield_with_margin.h" | 10 #include "chrome/browser/chromeos/login/textfield_with_margin.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 } | 68 } |
69 | 69 |
70 void ExistingUserView::RecreateFields() { | 70 void ExistingUserView::RecreateFields() { |
71 if (password_field_ == NULL) { | 71 if (password_field_ == NULL) { |
72 SetLayoutManager(new views::FillLayout); | 72 SetLayoutManager(new views::FillLayout); |
73 password_field_ = new UserEntryTextfield(user_controller_, | 73 password_field_ = new UserEntryTextfield(user_controller_, |
74 views::Textfield::STYLE_PASSWORD); | 74 views::Textfield::STYLE_PASSWORD); |
75 password_field_->set_background( | 75 password_field_->set_background( |
76 views::Background::CreateVerticalGradientBackground( | 76 views::Background::CreateVerticalGradientBackground( |
77 kBackgroundColorTop, kBackgroundColorBottom)); | 77 kBackgroundColorTop, kBackgroundColorBottom)); |
78 CorrectTextfieldFontSize(password_field_); | |
79 password_field_->SetFocusable(true); | 78 password_field_->SetFocusable(true); |
80 password_field_->SetController(user_controller_); | 79 password_field_->SetController(user_controller_); |
81 AddChildView(password_field_); | 80 AddChildView(password_field_); |
82 } | 81 } |
83 password_field_->set_text_to_display_when_empty( | 82 password_field_->set_text_to_display_when_empty( |
84 l10n_util::GetStringUTF16(IDS_LOGIN_POD_EMPTY_PASSWORD_TEXT)); | 83 l10n_util::GetStringUTF16(IDS_LOGIN_POD_EMPTY_PASSWORD_TEXT)); |
85 Layout(); | 84 Layout(); |
86 SchedulePaint(); | 85 SchedulePaint(); |
87 } | 86 } |
88 | 87 |
(...skipping 20 matching lines...) Expand all Loading... |
109 if (GetFocusManager()) { | 108 if (GetFocusManager()) { |
110 password_field()->RequestFocus(); | 109 password_field()->RequestFocus(); |
111 } | 110 } |
112 } | 111 } |
113 | 112 |
114 void ExistingUserView::OnLocaleChanged() { | 113 void ExistingUserView::OnLocaleChanged() { |
115 RecreateFields(); | 114 RecreateFields(); |
116 } | 115 } |
117 | 116 |
118 } // namespace chromeos | 117 } // namespace chromeos |
OLD | NEW |