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

Side by Side Diff: chrome/browser/chromeos/login/existing_user_view.h

Issue 6628037: views: Moves TextfieldController/TextRange into their own headers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 9 years, 9 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_VIEW_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_VIEW_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_VIEW_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/chromeos/login/helper.h" 9 #include "chrome/browser/chromeos/login/helper.h"
10 #include "chrome/browser/chromeos/login/user_input.h" 10 #include "chrome/browser/chromeos/login/user_input.h"
11 #include "views/accelerator.h" 11 #include "views/accelerator.h"
12 #include "views/controls/button/native_button.h" 12 #include "views/controls/button/native_button.h"
13 #include "views/controls/textfield/textfield.h" 13 #include "views/controls/textfield/textfield_controller.h"
14 #include "views/view.h" 14 #include "views/view.h"
15 15
16 namespace chromeos { 16 namespace chromeos {
17 17
18 class UserController; 18 class UserController;
19 19
20 class ExistingUserView : public ThrobberHostView, 20 class ExistingUserView : public ThrobberHostView,
21 public UserInput, 21 public UserInput,
22 public views::Textfield::Controller { 22 public views::TextfieldController {
23 public: 23 public:
24 explicit ExistingUserView(UserController* user_controller); 24 explicit ExistingUserView(UserController* user_controller);
25 25
26 void RecreateFields(); 26 void RecreateFields();
27 27
28 void FocusPasswordField(); 28 void FocusPasswordField();
29 29
30 // Overridden from views::View: 30 // views::View:
31 virtual bool AcceleratorPressed(const views::Accelerator& accelerator); 31 virtual bool AcceleratorPressed(const views::Accelerator& accelerator);
32 // Overriden from Textfield::Controller: 32
33 // views::TextfieldController:
33 virtual void ContentsChanged(views::Textfield* sender, 34 virtual void ContentsChanged(views::Textfield* sender,
34 const string16& new_contents); 35 const string16& new_contents);
35 virtual bool HandleKeyEvent(views::Textfield* sender, 36 virtual bool HandleKeyEvent(views::Textfield* sender,
36 const views::KeyEvent& keystroke); 37 const views::KeyEvent& keystroke);
37 virtual void RequestFocus(); 38 virtual void RequestFocus();
38 39
39 // Overriden from UserInput: 40 // UserInput:
40 virtual void EnableInputControls(bool enabled); 41 virtual void EnableInputControls(bool enabled);
41 virtual void ClearAndFocusControls(); 42 virtual void ClearAndFocusControls();
42 virtual void ClearAndFocusPassword(); 43 virtual void ClearAndFocusPassword();
43 virtual gfx::Rect GetMainInputScreenBounds() const; 44 virtual gfx::Rect GetMainInputScreenBounds() const;
44 45
45 protected: 46 protected:
46 // Overridden from views::View: 47 // views::View:
47 virtual void OnLocaleChanged(); 48 virtual void OnLocaleChanged();
48 49
49 private: 50 private:
50 UserController* user_controller_; 51 UserController* user_controller_;
51 52
52 // For editing the password. 53 // For editing the password.
53 views::Textfield* password_field_; 54 views::Textfield* password_field_;
54 55
55 views::Accelerator accel_login_off_the_record_; 56 views::Accelerator accel_login_off_the_record_;
56 views::Accelerator accel_toggle_accessibility_; 57 views::Accelerator accel_toggle_accessibility_;
57 58
58 DISALLOW_COPY_AND_ASSIGN(ExistingUserView); 59 DISALLOW_COPY_AND_ASSIGN(ExistingUserView);
59 }; 60 };
60 61
61 } // chromeos 62 } // chromeos
62 63
63 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_VIEW_H_ 64 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/captcha_view.cc ('k') | chrome/browser/chromeos/login/existing_user_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698