[go: up one dir, main page]

Mash cleanup: remove more methods from mojom::LoginScreen.

ShowErrorMessage and ClearErrors are deleted, as they've remained
unimplemented for over a year.

SetShowGuestButtonInOobe and SetShowParentAccessButton are renamed
and moved to LoginScreen.

SetShowParentAccessDialog is removed as part of the public API
since it is never called from Chrome.

TBR=estade@chromium.org, tsepez@chromium.org

(cherry picked from commit 98b718ecc8def82441310abbb79e4608b011d9b2)

Bug: 958206
Change-Id: Ibde235d3dd1013a33855874247231613d0fd4da9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1639459
Reviewed-by: Evan Stade <estade@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#665577}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1662506
Cr-Commit-Position: refs/branch-heads/3809@{#389}
Cr-Branched-From: d82dec1a818f378c464ba307ddd9c92133eac355-refs/heads/master@{#665002}
diff --git a/ash/login/login_screen_controller.cc b/ash/login/login_screen_controller.cc
index 9f10598..36e0672 100644
--- a/ash/login/login_screen_controller.cc
+++ b/ash/login/login_screen_controller.cc
@@ -300,13 +300,27 @@
   return &login_data_dispatcher_;
 }
 
+void LoginScreenController::ShowGuestButtonInOobe(bool show) {
+  Shelf::ForWindow(Shell::Get()->GetPrimaryRootWindow())
+      ->shelf_widget()
+      ->login_shelf_view()
+      ->ShowGuestButtonInOobe(show);
+}
+
+void LoginScreenController::ShowParentAccessButton(bool show) {
+  Shelf::ForWindow(Shell::Get()->GetPrimaryRootWindow())
+      ->shelf_widget()
+      ->login_shelf_view()
+      ->ShowParentAccessButton(show);
+}
+
 void LoginScreenController::SetClient(mojom::LoginScreenClientPtr client) {
   login_screen_client_ = std::move(client);
 }
 
 void LoginScreenController::ShowLockScreen(ShowLockScreenCallback on_shown) {
   OnShow();
-  ash::LockScreen::Show(ash::LockScreen::ScreenType::kLock);
+  LockScreen::Show(LockScreen::ScreenType::kLock);
   std::move(on_shown).Run(true);
 }
 
@@ -322,22 +336,11 @@
   }
 
   OnShow();
-  // TODO(jdufault): rename ash::LockScreen to ash::LoginScreen.
-  ash::LockScreen::Show(ash::LockScreen::ScreenType::kLogin);
+  // TODO(jdufault): rename LockScreen to LoginScreen.
+  LockScreen::Show(LockScreen::ScreenType::kLogin);
   std::move(on_shown).Run(true);
 }
 
-void LoginScreenController::ShowErrorMessage(int32_t login_attempts,
-                                             const std::string& error_text,
-                                             const std::string& help_link_text,
-                                             int32_t help_topic_id) {
-  NOTIMPLEMENTED();
-}
-
-void LoginScreenController::ClearErrors() {
-  NOTIMPLEMENTED();
-}
-
 void LoginScreenController::IsReadyForPassword(
     IsReadyForPasswordCallback callback) {
   std::move(callback).Run(LockScreen::HasInstance() && !IsAuthenticating());
@@ -358,24 +361,6 @@
       ->SetAllowLoginAsGuest(allow_guest);
 }
 
-void LoginScreenController::SetShowGuestButtonInOobe(bool show) {
-  Shelf::ForWindow(Shell::Get()->GetPrimaryRootWindow())
-      ->shelf_widget()
-      ->login_shelf_view()
-      ->SetShowGuestButtonInOobe(show);
-}
-
-void LoginScreenController::SetShowParentAccessButton(bool show) {
-  Shelf::ForWindow(Shell::Get()->GetPrimaryRootWindow())
-      ->shelf_widget()
-      ->login_shelf_view()
-      ->SetShowParentAccessButton(show);
-}
-
-void LoginScreenController::SetShowParentAccessDialog(bool show) {
-  login_data_dispatcher_.SetShowParentAccessDialog(show);
-}
-
 void LoginScreenController::FocusLoginShelf(bool reverse) {
   Shelf* shelf = Shelf::ForWindow(Shell::Get()->GetPrimaryRootWindow());
   // Tell the focus direction to the status area or the shelf so they can focus
diff --git a/ash/login/login_screen_controller.h b/ash/login/login_screen_controller.h
index d3a1313..d78c0cb 100644
--- a/ash/login/login_screen_controller.h
+++ b/ash/login/login_screen_controller.h
@@ -109,24 +109,18 @@
 
   // LoginScreen:
   LoginScreenModel* GetModel() override;
+  void ShowGuestButtonInOobe(bool show) override;
+  void ShowParentAccessButton(bool show) override;
 
   // mojom::LoginScreen:
   void SetClient(mojom::LoginScreenClientPtr client) override;
   void ShowLockScreen(ShowLockScreenCallback on_shown) override;
   void ShowLoginScreen(ShowLoginScreenCallback on_shown) override;
-  void ShowErrorMessage(int32_t login_attempts,
-                        const std::string& error_text,
-                        const std::string& help_link_text,
-                        int32_t help_topic_id) override;
-  void ClearErrors() override;
   void IsReadyForPassword(IsReadyForPasswordCallback callback) override;
   void ShowKioskAppError(const std::string& message) override;
   void SetAddUserButtonEnabled(bool enable) override;
   void SetShutdownButtonEnabled(bool enable) override;
   void SetAllowLoginAsGuest(bool allow_guest) override;
-  void SetShowGuestButtonInOobe(bool show) override;
-  void SetShowParentAccessButton(bool show) override;
-  void SetShowParentAccessDialog(bool show) override;
   void FocusLoginShelf(bool reverse) override;
 
   // KioskAppMenu:
diff --git a/ash/login/ui/lock_contents_view.cc b/ash/login/ui/lock_contents_view.cc
index f2bccf8..f40661a 100644
--- a/ash/login/ui/lock_contents_view.cc
+++ b/ash/login/ui/lock_contents_view.cc
@@ -545,6 +545,18 @@
   }
 }
 
+void LockContentsView::ShowParentAccessDialog(bool show) {
+  if (!primary_big_view_)
+    return;
+
+  if (show)
+    primary_big_view_->ShowParentAccessView();
+  else
+    primary_big_view_->HideParentAccessView();
+
+  Layout();
+}
+
 void LockContentsView::Layout() {
   View::Layout();
   LayoutTopHeader();
@@ -1074,19 +1086,6 @@
     GetWidget()->GetFocusManager()->ClearFocus();
 }
 
-void LockContentsView::OnSetShowParentAccessDialog(bool show) {
-  if (!primary_big_view_)
-    return;
-
-  if (show) {
-    primary_big_view_->ShowParentAccessView();
-  } else {
-    primary_big_view_->HideParentAccessView();
-  }
-
-  Layout();
-}
-
 void LockContentsView::OnFocusLeavingLockScreenApps(bool reverse) {
   if (!reverse || lock_screen_apps_active_)
     FocusNextWidget(reverse);
@@ -1735,7 +1734,7 @@
 }
 
 void LockContentsView::OnParentAccessValidationFinished(bool access_granted) {
-  OnSetShowParentAccessDialog(false);
+  ShowParentAccessDialog(false);
 }
 
 keyboard::KeyboardController* LockContentsView::GetKeyboardControllerForView()
diff --git a/ash/login/ui/lock_contents_view.h b/ash/login/ui/lock_contents_view.h
index c47b282..ccfcac3c 100644
--- a/ash/login/ui/lock_contents_view.h
+++ b/ash/login/ui/lock_contents_view.h
@@ -124,6 +124,7 @@
 
   void FocusNextUser();
   void FocusPreviousUser();
+  void ShowParentAccessDialog(bool show);
 
   // views::View:
   void Layout() override;
@@ -172,7 +173,6 @@
       bool show_full_management_disclosure) override;
   void OnDetachableBasePairingStatusChanged(
       DetachableBasePairingStatus pairing_status) override;
-  void OnSetShowParentAccessDialog(bool show) override;
   void OnFocusLeavingLockScreenApps(bool reverse) override;
   void OnOobeDialogStateChanged(OobeDialogState state) override;
 
diff --git a/ash/login/ui/lock_contents_view_unittest.cc b/ash/login/ui/lock_contents_view_unittest.cc
index 7c21325..e7a22a5 100644
--- a/ash/login/ui/lock_contents_view_unittest.cc
+++ b/ash/login/ui/lock_contents_view_unittest.cc
@@ -1946,7 +1946,7 @@
                   .textfield()
                   ->HasFocus());
 
-  DataDispatcher()->SetShowParentAccessDialog(true);
+  contents->ShowParentAccessDialog(true);
 
   EXPECT_TRUE(primary_view->auth_user());
   EXPECT_TRUE(primary_view->parent_access());
@@ -1957,7 +1957,7 @@
       ParentAccessView::TestApi(primary_view->parent_access())
           .access_code_view()));
 
-  DataDispatcher()->SetShowParentAccessDialog(false);
+  contents->ShowParentAccessDialog(false);
 
   EXPECT_TRUE(primary_view->auth_user());
   EXPECT_FALSE(primary_view->parent_access());
diff --git a/ash/login/ui/lock_debug_view.cc b/ash/login/ui/lock_debug_view.cc
index 98819c2..1c2b09e 100644
--- a/ash/login/ui/lock_debug_view.cc
+++ b/ash/login/ui/lock_debug_view.cc
@@ -1036,7 +1036,7 @@
   // Toggle parent access view.
   if (sender->GetID() == ButtonId::kGlobalToggleParentAccess) {
     is_parent_access_shown_ = !is_parent_access_shown_;
-    lock_->OnSetShowParentAccessDialog(is_parent_access_shown_);
+    lock_->ShowParentAccessDialog(is_parent_access_shown_);
   }
 }
 
diff --git a/ash/login/ui/lock_screen.cc b/ash/login/ui/lock_screen.cc
index 7eedb40..f6db4af 100644
--- a/ash/login/ui/lock_screen.cc
+++ b/ash/login/ui/lock_screen.cc
@@ -145,6 +145,10 @@
   contents_view_->FocusPreviousUser();
 }
 
+void LockScreen::ShowParentAccessDialog() {
+  contents_view_->ShowParentAccessDialog(true);
+}
+
 void LockScreen::OnLockScreenNoteStateChanged(mojom::TrayActionState state) {
   Shell::Get()
       ->login_screen_controller()
diff --git a/ash/login/ui/lock_screen.h b/ash/login/ui/lock_screen.h
index 89df403..05761e2 100644
--- a/ash/login/ui/lock_screen.h
+++ b/ash/login/ui/lock_screen.h
@@ -62,6 +62,7 @@
 
   void FocusNextUser();
   void FocusPreviousUser();
+  void ShowParentAccessDialog();
 
   // TrayActionObserver:
   void OnLockScreenNoteStateChanged(mojom::TrayActionState state) override;
diff --git a/ash/login/ui/login_data_dispatcher.cc b/ash/login/ui/login_data_dispatcher.cc
index 4ca7fbb..644a02a 100644
--- a/ash/login/ui/login_data_dispatcher.cc
+++ b/ash/login/ui/login_data_dispatcher.cc
@@ -79,8 +79,6 @@
 void LoginDataDispatcher::Observer::OnDetachableBasePairingStatusChanged(
     DetachableBasePairingStatus pairing_status) {}
 
-void LoginDataDispatcher::Observer::OnSetShowParentAccessDialog(bool show) {}
-
 void LoginDataDispatcher::Observer::OnFocusLeavingLockScreenApps(bool reverse) {
 }
 
@@ -228,11 +226,6 @@
     observer.OnDetachableBasePairingStatusChanged(pairing_status);
 }
 
-void LoginDataDispatcher::SetShowParentAccessDialog(bool show) {
-  for (auto& observer : observers_)
-    observer.OnSetShowParentAccessDialog(show);
-}
-
 void LoginDataDispatcher::HandleFocusLeavingLockScreenApps(bool reverse) {
   for (auto& observer : observers_)
     observer.OnFocusLeavingLockScreenApps(reverse);
diff --git a/ash/login/ui/login_data_dispatcher.h b/ash/login/ui/login_data_dispatcher.h
index fe66da28..64f8dad 100644
--- a/ash/login/ui/login_data_dispatcher.h
+++ b/ash/login/ui/login_data_dispatcher.h
@@ -127,9 +127,6 @@
     virtual void OnDetachableBasePairingStatusChanged(
         DetachableBasePairingStatus pairing_status);
 
-    // Called when parent access code input dialog visibility should change.
-    virtual void OnSetShowParentAccessDialog(bool show);
-
     // Called when focus is leaving a lock screen app window due to tabbing.
     // |reverse| - whether the tab order is reversed.
     virtual void OnFocusLeavingLockScreenApps(bool reverse);
@@ -187,7 +184,6 @@
       bool show_full_management_disclosure) override;
   void SetDetachableBasePairingStatus(
       DetachableBasePairingStatus pairing_status);
-  void SetShowParentAccessDialog(bool show);
   void HandleFocusLeavingLockScreenApps(bool reverse) override;
   void NotifyOobeDialogState(OobeDialogState state) override;
 
diff --git a/ash/public/cpp/login_screen.h b/ash/public/cpp/login_screen.h
index 660c869d..0ef9d85 100644
--- a/ash/public/cpp/login_screen.h
+++ b/ash/public/cpp/login_screen.h
@@ -23,6 +23,12 @@
 
   virtual LoginScreenModel* GetModel() = 0;
 
+  // Shows or hides the guest button on the login shelf during OOBE.
+  virtual void ShowGuestButtonInOobe(bool show) = 0;
+
+  // Shows or hides the parent access button on the login shelf.
+  virtual void ShowParentAccessButton(bool show) = 0;
+
  protected:
   LoginScreen();
   virtual ~LoginScreen();
diff --git a/ash/public/interfaces/login_screen.mojom b/ash/public/interfaces/login_screen.mojom
index f7c67992..4b8c02a 100644
--- a/ash/public/interfaces/login_screen.mojom
+++ b/ash/public/interfaces/login_screen.mojom
@@ -24,21 +24,6 @@
   // successfully displayed.
   ShowLoginScreen() => (bool did_show);
 
-  // Requests to show error message in the ash lock screen.
-  // TODO(xiaoyinh): login_attempts is probably not needed from chrome,
-  // remove it when we start to count the login attempts in ash lock screen.
-  // |login_attempts|: The number of the login authentication attempts.
-  // |error_text|:     The error text to be shown in lock screen.
-  // |help_link_text|: The help link to be shown in lock screen.
-  // |help_topic_id|:  The id of the help app topic regarding this error.
-  ShowErrorMessage(int32 login_attempts,
-                   string error_text,
-                   string help_link_text,
-                   int32 help_topic_id);
-
-  // Requests to close any displayed error messages in ash lock screen.
-  ClearErrors();
-
   // Check if the login/lock screen is ready for a password.
   IsReadyForPassword() => (bool is_ready);
 
@@ -55,15 +40,6 @@
   // true the button may still not be visible.
   SetAllowLoginAsGuest(bool allow_guest);
 
-  // Sets if the guest button on the login shelf can be shown during OOBE.
-  SetShowGuestButtonInOobe(bool show);
-
-  // Sets whether parent access button can be shown on the login shelf.
-  SetShowParentAccessButton(bool show);
-
-  // Sets whether parent access code input dialog is shown on the lock screen.
-  SetShowParentAccessDialog(bool show);
-
   // Transitions focus to the shelf area. If |reverse|, focuses the status area.
   FocusLoginShelf(bool reverse);
 };
diff --git a/ash/shelf/login_shelf_view.cc b/ash/shelf/login_shelf_view.cc
index d62ae0f..6b14e1d 100644
--- a/ash/shelf/login_shelf_view.cc
+++ b/ash/shelf/login_shelf_view.cc
@@ -496,7 +496,7 @@
       StartAddUser();
       break;
     case kParentAccess:
-      Shell::Get()->login_screen_controller()->SetShowParentAccessDialog(true);
+      LockScreen::Get()->ShowParentAccessDialog();
       break;
     default:
       NOTREACHED();
@@ -549,12 +549,12 @@
   UpdateUi();
 }
 
-void LoginShelfView::SetShowParentAccessButton(bool show) {
+void LoginShelfView::ShowParentAccessButton(bool show) {
   show_parent_access_ = show;
   UpdateUi();
 }
 
-void LoginShelfView::SetShowGuestButtonInOobe(bool show) {
+void LoginShelfView::ShowGuestButtonInOobe(bool show) {
   allow_guest_in_oobe_ = show;
   UpdateUi();
 }
diff --git a/ash/shelf/login_shelf_view.h b/ash/shelf/login_shelf_view.h
index 56215e63..398426e 100644
--- a/ash/shelf/login_shelf_view.h
+++ b/ash/shelf/login_shelf_view.h
@@ -90,11 +90,11 @@
   void SetAllowLoginAsGuest(bool allow_guest);
 
   // Sets whether parent access button can be shown on the login shelf.
-  void SetShowParentAccessButton(bool show);
+  void ShowParentAccessButton(bool show);
 
   // Sets if the guest button on the login shelf can be shown during gaia
   // signin screen.
-  void SetShowGuestButtonInOobe(bool show);
+  void ShowGuestButtonInOobe(bool show);
 
   // Sets whether users can be added from the login screen.
   void SetAddUserButtonEnabled(bool enable_add_user);
diff --git a/ash/shelf/login_shelf_view_unittest.cc b/ash/shelf/login_shelf_view_unittest.cc
index cfec9bf..e23ebd26 100644
--- a/ash/shelf/login_shelf_view_unittest.cc
+++ b/ash/shelf/login_shelf_view_unittest.cc
@@ -525,7 +525,7 @@
 
 TEST_F(LoginShelfViewTest, ParentAccessButtonVisibility) {
   // Parent access button should only be visible on lock screen.
-  Shell::Get()->login_screen_controller()->SetShowParentAccessButton(true);
+  Shell::Get()->login_screen_controller()->ShowParentAccessButton(true);
 
   NotifySessionStateChanged(SessionState::LOGIN_PRIMARY);
   EXPECT_TRUE(ShowsShelfButtons({LoginShelfView::kShutdown,
@@ -556,12 +556,12 @@
   EXPECT_TRUE(
       ShowsShelfButtons({LoginShelfView::kShutdown, LoginShelfView::kSignOut}));
 
-  Shell::Get()->login_screen_controller()->SetShowParentAccessButton(true);
+  Shell::Get()->login_screen_controller()->ShowParentAccessButton(true);
   EXPECT_TRUE(
       ShowsShelfButtons({LoginShelfView::kShutdown, LoginShelfView::kSignOut,
                          LoginShelfView::kParentAccess}));
 
-  Shell::Get()->login_screen_controller()->SetShowParentAccessButton(false);
+  Shell::Get()->login_screen_controller()->ShowParentAccessButton(false);
   EXPECT_TRUE(
       ShowsShelfButtons({LoginShelfView::kShutdown, LoginShelfView::kSignOut}));
 }
diff --git a/chrome/browser/chromeos/child_accounts/screen_time_controller.cc b/chrome/browser/chromeos/child_accounts/screen_time_controller.cc
index c81f7eb..8b088f1 100644
--- a/chrome/browser/chromeos/child_accounts/screen_time_controller.cc
+++ b/chrome/browser/chromeos/child_accounts/screen_time_controller.cc
@@ -8,6 +8,7 @@
 #include <string>
 #include <utility>
 
+#include "ash/public/cpp/login_screen.h"
 #include "base/bind.h"
 #include "base/feature_list.h"
 #include "base/time/clock.h"
@@ -19,7 +20,6 @@
 #include "chrome/browser/chromeos/login/lock/screen_locker.h"
 #include "chrome/browser/chromeos/profiles/profile_helper.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/ui/ash/login_screen_client.h"
 #include "chrome/browser/ui/ash/media_client.h"
 #include "chrome/common/chrome_features.h"
 #include "chrome/common/pref_names.h"
@@ -286,7 +286,7 @@
 
   // Add parent access code button.
   if (base::FeatureList::IsEnabled(features::kParentAccessCode))
-    LoginScreenClient::Get()->login_screen()->SetShowParentAccessButton(true);
+    ash::LoginScreen::Get()->ShowParentAccessButton(true);
 
   // Prevent media from continuing to play after device is locked.
   MediaClient::Get()->SuspendMediaSessions();
@@ -302,7 +302,7 @@
           ->GetAccountId();
   ScreenLocker::default_screen_locker()->EnableAuthForUser(account_id);
   if (base::FeatureList::IsEnabled(features::kParentAccessCode))
-    LoginScreenClient::Get()->login_screen()->SetShowParentAccessButton(false);
+    ash::LoginScreen::Get()->ShowParentAccessButton(false);
 }
 
 void ScreenTimeController::OnPolicyChanged() {
diff --git a/chrome/browser/chromeos/login/lock/views_screen_locker.cc b/chrome/browser/chromeos/login/lock/views_screen_locker.cc
index 554a309..6cb3ee6 100644
--- a/chrome/browser/chromeos/login/lock/views_screen_locker.cc
+++ b/chrome/browser/chromeos/login/lock/views_screen_locker.cc
@@ -142,13 +142,11 @@
     int error_msg_id,
     HelpAppLauncher::HelpTopic help_topic_id) {
   // TODO(xiaoyinh): Complete the implementation here.
-  LoginScreenClient::Get()->login_screen()->ShowErrorMessage(
-      0 /* login_attempts */, std::string(), std::string(),
-      static_cast<int>(help_topic_id));
+  NOTIMPLEMENTED();
 }
 
 void ViewsScreenLocker::ClearErrors() {
-  LoginScreenClient::Get()->login_screen()->ClearErrors();
+  NOTIMPLEMENTED();
 }
 
 void ViewsScreenLocker::OnAshLockAnimationFinished() {
diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc
index 08de5dc1..3c6124a 100644
--- a/chrome/browser/chromeos/login/wizard_controller.cc
+++ b/chrome/browser/chromeos/login/wizard_controller.cc
@@ -13,6 +13,7 @@
 #include <vector>
 
 #include "ash/public/cpp/ash_switches.h"
+#include "ash/public/cpp/login_screen.h"
 #include "base/bind.h"
 #include "base/callback_helpers.h"
 #include "base/command_line.h"
@@ -1509,7 +1510,7 @@
 }
 
 void WizardController::OnGuestModePolicyUpdated() {
-  LoginScreenClient::Get()->login_screen()->SetShowGuestButtonInOobe(
+  ash::LoginScreen::Get()->ShowGuestButtonInOobe(
       user_manager::UserManager::Get()->IsGuestSessionAllowed());
 }
 
diff --git a/chrome/browser/ui/ash/test_login_screen.cc b/chrome/browser/ui/ash/test_login_screen.cc
index ffc9089..006e963 100644
--- a/chrome/browser/ui/ash/test_login_screen.cc
+++ b/chrome/browser/ui/ash/test_login_screen.cc
@@ -41,13 +41,6 @@
   std::move(callback).Run(true);
 }
 
-void TestLoginScreen::ShowErrorMessage(int32_t login_attempts,
-                                       const std::string& error_text,
-                                       const std::string& help_link_text,
-                                       int32_t help_topic_id) {}
-
-void TestLoginScreen::ClearErrors() {}
-
 void TestLoginScreen::IsReadyForPassword(IsReadyForPasswordCallback callback) {
   std::move(callback).Run(true);
 }
@@ -60,18 +53,16 @@
 
 void TestLoginScreen::SetAllowLoginAsGuest(bool allow_guest) {}
 
-void TestLoginScreen::SetShowGuestButtonInOobe(bool show) {}
-
-void TestLoginScreen::SetShowParentAccessButton(bool show) {}
-
-void TestLoginScreen::SetShowParentAccessDialog(bool show) {}
-
 void TestLoginScreen::FocusLoginShelf(bool reverse) {}
 
 ash::LoginScreenModel* TestLoginScreen::GetModel() {
   return &test_screen_model_;
 }
 
+void TestLoginScreen::ShowGuestButtonInOobe(bool show) {}
+
+void TestLoginScreen::ShowParentAccessButton(bool show) {}
+
 void TestLoginScreen::Bind(mojo::ScopedMessagePipeHandle handle) {
   binding_.Bind(ash::mojom::LoginScreenRequest(std::move(handle)));
 }
diff --git a/chrome/browser/ui/ash/test_login_screen.h b/chrome/browser/ui/ash/test_login_screen.h
index 6d3cffd7..5efc6ca 100644
--- a/chrome/browser/ui/ash/test_login_screen.h
+++ b/chrome/browser/ui/ash/test_login_screen.h
@@ -31,23 +31,17 @@
   void SetClient(ash::mojom::LoginScreenClientPtr client) override;
   void ShowLockScreen(ShowLockScreenCallback callback) override;
   void ShowLoginScreen(ShowLoginScreenCallback callback) override;
-  void ShowErrorMessage(int32_t login_attempts,
-                        const std::string& error_text,
-                        const std::string& help_link_text,
-                        int32_t help_topic_id) override;
-  void ClearErrors() override;
   void IsReadyForPassword(IsReadyForPasswordCallback callback) override;
   void ShowKioskAppError(const std::string& message) override;
   void SetAddUserButtonEnabled(bool enable) override;
   void SetShutdownButtonEnabled(bool enable) override;
   void SetAllowLoginAsGuest(bool allow_guest) override;
-  void SetShowGuestButtonInOobe(bool show) override;
-  void SetShowParentAccessButton(bool show) override;
-  void SetShowParentAccessDialog(bool show) override;
   void FocusLoginShelf(bool reverse) override;
 
   // ash::LoginScreen:
   ash::LoginScreenModel* GetModel() override;
+  void ShowGuestButtonInOobe(bool show) override;
+  void ShowParentAccessButton(bool show) override;
 
  private:
   void Bind(mojo::ScopedMessagePipeHandle handle);
diff --git a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
index 59a9d6f..5e523cd 100644
--- a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
@@ -7,6 +7,7 @@
 #include <memory>
 
 #include "ash/public/cpp/ash_features.h"
+#include "ash/public/cpp/login_screen.h"
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/callback.h"
@@ -935,7 +936,7 @@
 }
 
 void GaiaScreenHandler::HandleShowGuestInOobe(bool show) {
-  LoginScreenClient::Get()->login_screen()->SetShowGuestButtonInOobe(show);
+  ash::LoginScreen::Get()->ShowGuestButtonInOobe(show);
 }
 
 void GaiaScreenHandler::OnShowAddUser() {
diff --git a/chrome/browser/ui/webui/chromeos/login/supervision_transition_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/supervision_transition_screen_handler.cc
index c1e7f2e..7b154e0 100644
--- a/chrome/browser/ui/webui/chromeos/login/supervision_transition_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/supervision_transition_screen_handler.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/ui/webui/chromeos/login/supervision_transition_screen_handler.h"
 
+#include "ash/public/cpp/login_screen.h"
 #include "base/bind.h"
 #include "base/logging.h"
 #include "base/metrics/histogram_macros.h"
@@ -101,7 +102,7 @@
   SystemTrayClient::Get()->SetPrimaryTrayEnabled(false);
   LoginScreenClient::Get()->login_screen()->SetShutdownButtonEnabled(false);
   LoginScreenClient::Get()->login_screen()->SetAllowLoginAsGuest(false);
-  LoginScreenClient::Get()->login_screen()->SetShowGuestButtonInOobe(false);
+  ash::LoginScreen::Get()->ShowGuestButtonInOobe(false);
 
   base::DictionaryValue data;
   data.SetBoolean("isRemovingSupervision",