Commit c52ef1bc authored by Evan Stade's avatar Evan Stade Committed by Commit Bot

Mash cleanup: remove two more functions from mojom::LoginScreen

TBR=tsepez@chromium.org

Bug: 958206, 967109
Change-Id: Iffdac0ef21c284aea4ea331ba1d514cf77cb5687
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1633211Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#664328}
parent 8484b8a2
...@@ -390,18 +390,6 @@ void LoginScreenController::IsReadyForPassword( ...@@ -390,18 +390,6 @@ void LoginScreenController::IsReadyForPassword(
std::move(callback).Run(LockScreen::HasInstance() && !IsAuthenticating()); std::move(callback).Run(LockScreen::HasInstance() && !IsAuthenticating());
} }
void LoginScreenController::SetPublicSessionDisplayName(
const AccountId& account_id,
const std::string& display_name) {
login_data_dispatcher_.SetPublicSessionDisplayName(account_id, display_name);
}
void LoginScreenController::SetPublicSessionShowFullManagementDisclosure(
bool is_full_management_disclosure_needed) {
login_data_dispatcher_.SetPublicSessionShowFullManagementDisclosure(
is_full_management_disclosure_needed);
}
void LoginScreenController::ShowKioskAppError(const std::string& message) { void LoginScreenController::ShowKioskAppError(const std::string& message) {
ToastData toast_data( ToastData toast_data(
"KioskAppError", base::UTF8ToUTF16(message), -1 /*duration_ms*/, "KioskAppError", base::UTF8ToUTF16(message), -1 /*duration_ms*/,
......
...@@ -135,10 +135,6 @@ class ASH_EXPORT LoginScreenController : public mojom::LoginScreen, ...@@ -135,10 +135,6 @@ class ASH_EXPORT LoginScreenController : public mojom::LoginScreen,
const std::string& enterprise_info_text, const std::string& enterprise_info_text,
const std::string& bluetooth_name) override; const std::string& bluetooth_name) override;
void IsReadyForPassword(IsReadyForPasswordCallback callback) override; void IsReadyForPassword(IsReadyForPasswordCallback callback) override;
void SetPublicSessionDisplayName(const AccountId& account_id,
const std::string& display_name) override;
void SetPublicSessionShowFullManagementDisclosure(
bool is_full_management_disclosure_needed) override;
void ShowKioskAppError(const std::string& message) override; void ShowKioskAppError(const std::string& message) override;
void SetAddUserButtonEnabled(bool enable) override; void SetAddUserButtonEnabled(bool enable) override;
void SetShutdownButtonEnabled(bool enable) override; void SetShutdownButtonEnabled(bool enable) override;
......
...@@ -172,7 +172,7 @@ class ASH_EXPORT LoginDataDispatcher : public LoginScreenModel { ...@@ -172,7 +172,7 @@ class ASH_EXPORT LoginDataDispatcher : public LoginScreenModel {
const std::string& enterprise_info_text, const std::string& enterprise_info_text,
const std::string& bluetooth_name); const std::string& bluetooth_name);
void SetPublicSessionDisplayName(const AccountId& account_id, void SetPublicSessionDisplayName(const AccountId& account_id,
const std::string& display_name); const std::string& display_name) override;
void SetPublicSessionLocales(const AccountId& account_id, void SetPublicSessionLocales(const AccountId& account_id,
const std::vector<LocaleItem>& locales, const std::vector<LocaleItem>& locales,
const std::string& default_locale, const std::string& default_locale,
...@@ -182,7 +182,7 @@ class ASH_EXPORT LoginDataDispatcher : public LoginScreenModel { ...@@ -182,7 +182,7 @@ class ASH_EXPORT LoginDataDispatcher : public LoginScreenModel {
const std::string& locale, const std::string& locale,
const std::vector<InputMethodItem>& keyboard_layouts) override; const std::vector<InputMethodItem>& keyboard_layouts) override;
void SetPublicSessionShowFullManagementDisclosure( void SetPublicSessionShowFullManagementDisclosure(
bool show_full_management_disclosure); bool show_full_management_disclosure) override;
void SetDetachableBasePairingStatus( void SetDetachableBasePairingStatus(
DetachableBasePairingStatus pairing_status); DetachableBasePairingStatus pairing_status);
void SetShowParentAccessDialog(bool show); void SetShowParentAccessDialog(bool show);
......
...@@ -50,6 +50,10 @@ class ASH_PUBLIC_EXPORT LoginScreenModel { ...@@ -50,6 +50,10 @@ class ASH_PUBLIC_EXPORT LoginScreenModel {
virtual void SetAvatarForUser(const AccountId& account_id, virtual void SetAvatarForUser(const AccountId& account_id,
const UserAvatar& avatar) = 0; const UserAvatar& avatar) = 0;
// Set the public session display name for user with |account_id|.
virtual void SetPublicSessionDisplayName(const AccountId& account_id,
const std::string& display_name) = 0;
// Set the public session locales for user with |account_id|. // Set the public session locales for user with |account_id|.
// |locales|: Available locales for this user. // |locales|: Available locales for this user.
// |default_locale|: Default locale for this user. // |default_locale|: Default locale for this user.
...@@ -67,6 +71,11 @@ class ASH_PUBLIC_EXPORT LoginScreenModel { ...@@ -67,6 +71,11 @@ class ASH_PUBLIC_EXPORT LoginScreenModel {
const std::string& locale, const std::string& locale,
const std::vector<InputMethodItem>& keyboard_layouts) = 0; const std::vector<InputMethodItem>& keyboard_layouts) = 0;
// Sets whether full management disclosure is needed for the public/managed
// session login screen.
virtual void SetPublicSessionShowFullManagementDisclosure(
bool show_full_management_disclosure) = 0;
// Called when focus is reported to be leaving a lock screen app window. // Called when focus is reported to be leaving a lock screen app window.
// Requests focus to be handed off to the next suitable widget. // Requests focus to be handed off to the next suitable widget.
// |reverse|: Whether the tab order is reversed. // |reverse|: Whether the tab order is reversed.
......
...@@ -114,15 +114,6 @@ interface LoginScreen { ...@@ -114,15 +114,6 @@ interface LoginScreen {
// Check if the login/lock screen is ready for a password. // Check if the login/lock screen is ready for a password.
IsReadyForPassword() => (bool is_ready); IsReadyForPassword() => (bool is_ready);
// Set the public session display name for user with |account_id|.
SetPublicSessionDisplayName(signin.mojom.AccountId account_id,
string display_name);
// Sets whether full management disclosure is needed for the public/managed
// session login screen.
SetPublicSessionShowFullManagementDisclosure(
bool show_full_management_disclosure);
// Display a toast describing the latest kiosk app launch error. // Display a toast describing the latest kiosk app launch error.
ShowKioskAppError(string message); ShowKioskAppError(string message);
......
...@@ -70,7 +70,7 @@ UserBoardViewMojo::~UserBoardViewMojo() = default; ...@@ -70,7 +70,7 @@ UserBoardViewMojo::~UserBoardViewMojo() = default;
void UserBoardViewMojo::SetPublicSessionDisplayName( void UserBoardViewMojo::SetPublicSessionDisplayName(
const AccountId& account_id, const AccountId& account_id,
const std::string& display_name) { const std::string& display_name) {
LoginScreenClient::Get()->login_screen()->SetPublicSessionDisplayName( ash::LoginScreen::Get()->GetModel()->SetPublicSessionDisplayName(
account_id, display_name); account_id, display_name);
} }
...@@ -92,8 +92,8 @@ void UserBoardViewMojo::SetPublicSessionLocales( ...@@ -92,8 +92,8 @@ void UserBoardViewMojo::SetPublicSessionLocales(
void UserBoardViewMojo::SetPublicSessionShowFullManagementDisclosure( void UserBoardViewMojo::SetPublicSessionShowFullManagementDisclosure(
bool show_full_management_disclosure) { bool show_full_management_disclosure) {
LoginScreenClient::Get() ash::LoginScreen::Get()
->login_screen() ->GetModel()
->SetPublicSessionShowFullManagementDisclosure( ->SetPublicSessionShowFullManagementDisclosure(
show_full_management_disclosure); show_full_management_disclosure);
} }
......
...@@ -73,13 +73,6 @@ void TestLoginScreen::IsReadyForPassword(IsReadyForPasswordCallback callback) { ...@@ -73,13 +73,6 @@ void TestLoginScreen::IsReadyForPassword(IsReadyForPasswordCallback callback) {
std::move(callback).Run(true); std::move(callback).Run(true);
} }
void TestLoginScreen::SetPublicSessionDisplayName(
const AccountId& account_id,
const std::string& display_name) {}
void TestLoginScreen::SetPublicSessionShowFullManagementDisclosure(
bool show_full_management_disclosure) {}
void TestLoginScreen::ShowKioskAppError(const std::string& message) {} void TestLoginScreen::ShowKioskAppError(const std::string& message) {}
void TestLoginScreen::SetAddUserButtonEnabled(bool enable) {} void TestLoginScreen::SetAddUserButtonEnabled(bool enable) {}
......
...@@ -53,10 +53,6 @@ class TestLoginScreen : public ash::mojom::LoginScreen, ...@@ -53,10 +53,6 @@ class TestLoginScreen : public ash::mojom::LoginScreen,
const std::string& enterprise_info_text, const std::string& enterprise_info_text,
const std::string& bluetooth_name) override; const std::string& bluetooth_name) override;
void IsReadyForPassword(IsReadyForPasswordCallback callback) override; void IsReadyForPassword(IsReadyForPasswordCallback callback) override;
void SetPublicSessionDisplayName(const AccountId& account_id,
const std::string& display_name) override;
void SetPublicSessionShowFullManagementDisclosure(
bool show_full_management_disclosure) override;
void ShowKioskAppError(const std::string& message) override; void ShowKioskAppError(const std::string& message) override;
void SetAddUserButtonEnabled(bool enable) override; void SetAddUserButtonEnabled(bool enable) override;
void SetShutdownButtonEnabled(bool enable) override; void SetShutdownButtonEnabled(bool enable) override;
......
...@@ -18,6 +18,9 @@ void TestLoginScreenModel::UpdateWarningMessage(const base::string16& message) { ...@@ -18,6 +18,9 @@ void TestLoginScreenModel::UpdateWarningMessage(const base::string16& message) {
} }
void TestLoginScreenModel::SetFingerprintState(const AccountId& account_id, void TestLoginScreenModel::SetFingerprintState(const AccountId& account_id,
ash::FingerprintState state) {} ash::FingerprintState state) {}
void TestLoginScreenModel::SetPublicSessionDisplayName(
const AccountId& account_id,
const std::string& display_name) {}
void TestLoginScreenModel::SetPublicSessionLocales( void TestLoginScreenModel::SetPublicSessionLocales(
const AccountId& account_id, const AccountId& account_id,
const std::vector<ash::LocaleItem>& locales, const std::vector<ash::LocaleItem>& locales,
...@@ -27,5 +30,7 @@ void TestLoginScreenModel::SetPublicSessionKeyboardLayouts( ...@@ -27,5 +30,7 @@ void TestLoginScreenModel::SetPublicSessionKeyboardLayouts(
const AccountId& account_id, const AccountId& account_id,
const std::string& locale, const std::string& locale,
const std::vector<ash::InputMethodItem>& keyboard_layouts) {} const std::vector<ash::InputMethodItem>& keyboard_layouts) {}
void TestLoginScreenModel::SetPublicSessionShowFullManagementDisclosure(
bool show_full_management_disclosure) {}
void TestLoginScreenModel::HandleFocusLeavingLockScreenApps(bool reverse) {} void TestLoginScreenModel::HandleFocusLeavingLockScreenApps(bool reverse) {}
void TestLoginScreenModel::NotifyOobeDialogState(ash::OobeDialogState state) {} void TestLoginScreenModel::NotifyOobeDialogState(ash::OobeDialogState state) {}
...@@ -26,10 +26,14 @@ class TestLoginScreenModel : public ash::LoginScreenModel { ...@@ -26,10 +26,14 @@ class TestLoginScreenModel : public ash::LoginScreenModel {
const std::vector<ash::LocaleItem>& locales, const std::vector<ash::LocaleItem>& locales,
const std::string& default_locale, const std::string& default_locale,
bool show_advanced_view) override; bool show_advanced_view) override;
void SetPublicSessionDisplayName(const AccountId& account_id,
const std::string& display_name) override;
void SetPublicSessionKeyboardLayouts( void SetPublicSessionKeyboardLayouts(
const AccountId& account_id, const AccountId& account_id,
const std::string& locale, const std::string& locale,
const std::vector<ash::InputMethodItem>& keyboard_layouts) override; const std::vector<ash::InputMethodItem>& keyboard_layouts) override;
void SetPublicSessionShowFullManagementDisclosure(
bool show_full_management_disclosure) override;
void HandleFocusLeavingLockScreenApps(bool reverse) override; void HandleFocusLeavingLockScreenApps(bool reverse) override;
void NotifyOobeDialogState(ash::OobeDialogState state) override; void NotifyOobeDialogState(ash::OobeDialogState state) override;
......
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