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

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

Issue 2512473004: cros: Enable WebUILoginView reuse. (Closed)
Patch Set: Initial upload 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 882 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 // Forces a reload for Gaia screen on hiding error message. 893 // Forces a reload for Gaia screen on hiding error message.
894 if (IsGaiaVisible() || IsGaiaHiddenByError()) 894 if (IsGaiaVisible() || IsGaiaHiddenByError())
895 ReloadGaia(reason == NetworkError::ERROR_REASON_NETWORK_STATE_CHANGED); 895 ReloadGaia(reason == NetworkError::ERROR_REASON_NETWORK_STATE_CHANGED);
896 } 896 }
897 897
898 void SigninScreenHandler::ReloadGaia(bool force_reload) { 898 void SigninScreenHandler::ReloadGaia(bool force_reload) {
899 gaia_screen_handler_->ReloadGaia(force_reload); 899 gaia_screen_handler_->ReloadGaia(force_reload);
900 } 900 }
901 901
902 void SigninScreenHandler::Initialize() { 902 void SigninScreenHandler::Initialize() {
903 // If delegate_ is nullptr here (e.g. WebUIScreenLocker has been destroyed), 903 if (delegate_ && show_on_init_) {
904 // don't do anything, just return.
905 if (!delegate_)
906 return;
907
908 if (show_on_init_) {
909 show_on_init_ = false; 904 show_on_init_ = false;
910 ShowImpl(); 905 ShowImpl();
911 } 906 }
912 } 907 }
913 908
914 gfx::NativeWindow SigninScreenHandler::GetNativeWindow() { 909 gfx::NativeWindow SigninScreenHandler::GetNativeWindow() {
915 if (native_window_delegate_) 910 if (native_window_delegate_)
916 return native_window_delegate_->GetNativeWindow(); 911 return native_window_delegate_->GetNativeWindow();
917 return nullptr; 912 return nullptr;
918 } 913 }
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
1538 } 1533 }
1539 1534
1540 void SigninScreenHandler::OnFeedbackFinished() { 1535 void SigninScreenHandler::OnFeedbackFinished() {
1541 CallJS("login.UnrecoverableCryptohomeErrorScreen.resumeAfterFeedbackUI"); 1536 CallJS("login.UnrecoverableCryptohomeErrorScreen.resumeAfterFeedbackUI");
1542 1537
1543 // Recreate user's cryptohome after the feedback is attempted. 1538 // Recreate user's cryptohome after the feedback is attempted.
1544 HandleResyncUserData(); 1539 HandleResyncUserData();
1545 } 1540 }
1546 1541
1547 } // namespace chromeos 1542 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698