| OLD | NEW |
| 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 #include "chrome/browser/chromeos/login/user_controller.h" | 5 #include "chrome/browser/chromeos/login/user_controller.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 } | 207 } |
| 208 | 208 |
| 209 void UserController::ButtonPressed(views::Button* sender, | 209 void UserController::ButtonPressed(views::Button* sender, |
| 210 const views::Event& event) { | 210 const views::Event& event) { |
| 211 Login(); | 211 Login(); |
| 212 } | 212 } |
| 213 | 213 |
| 214 bool UserController::HandleKeystroke( | 214 bool UserController::HandleKeystroke( |
| 215 views::Textfield* sender, | 215 views::Textfield* sender, |
| 216 const views::Textfield::Keystroke& keystroke) { | 216 const views::Textfield::Keystroke& keystroke) { |
| 217 if (keystroke.GetKeyboardCode() == base::VKEY_RETURN) { | 217 if (keystroke.GetKeyboardCode() == app::VKEY_RETURN) { |
| 218 Login(); | 218 Login(); |
| 219 return true; | 219 return true; |
| 220 } else if (keystroke.GetKeyboardCode() == base::VKEY_LEFT) { | 220 } else if (keystroke.GetKeyboardCode() == app::VKEY_LEFT) { |
| 221 SelectUser(user_index() - 1); | 221 SelectUser(user_index() - 1); |
| 222 return true; | 222 return true; |
| 223 } else if (keystroke.GetKeyboardCode() == base::VKEY_RIGHT) { | 223 } else if (keystroke.GetKeyboardCode() == app::VKEY_RIGHT) { |
| 224 SelectUser(user_index() + 1); | 224 SelectUser(user_index() + 1); |
| 225 return true; | 225 return true; |
| 226 } | 226 } |
| 227 delegate_->ClearErrors(); | 227 delegate_->ClearErrors(); |
| 228 return false; | 228 return false; |
| 229 } | 229 } |
| 230 | 230 |
| 231 void UserController::Observe( | 231 void UserController::Observe( |
| 232 NotificationType type, | 232 NotificationType type, |
| 233 const NotificationSource& source, | 233 const NotificationSource& source, |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 | 444 |
| 445 void UserController::SelectUser(int index) { | 445 void UserController::SelectUser(int index) { |
| 446 delegate_->SelectUser(index); | 446 delegate_->SelectUser(index); |
| 447 } | 447 } |
| 448 | 448 |
| 449 void UserController::FocusPasswordField() { | 449 void UserController::FocusPasswordField() { |
| 450 existing_user_view_->password_field()->RequestFocus(); | 450 existing_user_view_->password_field()->RequestFocus(); |
| 451 } | 451 } |
| 452 | 452 |
| 453 } // namespace chromeos | 453 } // namespace chromeos |
| OLD | NEW |