cros: Move some *View classes into *Handler files

Also eliminate AppLaunchSplashScreenView::Delegate

Bug: 928555
Change-Id: I056c5fa6efb94bb59c45cbaf8e4344588dd97230
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1564935
Reviewed-by: Alexander Alekseev <alemate@chromium.org>
Commit-Queue: Jacob Dufault <jdufault@chromium.org>
Cr-Commit-Position: refs/heads/master@{#652284}
diff --git a/chrome/browser/chromeos/BUILD.gn b/chrome/browser/chromeos/BUILD.gn
index 594bf8b..743fbb0 100644
--- a/chrome/browser/chromeos/BUILD.gn
+++ b/chrome/browser/chromeos/BUILD.gn
@@ -1258,8 +1258,6 @@
     "login/screen_manager.h",
     "login/screens/app_downloading_screen.cc",
     "login/screens/app_downloading_screen.h",
-    "login/screens/app_downloading_screen_view.h",
-    "login/screens/app_launch_splash_screen_view.h",
     "login/screens/arc_kiosk_splash_screen_view.h",
     "login/screens/arc_terms_of_service_screen.cc",
     "login/screens/arc_terms_of_service_screen.h",
@@ -1356,7 +1354,6 @@
     "login/screens/user_selection_screen.h",
     "login/screens/welcome_screen.cc",
     "login/screens/welcome_screen.h",
-    "login/screens/welcome_view.h",
     "login/screens/wrong_hwid_screen.cc",
     "login/screens/wrong_hwid_screen.h",
     "login/screens/wrong_hwid_screen_view.h",
diff --git a/chrome/browser/chromeos/login/app_launch_controller.h b/chrome/browser/chromeos/login/app_launch_controller.h
index 9bf13c4..bdc1295 100644
--- a/chrome/browser/chromeos/login/app_launch_controller.h
+++ b/chrome/browser/chromeos/login/app_launch_controller.h
@@ -16,7 +16,6 @@
 #include "chrome/browser/chromeos/app_mode/kiosk_profile_loader.h"
 #include "chrome/browser/chromeos/app_mode/startup_app_launcher.h"
 #include "chrome/browser/chromeos/login/app_launch_signin_screen.h"
-#include "chrome/browser/chromeos/login/screens/app_launch_splash_screen_view.h"
 #include "content/public/browser/notification_observer.h"
 #include "content/public/browser/notification_registrar.h"
 
@@ -30,8 +29,7 @@
 // Controller for the kiosk app launch process, responsible for
 // coordinating loading the kiosk profile, launching the app, and
 // updating the splash screen UI.
-class AppLaunchController : public AppLaunchSplashScreenView::Delegate,
-                            public KioskProfileLoader::Delegate,
+class AppLaunchController : public KioskProfileLoader::Delegate,
                             public StartupAppLauncher::Delegate,
                             public AppLaunchSigninScreen::Delegate,
                             public content::NotificationObserver {
@@ -53,6 +51,22 @@
   bool network_wait_timedout() { return network_wait_timedout_; }
   bool showing_network_dialog() { return showing_network_dialog_; }
 
+  // Invoked when the configure network control is clicked.
+  void OnConfigureNetwork();
+
+  // Invoked when the app launch bailout shortcut key is pressed.
+  void OnCancelAppLaunch();
+
+  // Invoked when the network config shortcut key is pressed.
+  void OnNetworkConfigRequested(bool requested);
+
+  // Invoked when network state is changed. |online| is true if the device
+  // is connected to the Internet.
+  void OnNetworkStateChanged(bool online);
+
+  // Invoked when the splash screen view is being deleted.
+  void OnDeletingSplashScreenView();
+
   // Customize controller for testing purposes.
   static void SkipSplashWaitForTesting();
   static void SetNetworkTimeoutCallbackForTesting(base::Closure* callback);
@@ -92,13 +106,6 @@
   void OnProfileLoaded(Profile* profile) override;
   void OnProfileLoadFailed(KioskAppLaunchError::Error error) override;
 
-  // AppLaunchSplashScreenView::Delegate overrides:
-  void OnConfigureNetwork() override;
-  void OnCancelAppLaunch() override;
-  void OnNetworkConfigRequested(bool requested) override;
-  void OnNetworkStateChanged(bool online) override;
-  void OnDeletingSplashScreenView() override;
-
   // StartupAppLauncher::Delegate overrides:
   void InitializeNetwork() override;
   bool IsNetworkReady() override;
diff --git a/chrome/browser/chromeos/login/kiosk_browsertest.cc b/chrome/browser/chromeos/login/kiosk_browsertest.cc
index 071bf64..03c99ff3 100644
--- a/chrome/browser/chromeos/login/kiosk_browsertest.cc
+++ b/chrome/browser/chromeos/login/kiosk_browsertest.cc
@@ -750,8 +750,7 @@
 
     // Configure network should bring up lock screen for owner.
     OobeScreenWaiter lock_screen_waiter(OobeScreen::SCREEN_ACCOUNT_PICKER);
-    static_cast<AppLaunchSplashScreenView::Delegate*>(GetAppLaunchController())
-        ->OnConfigureNetwork();
+    GetAppLaunchController()->OnConfigureNetwork();
     lock_screen_waiter.Wait();
 
     // There should be only one owner pod on this screen.
diff --git a/chrome/browser/chromeos/login/screens/app_downloading_screen.cc b/chrome/browser/chromeos/login/screens/app_downloading_screen.cc
index 88521aa..16cfc5a 100644
--- a/chrome/browser/chromeos/login/screens/app_downloading_screen.cc
+++ b/chrome/browser/chromeos/login/screens/app_downloading_screen.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/chromeos/login/screens/app_downloading_screen.h"
 
+#include "chrome/browser/ui/webui/chromeos/login/app_downloading_screen_handler.h"
+
 namespace chromeos {
 namespace {
 
diff --git a/chrome/browser/chromeos/login/screens/app_downloading_screen.h b/chrome/browser/chromeos/login/screens/app_downloading_screen.h
index 243db4b..dcd01eb6 100644
--- a/chrome/browser/chromeos/login/screens/app_downloading_screen.h
+++ b/chrome/browser/chromeos/login/screens/app_downloading_screen.h
@@ -9,11 +9,12 @@
 
 #include "base/callback.h"
 #include "base/macros.h"
-#include "chrome/browser/chromeos/login/screens/app_downloading_screen_view.h"
 #include "chrome/browser/chromeos/login/screens/base_screen.h"
 
 namespace chromeos {
 
+class AppDownloadingScreenView;
+
 // This is App Downloading screen that tells the user the selected Android apps
 // are being downloaded.
 class AppDownloadingScreen : public BaseScreen {
diff --git a/chrome/browser/chromeos/login/screens/app_downloading_screen_view.h b/chrome/browser/chromeos/login/screens/app_downloading_screen_view.h
deleted file mode 100644
index 6588e25..0000000
--- a/chrome/browser/chromeos/login/screens/app_downloading_screen_view.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_APP_DOWNLOADING_SCREEN_VIEW_H_
-#define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_APP_DOWNLOADING_SCREEN_VIEW_H_
-
-#include "chrome/browser/chromeos/login/oobe_screen.h"
-
-namespace chromeos {
-
-class AppDownloadingScreen;
-
-// Interface for dependency injection between AppDownloadingScreen and its
-// WebUI representation.
-class AppDownloadingScreenView {
- public:
-  constexpr static OobeScreen kScreenId = OobeScreen::SCREEN_APP_DOWNLOADING;
-
-  virtual ~AppDownloadingScreenView() = default;
-
-  // Sets screen this view belongs to.
-  virtual void Bind(AppDownloadingScreen* screen) = 0;
-
-  // Shows the contents of the screen.
-  virtual void Show() = 0;
-
-  // Hides the contents of the screen.
-  virtual void Hide() = 0;
-};
-
-}  // namespace chromeos
-
-#endif  // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_APP_DOWNLOADING_SCREEN_VIEW_H_
diff --git a/chrome/browser/chromeos/login/screens/app_launch_splash_screen_view.h b/chrome/browser/chromeos/login/screens/app_launch_splash_screen_view.h
deleted file mode 100644
index 2fd9186..0000000
--- a/chrome/browser/chromeos/login/screens/app_launch_splash_screen_view.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_APP_LAUNCH_SPLASH_SCREEN_VIEW_H_
-#define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_APP_LAUNCH_SPLASH_SCREEN_VIEW_H_
-
-#include "base/strings/string16.h"
-#include "chrome/browser/chromeos/login/oobe_screen.h"
-
-namespace chromeos {
-
-// Interface for UI implemenations of the ApplaunchSplashScreen.
-class AppLaunchSplashScreenView {
- public:
-  enum AppLaunchState {
-    APP_LAUNCH_STATE_PREPARING_NETWORK,
-    APP_LAUNCH_STATE_INSTALLING_APPLICATION,
-    APP_LAUNCH_STATE_WAITING_APP_WINDOW,
-    APP_LAUNCH_STATE_NETWORK_WAIT_TIMEOUT,
-    APP_LAUNCH_STATE_SHOWING_NETWORK_CONFIGURE_UI,
-  };
-
-  class Delegate {
-   public:
-    // Invoked when the configure network control is clicked.
-    virtual void OnConfigureNetwork() = 0;
-
-    // Invoked when the app launch bailout shortcut key is pressed.
-    virtual void OnCancelAppLaunch() = 0;
-
-    // Invoked when the network config shortcut key is pressed.
-    virtual void OnNetworkConfigRequested(bool requested) = 0;
-
-    // Invoked when network state is changed. |online| is true if the device
-    // is connected to the Internet.
-    virtual void OnNetworkStateChanged(bool online) = 0;
-
-    // Invoked when the splash screen view is being deleted.
-    virtual void OnDeletingSplashScreenView() = 0;
-
-   protected:
-    virtual ~Delegate() {}
-  };
-
-  constexpr static OobeScreen kScreenId = OobeScreen::SCREEN_APP_LAUNCH_SPLASH;
-
-  virtual ~AppLaunchSplashScreenView() {}
-
-  // Sets screen this view belongs to.
-  virtual void SetDelegate(Delegate* screen) = 0;
-
-  // Shows the contents of the screen.
-  virtual void Show(const std::string& app_id) = 0;
-
-  // Hides the contents of the screen.
-  virtual void Hide() = 0;
-
-  // Set the current app launch state.
-  virtual void UpdateAppLaunchState(AppLaunchState state) = 0;
-
-  // Sets whether configure network control is visible.
-  virtual void ToggleNetworkConfig(bool visible) = 0;
-
-  // Shows the network error and configure UI.
-  virtual void ShowNetworkConfigureUI() = 0;
-
-  // Returns true if the default network has Internet access.
-  virtual bool IsNetworkReady() = 0;
-};
-
-}  // namespace chromeos
-
-#endif  // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_APP_LAUNCH_SPLASH_SCREEN_VIEW_H_
diff --git a/chrome/browser/chromeos/login/screens/mock_welcome_screen.h b/chrome/browser/chromeos/login/screens/mock_welcome_screen.h
index 6938b3b..bdfca55 100644
--- a/chrome/browser/chromeos/login/screens/mock_welcome_screen.h
+++ b/chrome/browser/chromeos/login/screens/mock_welcome_screen.h
@@ -9,7 +9,7 @@
 
 #include "base/macros.h"
 #include "chrome/browser/chromeos/login/screens/welcome_screen.h"
-#include "chrome/browser/chromeos/login/screens/welcome_view.h"
+#include "chrome/browser/ui/webui/chromeos/login/welcome_screen_handler.h"
 #include "testing/gmock/include/gmock/gmock.h"
 
 namespace chromeos {
diff --git a/chrome/browser/chromeos/login/screens/welcome_screen.cc b/chrome/browser/chromeos/login/screens/welcome_screen.cc
index 3f5f201..95bbecc 100644
--- a/chrome/browser/chromeos/login/screens/welcome_screen.cc
+++ b/chrome/browser/chromeos/login/screens/welcome_screen.cc
@@ -18,12 +18,12 @@
 #include "chrome/browser/chromeos/customization/customization_document.h"
 #include "chrome/browser/chromeos/login/oobe_screen.h"
 #include "chrome/browser/chromeos/login/screen_manager.h"
-#include "chrome/browser/chromeos/login/screens/welcome_view.h"
 #include "chrome/browser/chromeos/login/ui/input_events_blocker.h"
 #include "chrome/browser/chromeos/login/wizard_controller.h"
 #include "chrome/browser/chromeos/system/timezone_util.h"
 #include "chrome/browser/profiles/profile_manager.h"
 #include "chrome/browser/ui/webui/chromeos/login/l10n_util.h"
+#include "chrome/browser/ui/webui/chromeos/login/welcome_screen_handler.h"
 #include "chrome/common/pref_names.h"
 #include "chrome/grit/chromium_strings.h"
 #include "chrome/grit/generated_resources.h"
diff --git a/chrome/browser/chromeos/login/screens/welcome_view.h b/chrome/browser/chromeos/login/screens/welcome_view.h
deleted file mode 100644
index c4731dd3..0000000
--- a/chrome/browser/chromeos/login/screens/welcome_view.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_WELCOME_VIEW_H_
-#define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_WELCOME_VIEW_H_
-
-#include <string>
-
-#include "chrome/browser/chromeos/login/oobe_screen.h"
-
-namespace chromeos {
-
-class WelcomeScreen;
-
-// Interface for dependency injection between WelcomeScreen and its actual
-// representation, either views based or WebUI. Owned by WelcomeScreen.
-class WelcomeView {
- public:
-  constexpr static OobeScreen kScreenId = OobeScreen::SCREEN_OOBE_WELCOME;
-
-  virtual ~WelcomeView() {}
-
-  // Shows the contents of the screen.
-  virtual void Show() = 0;
-
-  // Hides the contents of the screen.
-  virtual void Hide() = 0;
-
-  // Binds |screen| to the view.
-  virtual void Bind(WelcomeScreen* screen) = 0;
-
-  // Unbinds model from the view.
-  virtual void Unbind() = 0;
-
-  // Stops demo mode detection.
-  virtual void StopDemoModeDetection() = 0;
-
-  // Reloads localized contents.
-  virtual void ReloadLocalizedContent() = 0;
-
-  // Change the current input method.
-  virtual void SetInputMethodId(const std::string& input_method_id) = 0;
-};
-
-}  // namespace chromeos
-
-#endif  // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_WELCOME_VIEW_H_
diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc
index 9530146..ba68e89 100644
--- a/chrome/browser/chromeos/login/wizard_controller.cc
+++ b/chrome/browser/chromeos/login/wizard_controller.cc
@@ -70,7 +70,6 @@
 #include "chrome/browser/chromeos/login/screens/update_required_screen.h"
 #include "chrome/browser/chromeos/login/screens/update_screen.h"
 #include "chrome/browser/chromeos/login/screens/welcome_screen.h"
-#include "chrome/browser/chromeos/login/screens/welcome_view.h"
 #include "chrome/browser/chromeos/login/screens/wrong_hwid_screen.h"
 #include "chrome/browser/chromeos/login/session/user_session_manager.h"
 #include "chrome/browser/chromeos/login/startup_utils.h"
@@ -93,6 +92,7 @@
 #include "chrome/browser/ui/ash/tablet_mode_client.h"
 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
+#include "chrome/browser/ui/webui/chromeos/login/welcome_screen_handler.h"
 #include "chrome/browser/ui/webui/help/help_utils_chromeos.h"
 #include "chrome/common/chrome_constants.h"
 #include "chrome/common/chrome_features.h"
diff --git a/chrome/browser/ui/webui/chromeos/login/app_downloading_screen_handler.h b/chrome/browser/ui/webui/chromeos/login/app_downloading_screen_handler.h
index 9995b81..4a38e03 100644
--- a/chrome/browser/ui/webui/chromeos/login/app_downloading_screen_handler.h
+++ b/chrome/browser/ui/webui/chromeos/login/app_downloading_screen_handler.h
@@ -6,13 +6,28 @@
 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_APP_DOWNLOADING_SCREEN_HANDLER_H_
 
 #include "base/macros.h"
-#include "chrome/browser/chromeos/login/screens/app_downloading_screen_view.h"
 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h"
 
 namespace chromeos {
 
 class AppDownloadingScreen;
 
+class AppDownloadingScreenView {
+ public:
+  constexpr static OobeScreen kScreenId = OobeScreen::SCREEN_APP_DOWNLOADING;
+
+  virtual ~AppDownloadingScreenView() = default;
+
+  // Sets screen this view belongs to.
+  virtual void Bind(AppDownloadingScreen* screen) = 0;
+
+  // Shows the contents of the screen.
+  virtual void Show() = 0;
+
+  // Hides the contents of the screen.
+  virtual void Hide() = 0;
+};
+
 // The sole implementation of the AppDownloadingScreenView, using WebUI.
 class AppDownloadingScreenHandler : public BaseScreenHandler,
                                     public AppDownloadingScreenView {
diff --git a/chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handler.cc
index 6be0470..9b9707d 100644
--- a/chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handler.cc
@@ -9,6 +9,7 @@
 
 #include "base/values.h"
 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
+#include "chrome/browser/chromeos/login/app_launch_controller.h"
 #include "chrome/browser/chromeos/login/oobe_screen.h"
 #include "chrome/browser/chromeos/login/screens/network_error.h"
 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
@@ -50,8 +51,8 @@
 
 AppLaunchSplashScreenHandler::~AppLaunchSplashScreenHandler() {
   network_state_informer_->RemoveObserver(this);
-  if (delegate_)
-    delegate_->OnDeletingSplashScreenView();
+  if (controller_)
+    controller_->OnDeletingSplashScreenView();
 }
 
 void AppLaunchSplashScreenHandler::DeclareLocalizedValues(
@@ -128,8 +129,8 @@
 }
 
 void AppLaunchSplashScreenHandler::SetDelegate(
-    AppLaunchSplashScreenHandler::Delegate* delegate) {
-  delegate_ = delegate;
+    AppLaunchController* controller) {
+  controller_ = controller;
 }
 
 void AppLaunchSplashScreenHandler::ShowNetworkConfigureUI() {
@@ -137,7 +138,7 @@
   if (state == NetworkStateInformer::ONLINE) {
     online_state_ = true;
     if (!network_config_requested_) {
-      delegate_->OnNetworkStateChanged(true);
+      controller_->OnNetworkStateChanged(true);
       return;
     }
   }
@@ -195,15 +196,14 @@
 
 void AppLaunchSplashScreenHandler::UpdateState(
     NetworkError::ErrorReason reason) {
-  if (!delegate_ ||
-      (state_ != APP_LAUNCH_STATE_PREPARING_NETWORK &&
-       state_ != APP_LAUNCH_STATE_NETWORK_WAIT_TIMEOUT)) {
+  if (!controller_ || (state_ != APP_LAUNCH_STATE_PREPARING_NETWORK &&
+                       state_ != APP_LAUNCH_STATE_NETWORK_WAIT_TIMEOUT)) {
     return;
   }
 
   bool new_online_state =
       network_state_informer_->state() == NetworkStateInformer::ONLINE;
-  delegate_->OnNetworkStateChanged(new_online_state);
+  controller_->OnNetworkStateChanged(new_online_state);
 
   online_state_ = new_online_state;
 }
@@ -247,33 +247,33 @@
 }
 
 void AppLaunchSplashScreenHandler::HandleConfigureNetwork() {
-  if (delegate_)
-    delegate_->OnConfigureNetwork();
+  if (controller_)
+    controller_->OnConfigureNetwork();
   else
     LOG(WARNING) << "No delegate set to handle network configuration.";
 }
 
 void AppLaunchSplashScreenHandler::HandleCancelAppLaunch() {
-  if (delegate_)
-    delegate_->OnCancelAppLaunch();
+  if (controller_)
+    controller_->OnCancelAppLaunch();
   else
     LOG(WARNING) << "No delegate set to handle cancel app launch";
 }
 
 void AppLaunchSplashScreenHandler::HandleNetworkConfigRequested() {
-  if (!delegate_ || network_config_done_)
+  if (!controller_ || network_config_done_)
     return;
 
   network_config_requested_ = true;
-  delegate_->OnNetworkConfigRequested(true);
+  controller_->OnNetworkConfigRequested(true);
 }
 
 void AppLaunchSplashScreenHandler::HandleContinueAppLaunch() {
   DCHECK(online_state_);
-  if (delegate_ && online_state_) {
+  if (controller_ && online_state_) {
     network_config_requested_ = false;
     network_config_done_ = true;
-    delegate_->OnNetworkConfigRequested(false);
+    controller_->OnNetworkConfigRequested(false);
     Show(app_id_);
   }
 }
diff --git a/chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handler.h b/chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handler.h
index a818ee8..250e858dfc 100644
--- a/chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handler.h
+++ b/chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handler.h
@@ -9,13 +9,51 @@
 #include <string>
 
 #include "base/macros.h"
-#include "chrome/browser/chromeos/login/screens/app_launch_splash_screen_view.h"
 #include "chrome/browser/chromeos/login/screens/error_screen.h"
 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h"
 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h"
 
 namespace chromeos {
 
+class AppLaunchController;
+
+// Interface for UI implementations of the AppLaunchSplashScreen.
+class AppLaunchSplashScreenView {
+ public:
+  enum AppLaunchState {
+    APP_LAUNCH_STATE_PREPARING_NETWORK,
+    APP_LAUNCH_STATE_INSTALLING_APPLICATION,
+    APP_LAUNCH_STATE_WAITING_APP_WINDOW,
+    APP_LAUNCH_STATE_NETWORK_WAIT_TIMEOUT,
+    APP_LAUNCH_STATE_SHOWING_NETWORK_CONFIGURE_UI,
+  };
+
+  constexpr static OobeScreen kScreenId = OobeScreen::SCREEN_APP_LAUNCH_SPLASH;
+
+  virtual ~AppLaunchSplashScreenView() {}
+
+  // Sets screen this view belongs to.
+  virtual void SetDelegate(AppLaunchController* controller) = 0;
+
+  // Shows the contents of the screen.
+  virtual void Show(const std::string& app_id) = 0;
+
+  // Hides the contents of the screen.
+  virtual void Hide() = 0;
+
+  // Set the current app launch state.
+  virtual void UpdateAppLaunchState(AppLaunchState state) = 0;
+
+  // Sets whether configure network control is visible.
+  virtual void ToggleNetworkConfig(bool visible) = 0;
+
+  // Shows the network error and configure UI.
+  virtual void ShowNetworkConfigureUI() = 0;
+
+  // Returns true if the default network has Internet access.
+  virtual bool IsNetworkReady() = 0;
+};
+
 // A class that handles the WebUI hooks for the app launch splash screen.
 class AppLaunchSplashScreenHandler
     : public BaseScreenHandler,
@@ -41,7 +79,7 @@
   void Hide() override;
   void ToggleNetworkConfig(bool visible) override;
   void UpdateAppLaunchState(AppLaunchState state) override;
-  void SetDelegate(AppLaunchSplashScreenHandler::Delegate* delegate) override;
+  void SetDelegate(AppLaunchController* controller) override;
   void ShowNetworkConfigureUI() override;
   bool IsNetworkReady() override;
 
@@ -58,7 +96,7 @@
   void HandleContinueAppLaunch();
   void HandleNetworkConfigRequested();
 
-  AppLaunchSplashScreenHandler::Delegate* delegate_ = nullptr;
+  AppLaunchController* controller_ = nullptr;
   bool show_on_init_ = false;
   std::string app_id_;
   AppLaunchState state_ = APP_LAUNCH_STATE_PREPARING_NETWORK;
diff --git a/chrome/browser/ui/webui/chromeos/login/welcome_screen_handler.h b/chrome/browser/ui/webui/chromeos/login/welcome_screen_handler.h
index 32b0de7..38b5be34 100644
--- a/chrome/browser/ui/webui/chromeos/login/welcome_screen_handler.h
+++ b/chrome/browser/ui/webui/chromeos/login/welcome_screen_handler.h
@@ -9,7 +9,6 @@
 #include <string>
 
 #include "base/macros.h"
-#include "chrome/browser/chromeos/login/screens/welcome_view.h"
 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h"
 
 namespace base {
@@ -19,6 +18,36 @@
 namespace chromeos {
 
 class CoreOobeView;
+class WelcomeScreen;
+
+// Interface for WelcomeScreenHandler.
+class WelcomeView {
+ public:
+  constexpr static OobeScreen kScreenId = OobeScreen::SCREEN_OOBE_WELCOME;
+
+  virtual ~WelcomeView() {}
+
+  // Shows the contents of the screen.
+  virtual void Show() = 0;
+
+  // Hides the contents of the screen.
+  virtual void Hide() = 0;
+
+  // Binds |screen| to the view.
+  virtual void Bind(WelcomeScreen* screen) = 0;
+
+  // Unbinds model from the view.
+  virtual void Unbind() = 0;
+
+  // Stops demo mode detection.
+  virtual void StopDemoModeDetection() = 0;
+
+  // Reloads localized contents.
+  virtual void ReloadLocalizedContent() = 0;
+
+  // Change the current input method.
+  virtual void SetInputMethodId(const std::string& input_method_id) = 0;
+};
 
 // WebUI implementation of WelcomeScreenView. It is used to interact with
 // the welcome screen (part of the page) of the OOBE.
@@ -28,8 +57,7 @@
                        CoreOobeView* core_oobe_view);
   ~WelcomeScreenHandler() override;
 
- private:
-  // WelcomeView implementation:
+  // WelcomeView:
   void Show() override;
   void Hide() override;
   void Bind(WelcomeScreen* screen) override;
@@ -38,13 +66,14 @@
   void ReloadLocalizedContent() override;
   void SetInputMethodId(const std::string& input_method_id) override;
 
-  // BaseScreenHandler implementation:
+  // BaseScreenHandler:
   void DeclareLocalizedValues(
       ::login::LocalizedValuesBuilder* builder) override;
   void DeclareJSCallbacks() override;
   void GetAdditionalParameters(base::DictionaryValue* dict) override;
   void Initialize() override;
 
+ private:
   // JS callbacks.
   void HandleSetLocaleId(const std::string& locale_id);
   void HandleSetInputMethodId(const std::string& input_method_id);