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

Side by Side Diff: chrome/browser/chromeos/login/existing_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: cpplist + remove debug 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 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 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"
10 #include "chrome/browser/chromeos/login/user_input.h"
9 #include "views/accelerator.h" 11 #include "views/accelerator.h"
10 #include "views/controls/button/native_button.h" 12 #include "views/controls/button/native_button.h"
11 #include "views/controls/textfield/textfield.h" 13 #include "views/controls/textfield/textfield.h"
12 #include "views/view.h" 14 #include "views/view.h"
13 15
14 namespace chromeos { 16 namespace chromeos {
15 17
16 class UserController; 18 class UserController;
17 19
18 class ExistingUserView : public views::View { 20 class ExistingUserView : public ThrobberHost,
21 public UserInput,
22 public views::Textfield::Controller,
23 public views::View {
19 public: 24 public:
20 explicit ExistingUserView(UserController* uc); 25 explicit ExistingUserView(UserController* user_controller);
21 26
22 void RecreateFields(); 27 void RecreateFields();
23 28
24 views::Textfield* password_field() { return password_field_; }
25
26 void FocusPasswordField(); 29 void FocusPasswordField();
27 30
28 // Overridden from views::View: 31 // Overridden from views::View:
29 virtual bool AcceleratorPressed(const views::Accelerator& accelerator); 32 virtual bool AcceleratorPressed(const views::Accelerator& accelerator);
30 33
34 // Overriden from Textfield::Controller:
35 virtual void ContentsChanged(views::Textfield* sender,
36 const string16& new_contents);
37 virtual bool HandleKeystroke(views::Textfield* sender,
38 const views::Textfield::Keystroke& keystroke);
39
40 // Overriden from UserInput:
41 virtual void EnableInputControls(bool enabled);
42 virtual void ClearAndFocusControls();
43 virtual void ClearAndFocusPassword();
44 virtual gfx::Rect GetMainInputScreenBounds() const;
45
31 protected: 46 protected:
32 // Overridden from views::View: 47 // Overridden from views::View:
33 virtual void OnLocaleChanged(); 48 virtual void OnLocaleChanged();
34 virtual void ViewHierarchyChanged(bool is_add, 49 virtual void ViewHierarchyChanged(bool is_add,
35 views::View* parent, 50 views::View* parent,
36 views::View* child); 51 views::View* child);
37 52
38 views::Accelerator accel_login_off_the_record_; 53 private:
54 UserController* user_controller_;
39 55
40 // For editing the password. 56 // For editing the password.
41 views::Textfield* password_field_; 57 views::Textfield* password_field_;
42 58
43 UserController* user_controller_; 59 views::Accelerator accel_login_off_the_record_;
44
45 private:
46 views::Accelerator accel_enable_accessibility_; 60 views::Accelerator accel_enable_accessibility_;
47 61
48 DISALLOW_COPY_AND_ASSIGN(ExistingUserView); 62 DISALLOW_COPY_AND_ASSIGN(ExistingUserView);
49 }; 63 };
50 64
51 } // chromeos 65 } // chromeos
52 66
53 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_VIEW_H_ 67 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698