Commit df5e0b81 authored by Sarah Hu's avatar Sarah Hu Committed by Commit Bot

Add some special screens in views login screen part 2

Add the following screens:
1. ShowErrorScreen
2. ShowSigninUI

Bug: 828058
Change-Id: Id632fd49b4e1575ad5443b5f315067bdbe08efd9
Reviewed-on: https://chromium-review.googlesource.com/1098457Reviewed-by: default avatarJacob Dufault <jdufault@chromium.org>
Commit-Queue: Xiaoyin Hu <xiaoyinh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567011}
parent 24b51059
...@@ -78,6 +78,18 @@ void LoginDisplayHostMojo::ShowUnrecoverableCrypthomeErrorDialog() { ...@@ -78,6 +78,18 @@ void LoginDisplayHostMojo::ShowUnrecoverableCrypthomeErrorDialog() {
dialog_->Show(false /*closable_by_esc*/); dialog_->Show(false /*closable_by_esc*/);
} }
void LoginDisplayHostMojo::ShowErrorScreen(LoginDisplay::SigninError error_id) {
DCHECK(GetOobeUI());
GetOobeUI()->signin_screen_handler()->ShowErrorScreen(error_id);
dialog_->Show(false /*closable_by_esc*/);
}
void LoginDisplayHostMojo::ShowSigninUI(const std::string& email) {
DCHECK(GetOobeUI());
GetOobeUI()->signin_screen_handler()->ShowSigninUI(email);
dialog_->Show(true /*closable_by_esc*/);
}
LoginDisplay* LoginDisplayHostMojo::CreateLoginDisplay( LoginDisplay* LoginDisplayHostMojo::CreateLoginDisplay(
LoginDisplay::Delegate* delegate) { LoginDisplay::Delegate* delegate) {
user_selection_screen_->SetLoginDisplayDelegate(delegate); user_selection_screen_->SetLoginDisplayDelegate(delegate);
......
...@@ -49,6 +49,12 @@ class LoginDisplayHostMojo : public LoginDisplayHostCommon, ...@@ -49,6 +49,12 @@ class LoginDisplayHostMojo : public LoginDisplayHostCommon,
// Show unrecoverable cryptohome error dialog. // Show unrecoverable cryptohome error dialog.
void ShowUnrecoverableCrypthomeErrorDialog(); void ShowUnrecoverableCrypthomeErrorDialog();
// Displays detailed error screen for error with ID |error_id|.
void ShowErrorScreen(LoginDisplay::SigninError error_id);
// Shows signin UI with specified email.
void ShowSigninUI(const std::string& email);
UserSelectionScreen* user_selection_screen() { UserSelectionScreen* user_selection_screen() {
return user_selection_screen_.get(); return user_selection_screen_.get();
} }
......
...@@ -137,7 +137,7 @@ void LoginDisplayMojo::ShowError(int error_msg_id, ...@@ -137,7 +137,7 @@ void LoginDisplayMojo::ShowError(int error_msg_id,
} }
void LoginDisplayMojo::ShowErrorScreen(LoginDisplay::SigninError error_id) { void LoginDisplayMojo::ShowErrorScreen(LoginDisplay::SigninError error_id) {
NOTIMPLEMENTED(); host_->ShowErrorScreen(error_id);
} }
void LoginDisplayMojo::ShowPasswordChangedDialog(bool show_password_error, void LoginDisplayMojo::ShowPasswordChangedDialog(bool show_password_error,
...@@ -146,7 +146,7 @@ void LoginDisplayMojo::ShowPasswordChangedDialog(bool show_password_error, ...@@ -146,7 +146,7 @@ void LoginDisplayMojo::ShowPasswordChangedDialog(bool show_password_error,
} }
void LoginDisplayMojo::ShowSigninUI(const std::string& email) { void LoginDisplayMojo::ShowSigninUI(const std::string& email) {
NOTIMPLEMENTED(); host_->ShowSigninUI(email);
} }
void LoginDisplayMojo::ShowWhitelistCheckFailedError() { void LoginDisplayMojo::ShowWhitelistCheckFailedError() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment