OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ui/webui_login_display.h" | 5 #include "chrome/browser/chromeos/login/ui/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/lock/screen_locker.h" | 9 #include "chrome/browser/chromeos/login/lock/screen_locker.h" |
10 #include "chrome/browser/chromeos/login/screens/chrome_user_selection_screen.h" | 10 #include "chrome/browser/chromeos/login/screens/chrome_user_selection_screen.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 if (webui_handler_) | 115 if (webui_handler_) |
116 webui_handler_->OnPreferencesChanged(); | 116 webui_handler_->OnPreferencesChanged(); |
117 } | 117 } |
118 | 118 |
119 void WebUILoginDisplay::SetUIEnabled(bool is_enabled) { | 119 void WebUILoginDisplay::SetUIEnabled(bool is_enabled) { |
120 // TODO(nkostylev): Cleanup this condition, | 120 // TODO(nkostylev): Cleanup this condition, |
121 // see http://crbug.com/157885 and http://crbug.com/158255. | 121 // see http://crbug.com/157885 and http://crbug.com/158255. |
122 // Allow this call only before user sign in or at lock screen. | 122 // Allow this call only before user sign in or at lock screen. |
123 // If this call is made after new user signs in but login screen is still | 123 // If this call is made after new user signs in but login screen is still |
124 // around that would trigger a sign in extension refresh. | 124 // around that would trigger a sign in extension refresh. |
125 if (is_enabled && (!UserManager::Get()->IsUserLoggedIn() || | 125 if (is_enabled && (!user_manager::UserManager::Get()->IsUserLoggedIn() || |
126 ScreenLocker::default_screen_locker())) { | 126 ScreenLocker::default_screen_locker())) { |
127 ClearAndEnablePassword(); | 127 ClearAndEnablePassword(); |
128 } | 128 } |
129 | 129 |
130 if (chromeos::LoginDisplayHost* host = | 130 if (chromeos::LoginDisplayHost* host = |
131 chromeos::LoginDisplayHostImpl::default_host()) { | 131 chromeos::LoginDisplayHostImpl::default_host()) { |
132 if (chromeos::WebUILoginView* login_view = host->GetWebUILoginView()) | 132 if (chromeos::WebUILoginView* login_view = host->GetWebUILoginView()) |
133 login_view->SetUIEnabled(is_enabled); | 133 login_view->SetUIEnabled(is_enabled); |
134 } | 134 } |
135 } | 135 } |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 WallpaperManager::Get()->SetDefaultWallpaperDelayed( | 270 WallpaperManager::Get()->SetDefaultWallpaperDelayed( |
271 chromeos::login::kSignInUser); | 271 chromeos::login::kSignInUser); |
272 } | 272 } |
273 | 273 |
274 void WebUILoginDisplay::OnSigninScreenReady() { | 274 void WebUILoginDisplay::OnSigninScreenReady() { |
275 if (delegate_) | 275 if (delegate_) |
276 delegate_->OnSigninScreenReady(); | 276 delegate_->OnSigninScreenReady(); |
277 } | 277 } |
278 | 278 |
279 void WebUILoginDisplay::RemoveUser(const std::string& username) { | 279 void WebUILoginDisplay::RemoveUser(const std::string& username) { |
280 UserManager::Get()->RemoveUser(username, this); | 280 user_manager::UserManager::Get()->RemoveUser(username, this); |
281 } | 281 } |
282 | 282 |
283 void WebUILoginDisplay::ResyncUserData() { | 283 void WebUILoginDisplay::ResyncUserData() { |
284 DCHECK(delegate_); | 284 DCHECK(delegate_); |
285 if (delegate_) | 285 if (delegate_) |
286 delegate_->ResyncUserData(); | 286 delegate_->ResyncUserData(); |
287 } | 287 } |
288 | 288 |
289 void WebUILoginDisplay::ShowEnterpriseEnrollmentScreen() { | 289 void WebUILoginDisplay::ShowEnterpriseEnrollmentScreen() { |
290 if (delegate_) | 290 if (delegate_) |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 delegate_->Signout(); | 345 delegate_->Signout(); |
346 } | 346 } |
347 | 347 |
348 void WebUILoginDisplay::OnUserActivity(const ui::Event* event) { | 348 void WebUILoginDisplay::OnUserActivity(const ui::Event* event) { |
349 if (delegate_) | 349 if (delegate_) |
350 delegate_->ResetPublicSessionAutoLoginTimer(); | 350 delegate_->ResetPublicSessionAutoLoginTimer(); |
351 } | 351 } |
352 | 352 |
353 | 353 |
354 } // namespace chromeos | 354 } // namespace chromeos |
OLD | NEW |