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

Unified Diff: chrome/browser/chromeos/login/new_user_view.h

Issue 5709001: Place the spinner in the right corner of the controls window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/browser/chromeos/login
Patch Set: Merged with trunk. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/new_user_view.h
diff --git a/chrome/browser/chromeos/login/new_user_view.h b/chrome/browser/chromeos/login/new_user_view.h
index bfeed4e4b680432f6077a44d2019113d976edde5..aaea90319c6361fd213626dbb9ba4fea920a97c4 100644
--- a/chrome/browser/chromeos/login/new_user_view.h
+++ b/chrome/browser/chromeos/login/new_user_view.h
@@ -10,6 +10,7 @@
#include "base/task.h"
#include "chrome/browser/chromeos/login/language_switch_menu.h"
+#include "chrome/browser/chromeos/login/user_input.h"
#include "views/accelerator.h"
#include "views/controls/button/button.h"
#include "views/controls/button/menu_button.h"
@@ -27,7 +28,8 @@ namespace chromeos {
// View that is used for new user login. It asks for username and password,
// allows to specify language preferences or initiate new account creation.
-class NewUserView : public views::View,
+class NewUserView : public UserInput,
+ public views::View,
public views::Textfield::Controller,
public views::LinkController,
public views::ButtonListener {
@@ -73,18 +75,6 @@ class NewUserView : public views::View,
// Update strings from the resources. Executed on language change.
void UpdateLocalizedStrings();
- // Resets password text and sets the enabled state of the password.
- void ClearAndEnablePassword();
-
- // 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();
-
// Returns bounds of password field in screen coordinates.
gfx::Rect GetPasswordBounds() const;
@@ -118,6 +108,18 @@ class NewUserView : public views::View,
virtual bool AcceleratorPressed(const views::Accelerator& accelerator);
+ // Implements UserInput:
+ virtual void EnableInputControls(bool enabled);
+
whywhat 2010/12/09 16:20:18 Blank lines here are not needed.
altimofeev 2010/12/10 16:37:40 Done.
+ virtual void ClearAndFocusControls();
+
+ virtual void ClearAndFocusPassword();
+
+ virtual gfx::Rect GetControlWithErrorBounds() const;
+
+ virtual bool UseCustomBoundsForThrobber(const gfx::Size& throbber,
+ gfx::Rect* bounds) const;
+
protected:
// views::View overrides:
virtual void ViewHierarchyChanged(bool is_add,
@@ -130,8 +132,6 @@ class NewUserView : public views::View,
void AddChildView(View* view);
private:
- // Enables/disables input controls (textfields, buttons).
- void EnableInputControls(bool enabled);
void FocusFirstField();
// Creates Link control and adds it as a child.
@@ -165,7 +165,6 @@ class NewUserView : public views::View,
views::Link* create_account_link_;
views::Link* guest_link_;
views::MenuButton* languages_menubutton_;
- views::Throbber* throbber_;
views::Accelerator accel_focus_pass_;
views::Accelerator accel_focus_user_;
@@ -200,6 +199,12 @@ class NewUserView : public views::View,
int languages_menubutton_order_;
int sign_in_button_order_;
+ // Throbber's center y-position.
+ int throbber_center_y_;
+
+ // Throbber right position.
+ int throbber_right_;
+
FRIEND_TEST_ALL_PREFIXES(LoginScreenTest, IncognitoLogin);
friend class LoginScreenTest;

Powered by Google App Engine
This is Rietveld 408576698