Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(668)

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc

Issue 2555453003: cros: HTML fixes needed to reinitializing an existing lock WebUI. (Closed)
Patch Set: Address comments Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/ui/webui/chromeos/login/signin_screen_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <vector> 10 #include <vector>
(...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 // Forces a reload for Gaia screen on hiding error message. 887 // Forces a reload for Gaia screen on hiding error message.
888 if (IsGaiaVisible() || IsGaiaHiddenByError()) 888 if (IsGaiaVisible() || IsGaiaHiddenByError())
889 ReloadGaia(reason == NetworkError::ERROR_REASON_NETWORK_STATE_CHANGED); 889 ReloadGaia(reason == NetworkError::ERROR_REASON_NETWORK_STATE_CHANGED);
890 } 890 }
891 891
892 void SigninScreenHandler::ReloadGaia(bool force_reload) { 892 void SigninScreenHandler::ReloadGaia(bool force_reload) {
893 gaia_screen_handler_->ReloadGaia(force_reload); 893 gaia_screen_handler_->ReloadGaia(force_reload);
894 } 894 }
895 895
896 void SigninScreenHandler::Initialize() { 896 void SigninScreenHandler::Initialize() {
897 // Preload PIN keyboard if any of the users can authenticate via PIN.
898 if (user_manager::UserManager::IsInitialized()) {
899 for (user_manager::User* user :
900 user_manager::UserManager::Get()->GetLoggedInUsers()) {
901
902 chromeos::PinStorage* pin_storage =
903 chromeos::PinStorageFactory::GetForUser(user);
904 if (pin_storage && pin_storage->IsPinAuthenticationAvailable()) {
905 CallJS("cr.ui.Oobe.preloadPinKeyboard");
906 break;
907 }
908 }
909 }
910
911 // |delegate_| is null when we are preloading the lock screen.
897 if (delegate_ && show_on_init_) { 912 if (delegate_ && show_on_init_) {
898 show_on_init_ = false; 913 show_on_init_ = false;
899 ShowImpl(); 914 ShowImpl();
900 } 915 }
901 } 916 }
902 917
903 gfx::NativeWindow SigninScreenHandler::GetNativeWindow() { 918 gfx::NativeWindow SigninScreenHandler::GetNativeWindow() {
904 if (native_window_delegate_) 919 if (native_window_delegate_)
905 return native_window_delegate_->GetNativeWindow(); 920 return native_window_delegate_->GetNativeWindow();
906 return nullptr; 921 return nullptr;
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
1528 } 1543 }
1529 1544
1530 void SigninScreenHandler::OnFeedbackFinished() { 1545 void SigninScreenHandler::OnFeedbackFinished() {
1531 CallJS("login.UnrecoverableCryptohomeErrorScreen.resumeAfterFeedbackUI"); 1546 CallJS("login.UnrecoverableCryptohomeErrorScreen.resumeAfterFeedbackUI");
1532 1547
1533 // Recreate user's cryptohome after the feedback is attempted. 1548 // Recreate user's cryptohome after the feedback is attempted.
1534 HandleResyncUserData(); 1549 HandleResyncUserData();
1535 } 1550 }
1536 1551
1537 } // namespace chromeos 1552 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/login/lock.js ('k') | ui/login/account_picker/screen_account_picker.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698