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/screen_lock_view.h" | 5 #include "chrome/browser/chromeos/login/screen_lock_view.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/chromeos/login/helper.h" | 10 #include "chrome/browser/chromeos/login/helper.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 layout->AddPaddingRow(0, kBorderSize); | 131 layout->AddPaddingRow(0, kBorderSize); |
132 layout->StartRow(0, 0); | 132 layout->StartRow(0, 0); |
133 layout->AddView(user_view_); | 133 layout->AddView(user_view_); |
134 layout->AddPaddingRow(0, kBorderSize); | 134 layout->AddPaddingRow(0, kBorderSize); |
135 layout->StartRow(0, 1); | 135 layout->StartRow(0, 1); |
136 layout->AddView(password_field_); | 136 layout->AddView(password_field_); |
137 layout->AddPaddingRow(0, kBorderSize); | 137 layout->AddPaddingRow(0, kBorderSize); |
138 | 138 |
139 AddChildView(main_); | 139 AddChildView(main_); |
140 | 140 |
141 UsernameView* username = new UsernameView(text); | 141 UsernameView* username = UsernameView::CreateShapedUsernameView(text, false); |
142 username_ = username; | 142 username_ = username; |
143 username->SetColor(login::kTextColor); | 143 username->SetColor(login::kTextColor); |
144 username->SetFont(font); | 144 username->SetFont(font); |
145 AddChildView(username); | 145 AddChildView(username); |
146 } | 146 } |
147 | 147 |
148 void ScreenLockView::ClearAndSetFocusToPassword() { | 148 void ScreenLockView::ClearAndSetFocusToPassword() { |
149 password_field_->RequestFocus(); | 149 password_field_->RequestFocus(); |
150 password_field_->SetText(string16()); | 150 password_field_->SetText(string16()); |
151 } | 151 } |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 user_view_->SetImage(user->image(), user->image()); | 207 user_view_->SetImage(user->image(), user->image()); |
208 } | 208 } |
209 | 209 |
210 void ScreenLockView::ViewHierarchyChanged(bool is_add, | 210 void ScreenLockView::ViewHierarchyChanged(bool is_add, |
211 views::View* parent, | 211 views::View* parent, |
212 views::View* child) { | 212 views::View* child) { |
213 if (is_add && this == child) | 213 if (is_add && this == child) |
214 WizardAccessibilityHelper::GetInstance()->MaybeEnableAccessibility(this); | 214 WizardAccessibilityHelper::GetInstance()->MaybeEnableAccessibility(this); |
215 } | 215 } |
216 } // namespace chromeos | 216 } // namespace chromeos |
OLD | NEW |