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/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" |
| 11 #include "chrome/browser/chromeos/login/user_adding_screen.h" |
11 #include "chrome/browser/chromeos/login/wallpaper_manager.h" | 12 #include "chrome/browser/chromeos/login/wallpaper_manager.h" |
12 #include "chrome/browser/chromeos/login/webui_login_view.h" | 13 #include "chrome/browser/chromeos/login/webui_login_view.h" |
13 #include "chrome/browser/profiles/profile_manager.h" | 14 #include "chrome/browser/profiles/profile_manager.h" |
14 #include "chrome/browser/ui/browser_window.h" | 15 #include "chrome/browser/ui/browser_window.h" |
15 #include "chromeos/ime/input_method_manager.h" | 16 #include "chromeos/ime/input_method_manager.h" |
16 #include "chromeos/ime/xkeyboard.h" | 17 #include "chromeos/ime/xkeyboard.h" |
17 #include "grit/chromium_strings.h" | 18 #include "grit/chromium_strings.h" |
18 #include "grit/generated_resources.h" | 19 #include "grit/generated_resources.h" |
19 #include "ui/base/l10n/l10n_util.h" | 20 #include "ui/base/l10n/l10n_util.h" |
20 #include "ui/views/widget/widget.h" | 21 #include "ui/views/widget/widget.h" |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 return parent_window(); | 214 return parent_window(); |
214 } | 215 } |
215 | 216 |
216 // WebUILoginDisplay, SigninScreenHandlerDelegate implementation: -------------- | 217 // WebUILoginDisplay, SigninScreenHandlerDelegate implementation: -------------- |
217 void WebUILoginDisplay::CancelPasswordChangedFlow() { | 218 void WebUILoginDisplay::CancelPasswordChangedFlow() { |
218 DCHECK(delegate_); | 219 DCHECK(delegate_); |
219 if (delegate_) | 220 if (delegate_) |
220 delegate_->CancelPasswordChangedFlow(); | 221 delegate_->CancelPasswordChangedFlow(); |
221 } | 222 } |
222 | 223 |
| 224 void WebUILoginDisplay::CancelUserAdding() { |
| 225 if (!UserAddingScreen::Get()->IsRunning()) { |
| 226 LOG(ERROR) << "User adding screen not running."; |
| 227 return; |
| 228 } |
| 229 UserAddingScreen::Get()->Cancel(); |
| 230 } |
| 231 |
223 void WebUILoginDisplay::CreateAccount() { | 232 void WebUILoginDisplay::CreateAccount() { |
224 DCHECK(delegate_); | 233 DCHECK(delegate_); |
225 if (delegate_) | 234 if (delegate_) |
226 delegate_->CreateAccount(); | 235 delegate_->CreateAccount(); |
227 } | 236 } |
228 | 237 |
229 void WebUILoginDisplay::CompleteLogin(const UserContext& user_context) { | 238 void WebUILoginDisplay::CompleteLogin(const UserContext& user_context) { |
230 DCHECK(delegate_); | 239 DCHECK(delegate_); |
231 if (delegate_) | 240 if (delegate_) |
232 delegate_->CompleteLogin(user_context); | 241 delegate_->CompleteLogin(user_context); |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 base::TimeDelta::FromSeconds(kPasswordClearTimeoutSec), this, | 373 base::TimeDelta::FromSeconds(kPasswordClearTimeoutSec), this, |
365 &WebUILoginDisplay::OnPasswordClearTimerExpired); | 374 &WebUILoginDisplay::OnPasswordClearTimerExpired); |
366 } | 375 } |
367 | 376 |
368 void WebUILoginDisplay::OnPasswordClearTimerExpired() { | 377 void WebUILoginDisplay::OnPasswordClearTimerExpired() { |
369 if (webui_handler_) | 378 if (webui_handler_) |
370 webui_handler_->ClearUserPodPassword(); | 379 webui_handler_->ClearUserPodPassword(); |
371 } | 380 } |
372 | 381 |
373 } // namespace chromeos | 382 } // namespace chromeos |
OLD | NEW |