| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/webui_login_display.h" | 5 #include "chrome/browser/chromeos/login/webui_login_display.h" |
| 6 | 6 |
| 7 #include "ash/wm/user_activity_detector.h" | 7 #include "ash/wm/user_activity_detector.h" |
| 8 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 8 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
| 9 #include "chrome/browser/chromeos/input_method/input_method_configuration.h" | 9 #include "chrome/browser/chromeos/input_method/input_method_configuration.h" |
| 10 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | 10 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 if (delegate_) | 218 if (delegate_) |
| 219 delegate_->CancelPasswordChangedFlow(); | 219 delegate_->CancelPasswordChangedFlow(); |
| 220 } | 220 } |
| 221 | 221 |
| 222 void WebUILoginDisplay::CreateAccount() { | 222 void WebUILoginDisplay::CreateAccount() { |
| 223 DCHECK(delegate_); | 223 DCHECK(delegate_); |
| 224 if (delegate_) | 224 if (delegate_) |
| 225 delegate_->CreateAccount(); | 225 delegate_->CreateAccount(); |
| 226 } | 226 } |
| 227 | 227 |
| 228 void WebUILoginDisplay::CompleteLogin(const std::string& username, | 228 void WebUILoginDisplay::CompleteLogin(const UserCredentials& credentials) { |
| 229 const std::string& password) { | |
| 230 DCHECK(delegate_); | 229 DCHECK(delegate_); |
| 231 if (delegate_) | 230 if (delegate_) |
| 232 delegate_->CompleteLogin(username, password); | 231 delegate_->CompleteLogin(credentials); |
| 233 } | 232 } |
| 234 | 233 |
| 235 void WebUILoginDisplay::Login(const std::string& username, | 234 void WebUILoginDisplay::Login(const UserCredentials& credentials) { |
| 236 const std::string& password) { | |
| 237 DCHECK(delegate_); | 235 DCHECK(delegate_); |
| 238 if (delegate_) | 236 if (delegate_) |
| 239 delegate_->Login(username, password); | 237 delegate_->Login(credentials); |
| 240 } | 238 } |
| 241 | 239 |
| 242 void WebUILoginDisplay::LoginAsRetailModeUser() { | 240 void WebUILoginDisplay::LoginAsRetailModeUser() { |
| 243 DCHECK(delegate_); | 241 DCHECK(delegate_); |
| 244 if (delegate_) | 242 if (delegate_) |
| 245 delegate_->LoginAsRetailModeUser(); | 243 delegate_->LoginAsRetailModeUser(); |
| 246 } | 244 } |
| 247 | 245 |
| 248 void WebUILoginDisplay::LoginAsGuest() { | 246 void WebUILoginDisplay::LoginAsGuest() { |
| 249 DCHECK(delegate_); | 247 DCHECK(delegate_); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 base::TimeDelta::FromSeconds(kPasswordClearTimeoutSec), this, | 357 base::TimeDelta::FromSeconds(kPasswordClearTimeoutSec), this, |
| 360 &WebUILoginDisplay::OnPasswordClearTimerExpired); | 358 &WebUILoginDisplay::OnPasswordClearTimerExpired); |
| 361 } | 359 } |
| 362 | 360 |
| 363 void WebUILoginDisplay::OnPasswordClearTimerExpired() { | 361 void WebUILoginDisplay::OnPasswordClearTimerExpired() { |
| 364 if (webui_handler_) | 362 if (webui_handler_) |
| 365 webui_handler_->ClearUserPodPassword(); | 363 webui_handler_->ClearUserPodPassword(); |
| 366 } | 364 } |
| 367 | 365 |
| 368 } // namespace chromeos | 366 } // namespace chromeos |
| OLD | NEW |