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

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

Issue 2512473004: cros: Enable WebUILoginView reuse. (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 // If delegate_ is nullptr here (e.g. WebUIScreenLocker has been destroyed), 897 if (delegate_ && show_on_init_) {
898 // don't do anything, just return.
899 if (!delegate_)
900 return;
901
902 if (show_on_init_) {
903 show_on_init_ = false; 898 show_on_init_ = false;
904 ShowImpl(); 899 ShowImpl();
905 } 900 }
906 } 901 }
907 902
908 gfx::NativeWindow SigninScreenHandler::GetNativeWindow() { 903 gfx::NativeWindow SigninScreenHandler::GetNativeWindow() {
909 if (native_window_delegate_) 904 if (native_window_delegate_)
910 return native_window_delegate_->GetNativeWindow(); 905 return native_window_delegate_->GetNativeWindow();
911 return nullptr; 906 return nullptr;
912 } 907 }
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
1533 } 1528 }
1534 1529
1535 void SigninScreenHandler::OnFeedbackFinished() { 1530 void SigninScreenHandler::OnFeedbackFinished() {
1536 CallJS("login.UnrecoverableCryptohomeErrorScreen.resumeAfterFeedbackUI"); 1531 CallJS("login.UnrecoverableCryptohomeErrorScreen.resumeAfterFeedbackUI");
1537 1532
1538 // Recreate user's cryptohome after the feedback is attempted. 1533 // Recreate user's cryptohome after the feedback is attempted.
1539 HandleResyncUserData(); 1534 HandleResyncUserData();
1540 } 1535 }
1541 1536
1542 } // namespace chromeos 1537 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/ui/webui_login_view.cc ('k') | components/proximity_auth/screenlock_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698