Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_INPUT_H_ | |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_INPUT_H_ | |
| 7 | |
| 8 #include "gfx/rect.h" | |
| 9 | |
| 10 namespace chromeos { | |
| 11 | |
| 12 // Interface that is used to manage the state of the user input controls. | |
| 13 class UserInput { | |
| 14 public: | |
| 15 virtual ~UserInput() {} | |
| 16 | |
| 17 // Enables/Disables the input controls. | |
| 18 virtual void EnableInputControls(bool enabled) = 0; | |
| 19 | |
| 20 // Clears and focuses the controls. | |
| 21 virtual void ClearAndFocusControls() = 0; | |
| 22 | |
| 23 // Clears and focuses the password field. | |
| 24 virtual void ClearAndFocusPassword() = 0; | |
| 25 | |
| 26 // Returns bounds of the main input field in screen coordinats (e.g. these | |
|
whywhat
2010/12/13 07:57:35
same nit about coordinats
altimofeev
2010/12/13 15:42:45
Done.
| |
| 27 // bounds could be used to choose positions for the error bubble). | |
| 28 virtual gfx::Rect GetMainInputScreenBounds() const = 0; | |
| 29 | |
| 30 // Returns whether custom bounds for the throbber should be used. If yes then | |
| 31 // |bounds| contains custom bounds that should be used. | |
| 32 virtual bool UseCustomBoundsForThrobber(const gfx::Size& throbber, | |
|
whywhat
2010/12/13 07:57:35
Could we change this method to smth like StartThro
altimofeev
2010/12/13 15:42:45
I went further and implemented class that exposes
| |
| 33 gfx::Rect* bounds) = 0; | |
| 34 }; | |
| 35 | |
| 36 } // namespace chromeos | |
| 37 | |
| 38 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_INPUT_H_ | |
| OLD | NEW |