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" |
| 11 #include "chrome/browser/chromeos/login/login_display_host_impl.h" |
11 #include "chrome/browser/chromeos/login/screen_locker.h" | 12 #include "chrome/browser/chromeos/login/screen_locker.h" |
12 #include "chrome/browser/chromeos/login/wallpaper_manager.h" | 13 #include "chrome/browser/chromeos/login/wallpaper_manager.h" |
13 #include "chrome/browser/chromeos/login/webui_login_display_host.h" | |
14 #include "chrome/browser/chromeos/login/webui_login_view.h" | 14 #include "chrome/browser/chromeos/login/webui_login_view.h" |
15 #include "chrome/browser/profiles/profile_manager.h" | 15 #include "chrome/browser/profiles/profile_manager.h" |
16 #include "chrome/browser/ui/browser_window.h" | 16 #include "chrome/browser/ui/browser_window.h" |
17 #include "chromeos/ime/xkeyboard.h" | 17 #include "chromeos/ime/xkeyboard.h" |
18 #include "grit/chromium_strings.h" | 18 #include "grit/chromium_strings.h" |
19 #include "grit/generated_resources.h" | 19 #include "grit/generated_resources.h" |
20 #include "ui/base/l10n/l10n_util.h" | 20 #include "ui/base/l10n/l10n_util.h" |
21 #include "ui/views/widget/widget.h" | 21 #include "ui/views/widget/widget.h" |
22 | 22 |
23 namespace chromeos { | 23 namespace chromeos { |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 // see http://crbug.com/157885 and http://crbug.com/158255. | 103 // see http://crbug.com/157885 and http://crbug.com/158255. |
104 // Allow this call only before user sign in or at lock screen. | 104 // Allow this call only before user sign in or at lock screen. |
105 // If this call is made after new user signs in but login screen is still | 105 // If this call is made after new user signs in but login screen is still |
106 // around that would trigger a sign in extension refresh. | 106 // around that would trigger a sign in extension refresh. |
107 if (webui_handler_ && is_enabled && | 107 if (webui_handler_ && is_enabled && |
108 (!UserManager::Get()->IsUserLoggedIn() || | 108 (!UserManager::Get()->IsUserLoggedIn() || |
109 ScreenLocker::default_screen_locker())) { | 109 ScreenLocker::default_screen_locker())) { |
110 webui_handler_->ClearAndEnablePassword(); | 110 webui_handler_->ClearAndEnablePassword(); |
111 } | 111 } |
112 | 112 |
113 if (chromeos::WebUILoginDisplayHost::default_host()) { | 113 if (chromeos::LoginDisplayHostImpl::default_host()) { |
114 chromeos::WebUILoginDisplayHost* webui_host = | 114 chromeos::LoginDisplayHost* host = |
115 static_cast<chromeos::WebUILoginDisplayHost*>( | 115 chromeos::LoginDisplayHostImpl::default_host(); |
116 chromeos::WebUILoginDisplayHost::default_host()); | 116 chromeos::WebUILoginView* login_view = host->GetWebUILoginView(); |
117 chromeos::WebUILoginView* login_view = webui_host->login_view(); | |
118 if (login_view) | 117 if (login_view) |
119 login_view->SetUIEnabled(is_enabled); | 118 login_view->SetUIEnabled(is_enabled); |
120 } | 119 } |
121 } | 120 } |
122 | 121 |
123 void WebUILoginDisplay::SelectPod(int index) { | 122 void WebUILoginDisplay::SelectPod(int index) { |
124 } | 123 } |
125 | 124 |
126 void WebUILoginDisplay::ShowError(int error_msg_id, | 125 void WebUILoginDisplay::ShowError(int error_msg_id, |
127 int login_attempts, | 126 int login_attempts, |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 base::TimeDelta::FromSeconds(kPasswordClearTimeoutSec), this, | 354 base::TimeDelta::FromSeconds(kPasswordClearTimeoutSec), this, |
356 &WebUILoginDisplay::OnPasswordClearTimerExpired); | 355 &WebUILoginDisplay::OnPasswordClearTimerExpired); |
357 } | 356 } |
358 | 357 |
359 void WebUILoginDisplay::OnPasswordClearTimerExpired() { | 358 void WebUILoginDisplay::OnPasswordClearTimerExpired() { |
360 if (webui_handler_) | 359 if (webui_handler_) |
361 webui_handler_->ClearUserPodPassword(); | 360 webui_handler_->ClearUserPodPassword(); |
362 } | 361 } |
363 | 362 |
364 } // namespace chromeos | 363 } // namespace chromeos |
OLD | NEW |