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 "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 user_controller_->OnLogin("", UTF16ToUTF8(password_field_->text())); | 109 user_controller_->OnLogin("", UTF16ToUTF8(password_field_->text())); |
110 } else { | 110 } else { |
111 user_controller_->ClearErrors(); | 111 user_controller_->ClearErrors(); |
112 return false; | 112 return false; |
113 } | 113 } |
114 return true; | 114 return true; |
115 } | 115 } |
116 | 116 |
117 void ExistingUserView::ContentsChanged(views::Textfield* sender, | 117 void ExistingUserView::ContentsChanged(views::Textfield* sender, |
118 const string16& new_contents) { | 118 const string16& new_contents) { |
| 119 if (!new_contents.empty()) |
| 120 user_controller_->ClearErrors(); |
119 } | 121 } |
120 | 122 |
121 void ExistingUserView::EnableInputControls(bool enabled) { | 123 void ExistingUserView::EnableInputControls(bool enabled) { |
122 password_field_->SetEnabled(enabled); | 124 password_field_->SetEnabled(enabled); |
123 } | 125 } |
124 | 126 |
125 void ExistingUserView::ClearAndFocusControls() { | 127 void ExistingUserView::ClearAndFocusControls() { |
126 ClearAndFocusPassword(); | 128 ClearAndFocusPassword(); |
127 } | 129 } |
128 | 130 |
(...skipping 15 matching lines...) Expand all Loading... |
144 | 146 |
145 gfx::Rect ExistingUserView::GetMainInputScreenBounds() const { | 147 gfx::Rect ExistingUserView::GetMainInputScreenBounds() const { |
146 return password_field_->GetScreenBounds(); | 148 return password_field_->GetScreenBounds(); |
147 } | 149 } |
148 | 150 |
149 void ExistingUserView::OnLocaleChanged() { | 151 void ExistingUserView::OnLocaleChanged() { |
150 RecreateFields(); | 152 RecreateFields(); |
151 } | 153 } |
152 | 154 |
153 } // namespace chromeos | 155 } // namespace chromeos |
OLD | NEW |