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 "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 7 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
8 #include "chrome/browser/chromeos/login/lock/screen_locker.h" | 8 #include "chrome/browser/chromeos/login/lock/screen_locker.h" |
9 #include "chrome/browser/chromeos/login/screens/chrome_user_selection_screen.h" | 9 #include "chrome/browser/chromeos/login/screens/chrome_user_selection_screen.h" |
10 #include "chrome/browser/chromeos/login/signin_screen_controller.h" | 10 #include "chrome/browser/chromeos/login/signin_screen_controller.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 webui_handler_->OnPreferencesChanged(); | 89 webui_handler_->OnPreferencesChanged(); |
90 } | 90 } |
91 | 91 |
92 void WebUILoginDisplay::SetUIEnabled(bool is_enabled) { | 92 void WebUILoginDisplay::SetUIEnabled(bool is_enabled) { |
93 // TODO(nkostylev): Cleanup this condition, | 93 // TODO(nkostylev): Cleanup this condition, |
94 // see http://crbug.com/157885 and http://crbug.com/158255. | 94 // see http://crbug.com/157885 and http://crbug.com/158255. |
95 // Allow this call only before user sign in or at lock screen. | 95 // Allow this call only before user sign in or at lock screen. |
96 // If this call is made after new user signs in but login screen is still | 96 // If this call is made after new user signs in but login screen is still |
97 // around that would trigger a sign in extension refresh. | 97 // around that would trigger a sign in extension refresh. |
98 if (is_enabled && (!user_manager::UserManager::Get()->IsUserLoggedIn() || | 98 if (is_enabled && (!user_manager::UserManager::Get()->IsUserLoggedIn() || |
99 ScreenLocker::default_screen_locker()) && | 99 ScreenLocker::default_screen_locker())) { |
100 !StartupUtils::IsWebviewSigninEnabled()) { | |
101 ClearAndEnablePassword(); | 100 ClearAndEnablePassword(); |
102 } | 101 } |
103 | 102 |
104 if (chromeos::LoginDisplayHost* host = | 103 if (chromeos::LoginDisplayHost* host = |
105 chromeos::LoginDisplayHostImpl::default_host()) { | 104 chromeos::LoginDisplayHostImpl::default_host()) { |
106 if (chromeos::WebUILoginView* login_view = host->GetWebUILoginView()) | 105 if (chromeos::WebUILoginView* login_view = host->GetWebUILoginView()) |
107 login_view->SetUIEnabled(is_enabled); | 106 login_view->SetUIEnabled(is_enabled); |
108 } | 107 } |
109 } | 108 } |
110 | 109 |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 delegate_->Signout(); | 325 delegate_->Signout(); |
327 } | 326 } |
328 | 327 |
329 void WebUILoginDisplay::OnUserActivity(const ui::Event* event) { | 328 void WebUILoginDisplay::OnUserActivity(const ui::Event* event) { |
330 if (delegate_) | 329 if (delegate_) |
331 delegate_->ResetPublicSessionAutoLoginTimer(); | 330 delegate_->ResetPublicSessionAutoLoginTimer(); |
332 } | 331 } |
333 | 332 |
334 | 333 |
335 } // namespace chromeos | 334 } // namespace chromeos |
OLD | NEW |