OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_LOGIN_MANAGER_VIEW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_MANAGER_VIEW_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_MANAGER_VIEW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_MANAGER_VIEW_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 // Overridden from views::Textfield::Controller | 59 // Overridden from views::Textfield::Controller |
60 // Not thread-safe, by virtue of using SetupSession(). | 60 // Not thread-safe, by virtue of using SetupSession(). |
61 virtual bool HandleKeystroke(views::Textfield* sender, | 61 virtual bool HandleKeystroke(views::Textfield* sender, |
62 const views::Textfield::Keystroke& keystroke); | 62 const views::Textfield::Keystroke& keystroke); |
63 virtual void ContentsChanged(views::Textfield* sender, | 63 virtual void ContentsChanged(views::Textfield* sender, |
64 const string16& new_contents) {} | 64 const string16& new_contents) {} |
65 | 65 |
66 // Overriden from views::ButtonListener. | 66 // Overriden from views::ButtonListener. |
67 virtual void ButtonPressed(views::Button* sender, const views::Event& event); | 67 virtual void ButtonPressed(views::Button* sender, const views::Event& event); |
68 | 68 |
| 69 virtual bool AcceleratorPressed(const views::Accelerator& accelerator); |
| 70 |
69 // Overriden from LoginStatusConsumer. | 71 // Overriden from LoginStatusConsumer. |
70 virtual void OnLoginFailure(const std::string error); | 72 virtual void OnLoginFailure(const std::string error); |
71 virtual void OnLoginSuccess(const std::string username, | 73 virtual void OnLoginSuccess(const std::string username, |
72 std::vector<std::string> cookies); | 74 std::vector<std::string> cookies); |
73 | 75 |
74 protected: | 76 protected: |
75 // views::View overrides: | 77 // views::View overrides: |
76 virtual void ViewHierarchyChanged(bool is_add, views::View *parent, | 78 virtual void ViewHierarchyChanged(bool is_add, views::View *parent, |
77 views::View *child); | 79 views::View *child); |
78 | 80 |
(...skipping 21 matching lines...) Expand all Loading... |
100 views::Textfield* username_field_; | 102 views::Textfield* username_field_; |
101 views::Textfield* password_field_; | 103 views::Textfield* password_field_; |
102 views::Label* os_version_label_; | 104 views::Label* os_version_label_; |
103 views::Label* title_label_; | 105 views::Label* title_label_; |
104 views::Label* username_label_; | 106 views::Label* username_label_; |
105 views::Label* password_label_; | 107 views::Label* password_label_; |
106 views::Label* error_label_; | 108 views::Label* error_label_; |
107 views::NativeButton* sign_in_button_; | 109 views::NativeButton* sign_in_button_; |
108 views::NativeButton* create_account_button_; | 110 views::NativeButton* create_account_button_; |
109 | 111 |
| 112 views::Accelerator accel_focus_user_; |
| 113 views::Accelerator accel_focus_pass_; |
| 114 |
110 // Handles asynchronously loading the version. | 115 // Handles asynchronously loading the version. |
111 VersionLoader loader_; | 116 VersionLoader loader_; |
112 | 117 |
113 // Used to request the version. | 118 // Used to request the version. |
114 CancelableRequestConsumer consumer_; | 119 CancelableRequestConsumer consumer_; |
115 | 120 |
116 // Notifications receiver. | 121 // Notifications receiver. |
117 ScreenObserver* observer_; | 122 ScreenObserver* observer_; |
118 | 123 |
119 // String ID for the current error message. | 124 // String ID for the current error message. |
120 // Set to -1 if no messages is shown. | 125 // Set to -1 if no messages is shown. |
121 int error_id_; | 126 int error_id_; |
122 | 127 |
123 ScopedRunnableMethodFactory<LoginManagerView> focus_grabber_factory_; | 128 ScopedRunnableMethodFactory<LoginManagerView> focus_grabber_factory_; |
124 | 129 |
125 // Indicates that this view was created when focus manager was unavailable | 130 // Indicates that this view was created when focus manager was unavailable |
126 // (on the hidden tab, for example). | 131 // (on the hidden tab, for example). |
127 bool focus_delayed_; | 132 bool focus_delayed_; |
128 | 133 |
129 scoped_ptr<Authenticator> authenticator_; | 134 scoped_ptr<Authenticator> authenticator_; |
130 | 135 |
131 DISALLOW_COPY_AND_ASSIGN(LoginManagerView); | 136 DISALLOW_COPY_AND_ASSIGN(LoginManagerView); |
132 }; | 137 }; |
133 | 138 |
134 } // namespace chromeos | 139 } // namespace chromeos |
135 | 140 |
136 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_MANAGER_VIEW_H_ | 141 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_MANAGER_VIEW_H_ |
OLD | NEW |