| 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/new_user_view.h" | 5 #include "chrome/browser/chromeos/login/new_user_view.h" |
| 6 | 6 |
| 7 #include <signal.h> | 7 #include <signal.h> |
| 8 #include <sys/types.h> | 8 #include <sys/types.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 return true; | 537 return true; |
| 538 } | 538 } |
| 539 delegate_->ClearErrors(); | 539 delegate_->ClearErrors(); |
| 540 // Return false so that processing does not end | 540 // Return false so that processing does not end |
| 541 return false; | 541 return false; |
| 542 } | 542 } |
| 543 | 543 |
| 544 void NewUserView::ContentsChanged(views::Textfield* sender, | 544 void NewUserView::ContentsChanged(views::Textfield* sender, |
| 545 const string16& new_contents) { | 545 const string16& new_contents) { |
| 546 UpdateSignInButtonState(); | 546 UpdateSignInButtonState(); |
| 547 if (!new_contents.empty()) |
| 548 delegate_->ClearErrors(); |
| 547 } | 549 } |
| 548 | 550 |
| 549 void NewUserView::EnableInputControls(bool enabled) { | 551 void NewUserView::EnableInputControls(bool enabled) { |
| 550 languages_menubutton_->SetEnabled(enabled); | 552 languages_menubutton_->SetEnabled(enabled); |
| 551 username_field_->SetEnabled(enabled); | 553 username_field_->SetEnabled(enabled); |
| 552 password_field_->SetEnabled(enabled); | 554 password_field_->SetEnabled(enabled); |
| 553 sign_in_button_->SetEnabled(enabled); | 555 sign_in_button_->SetEnabled(enabled); |
| 554 if (need_create_account_) { | 556 if (need_create_account_) { |
| 555 create_account_link_->SetEnabled(enabled); | 557 create_account_link_->SetEnabled(enabled); |
| 556 } | 558 } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 571 | 573 |
| 572 void NewUserView::InitLink(views::Link** link) { | 574 void NewUserView::InitLink(views::Link** link) { |
| 573 *link = new views::Link(std::wstring()); | 575 *link = new views::Link(std::wstring()); |
| 574 (*link)->SetController(this); | 576 (*link)->SetController(this); |
| 575 (*link)->SetNormalColor(login::kLinkColor); | 577 (*link)->SetNormalColor(login::kLinkColor); |
| 576 (*link)->SetHighlightedColor(login::kLinkColor); | 578 (*link)->SetHighlightedColor(login::kLinkColor); |
| 577 AddChildView(*link); | 579 AddChildView(*link); |
| 578 } | 580 } |
| 579 | 581 |
| 580 } // namespace chromeos | 582 } // namespace chromeos |
| OLD | NEW |