| 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/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 8 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
| 9 #include "chrome/browser/chromeos/login/login_display_host_impl.h" | 9 #include "chrome/browser/chromeos/login/login_display_host_impl.h" |
| 10 #include "chrome/browser/chromeos/login/screen_locker.h" | 10 #include "chrome/browser/chromeos/login/screen_locker.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 webui_handler_(NULL) { | 49 webui_handler_(NULL) { |
| 50 } | 50 } |
| 51 | 51 |
| 52 void WebUILoginDisplay::ClearAndEnablePassword() { | 52 void WebUILoginDisplay::ClearAndEnablePassword() { |
| 53 if (webui_handler_) | 53 if (webui_handler_) |
| 54 webui_handler_->ClearAndEnablePassword(); | 54 webui_handler_->ClearAndEnablePassword(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void WebUILoginDisplay::Init(const UserList& users, | 57 void WebUILoginDisplay::Init(const UserList& users, |
| 58 bool show_guest, | 58 bool show_guest, |
| 59 bool show_supervised, |
| 59 bool show_users, | 60 bool show_users, |
| 60 bool show_new_user) { | 61 bool show_new_user) { |
| 61 // Testing that the delegate has been set. | 62 // Testing that the delegate has been set. |
| 62 DCHECK(delegate_); | 63 DCHECK(delegate_); |
| 63 | 64 |
| 64 users_ = users; | 65 users_ = users; |
| 65 show_guest_ = show_guest; | 66 show_guest_ = show_guest; |
| 67 show_supervised_ = show_supervised; |
| 66 show_users_ = show_users; | 68 show_users_ = show_users; |
| 67 show_new_user_ = show_new_user; | 69 show_new_user_ = show_new_user; |
| 68 | 70 |
| 69 wm::UserActivityDetector* activity_detector = ash::Shell::GetInstance()-> | 71 wm::UserActivityDetector* activity_detector = ash::Shell::GetInstance()-> |
| 70 user_activity_detector(); | 72 user_activity_detector(); |
| 71 if (!activity_detector->HasObserver(this)) | 73 if (!activity_detector->HasObserver(this)) |
| 72 activity_detector->AddObserver(this); | 74 activity_detector->AddObserver(this); |
| 73 } | 75 } |
| 74 | 76 |
| 75 void WebUILoginDisplay::OnPreferencesChanged() { | 77 void WebUILoginDisplay::OnPreferencesChanged() { |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 } | 376 } |
| 375 | 377 |
| 376 const UserList& WebUILoginDisplay::GetUsers() const { | 378 const UserList& WebUILoginDisplay::GetUsers() const { |
| 377 return users_; | 379 return users_; |
| 378 } | 380 } |
| 379 | 381 |
| 380 bool WebUILoginDisplay::IsShowGuest() const { | 382 bool WebUILoginDisplay::IsShowGuest() const { |
| 381 return show_guest_; | 383 return show_guest_; |
| 382 } | 384 } |
| 383 | 385 |
| 386 bool WebUILoginDisplay::IsShowSupervised() const { |
| 387 return show_supervised_; |
| 388 } |
| 389 |
| 384 bool WebUILoginDisplay::IsShowUsers() const { | 390 bool WebUILoginDisplay::IsShowUsers() const { |
| 385 return show_users_; | 391 return show_users_; |
| 386 } | 392 } |
| 387 | 393 |
| 388 bool WebUILoginDisplay::IsShowNewUser() const { | 394 bool WebUILoginDisplay::IsShowNewUser() const { |
| 389 return show_new_user_; | 395 return show_new_user_; |
| 390 } | 396 } |
| 391 | 397 |
| 392 bool WebUILoginDisplay::IsSigninInProgress() const { | 398 bool WebUILoginDisplay::IsSigninInProgress() const { |
| 393 return delegate_->IsSigninInProgress(); | 399 return delegate_->IsSigninInProgress(); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 base::TimeDelta::FromSeconds(kPasswordClearTimeoutSec), this, | 431 base::TimeDelta::FromSeconds(kPasswordClearTimeoutSec), this, |
| 426 &WebUILoginDisplay::OnPasswordClearTimerExpired); | 432 &WebUILoginDisplay::OnPasswordClearTimerExpired); |
| 427 } | 433 } |
| 428 | 434 |
| 429 void WebUILoginDisplay::OnPasswordClearTimerExpired() { | 435 void WebUILoginDisplay::OnPasswordClearTimerExpired() { |
| 430 if (webui_handler_) | 436 if (webui_handler_) |
| 431 webui_handler_->ClearUserPodPassword(); | 437 webui_handler_->ClearUserPodPassword(); |
| 432 } | 438 } |
| 433 | 439 |
| 434 } // namespace chromeos | 440 } // namespace chromeos |
| OLD | NEW |