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

Side by Side Diff: chrome/browser/chromeos/login/existing_user_view.cc

Issue 5473001: [cros] Use same textfield settings across existing/new user pods and screen lock. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: proper fix Created 10 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/new_user_view.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) 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
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/new_user_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698