summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordilmah@chromium.org <dilmah@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-22 16:30:02 +0000
committerdilmah@chromium.org <dilmah@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-22 16:30:02 +0000
commit51587f3778268cd0d04ddbcd75a3631cac4c2037 (patch)
tree01b25045a321a5e4a2d1b77610a19951cd2ddeb1
parent14ccb404d224ce949bf34feae049a2967da56eb4 (diff)
downloadchromium_src-51587f3778268cd0d04ddbcd75a3631cac4c2037.zip
chromium_src-51587f3778268cd0d04ddbcd75a3631cac4c2037.tar.gz
chromium_src-51587f3778268cd0d04ddbcd75a3631cac4c2037.tar.bz2
Disable status area buttons during logging in.
It is second commit for this issue, first being r65665. First commit resolved the issue only on existing user pod. This commit resolves it for new user pod. BUG=chromium-os:8834 TEST=Manual Review URL: http://codereview.chromium.org/5170003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66959 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chromeos/login/login_screen.h1
-rw-r--r--chrome/browser/chromeos/login/new_user_view.cc11
-rw-r--r--chrome/browser/chromeos/login/new_user_view.h6
-rw-r--r--chrome/browser/chromeos/login/user_controller.h3
4 files changed, 18 insertions, 3 deletions
diff --git a/chrome/browser/chromeos/login/login_screen.h b/chrome/browser/chromeos/login/login_screen.h
index f339508..7c64dc3 100644
--- a/chrome/browser/chromeos/login/login_screen.h
+++ b/chrome/browser/chromeos/login/login_screen.h
@@ -41,6 +41,7 @@ class LoginScreen : public ViewScreen<NewUserView>,
virtual void AddStartUrl(const GURL& start_url) { start_url_ = start_url; }
virtual void ClearErrors();
virtual void NavigateAway() {}
+ virtual void SetStatusAreaEnabled(bool enable) {}
// Overridden from LoginStatusConsumer.
virtual void OnLoginFailure(const LoginFailure& error);
diff --git a/chrome/browser/chromeos/login/new_user_view.cc b/chrome/browser/chromeos/login/new_user_view.cc
index a20ea7f..5bdf8ad 100644
--- a/chrome/browser/chromeos/login/new_user_view.cc
+++ b/chrome/browser/chromeos/login/new_user_view.cc
@@ -450,7 +450,7 @@ void NewUserView::Login() {
if (login_in_process_ || username_field_->text().empty())
return;
- throbber_->Start();
+ StartThrobber();
login_in_process_ = true;
EnableInputControls(false);
std::string username = UTF16ToUTF8(username_field_->text());
@@ -485,7 +485,7 @@ void NewUserView::ClearAndEnablePassword() {
EnableInputControls(true);
SetPassword(std::string());
password_field_->RequestFocus();
- throbber_->Stop();
+ StopThrobber();
}
void NewUserView::ClearAndEnableFields() {
@@ -494,7 +494,7 @@ void NewUserView::ClearAndEnableFields() {
SetUsername(std::string());
SetPassword(std::string());
username_field_->RequestFocus();
- throbber_->Stop();
+ StopThrobber();
}
gfx::Rect NewUserView::GetPasswordBounds() const {
@@ -505,6 +505,10 @@ gfx::Rect NewUserView::GetUsernameBounds() const {
return username_field_->GetScreenBounds();
}
+void NewUserView::StartThrobber() {
+ throbber_->Start();
+}
+
void NewUserView::StopThrobber() {
throbber_->Stop();
}
@@ -547,6 +551,7 @@ void NewUserView::EnableInputControls(bool enabled) {
if (need_guest_link_) {
guest_link_->SetEnabled(enabled);
}
+ delegate_->SetStatusAreaEnabled(enabled);
}
void NewUserView::InitLink(views::Link** link) {
diff --git a/chrome/browser/chromeos/login/new_user_view.h b/chrome/browser/chromeos/login/new_user_view.h
index 7b40461..bfeed4e 100644
--- a/chrome/browser/chromeos/login/new_user_view.h
+++ b/chrome/browser/chromeos/login/new_user_view.h
@@ -55,6 +55,9 @@ class NewUserView : public views::View,
// User tries to navigate away from NewUserView pod.
virtual void NavigateAway() = 0;
+
+ // Enables/disables raw of controls at status area.
+ virtual void SetStatusAreaEnabled(bool enable) = 0;
};
// If |need_border| is true, RoundedRect border and background are required.
@@ -76,6 +79,9 @@ class NewUserView : public views::View,
// Resets password and username text and focuses on username.
void ClearAndEnableFields();
+ // Starts throbber shown during login.
+ void StartThrobber();
+
// Stops throbber shown during login.
void StopThrobber();
diff --git a/chrome/browser/chromeos/login/user_controller.h b/chrome/browser/chromeos/login/user_controller.h
index 6d3ec2c..62608e6 100644
--- a/chrome/browser/chromeos/login/user_controller.h
+++ b/chrome/browser/chromeos/login/user_controller.h
@@ -129,6 +129,9 @@ class UserController : public views::ButtonListener,
}
virtual void ClearErrors();
virtual void NavigateAway();
+ virtual void SetStatusAreaEnabled(bool enable) {
+ delegate_->SetStatusAreaEnabled(enable);
+ }
// UserView::Delegate implementation:
virtual void OnRemoveUser();