121d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen// Copyright (c) 2010 The Chromium Authors. All rights reserved. 221d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen// Use of this source code is governed by a BSD-style license that can be 321d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen// found in the LICENSE file. 421d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen 521d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_INPUT_H_ 621d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen#define CHROME_BROWSER_CHROMEOS_LOGIN_USER_INPUT_H_ 721d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen 872a454cd3513ac24fbdd0e0cb9ad70b86a99b801Kristian Monsen#include "ui/gfx/rect.h" 921d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen 1021d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsennamespace chromeos { 1121d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen 1221d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen// Interface that is used to manage the state of the user input controls. 1321d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsenclass UserInput { 1421d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen public: 1521d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen virtual ~UserInput() {} 1621d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen 1721d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen // Enables/Disables the input controls. 1821d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen virtual void EnableInputControls(bool enabled) = 0; 1921d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen 2021d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen // Clears and focuses the controls. 2121d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen virtual void ClearAndFocusControls() = 0; 2221d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen 2321d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen // Clears and focuses the password field. 2421d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen virtual void ClearAndFocusPassword() = 0; 2521d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen 2621d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen // Returns bounds of the main input field in the screen coordinates (e.g. 2721d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen // these bounds could be used to choose positions for the error bubble). 2821d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen virtual gfx::Rect GetMainInputScreenBounds() const = 0; 2921d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen}; 3021d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen 3121d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen} // namespace chromeos 3221d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen 3321d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen#endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_INPUT_H_ 34