Commit a29e1ff8 authored by Demetrios Papadopoulos's avatar Demetrios Papadopoulos Committed by Commit Bot

SplitSettings: Move OS specific handler init to os_settings_ui.cc.

Also stop subclassing MojoWebUIController from SettingsUI on CrOS,
since it is no longer needed.

Bug: 990166
Change-Id: I4966e2aac58cba46d0245025037b878f77b07397
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1992989Reviewed-by: default avatarRebekah Potter <rbpotter@chromium.org>
Reviewed-by: default avatarChris Palmer <palmer@chromium.org>
Auto-Submit: Demetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#730042}
parent d2211121
......@@ -121,7 +121,6 @@
#include "chrome/browser/ui/webui/chromeos/multidevice_setup/multidevice_setup_dialog.h"
#include "chrome/browser/ui/webui/chromeos/network_ui.h"
#include "chrome/browser/ui/webui/settings/chromeos/os_settings_ui.h"
#include "chrome/browser/ui/webui/settings/settings_ui.h"
#include "chromeos/components/multidevice/debug_webui/proximity_auth_ui.h"
#include "chromeos/services/cellular_setup/public/mojom/cellular_setup.mojom.h"
#include "chromeos/services/multidevice_setup/multidevice_setup_service.h"
......@@ -523,8 +522,8 @@ void PopulateChromeWebUIFrameBinders(
RegisterWebUIControllerInterfaceBinder<
chromeos::network_config::mojom::CrosNetworkConfig,
chromeos::InternetConfigDialogUI, chromeos::InternetDetailDialogUI,
chromeos::NetworkUI, chromeos::OobeUI, chromeos::settings::OSSettingsUI,
settings::SettingsUI>(map);
chromeos::NetworkUI, chromeos::OobeUI, chromeos::settings::OSSettingsUI>(
map);
#endif
#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \
......
......@@ -16,6 +16,7 @@
#include "ui/webui/mojo_web_ui_controller.h"
namespace content {
class WebUIDataSource;
class WebUIMessageHandler;
}
......@@ -28,6 +29,11 @@ class OSSettingsUI : public ui::MojoWebUIController {
explicit OSSettingsUI(content::WebUI* web_ui);
~OSSettingsUI() override;
// Initializes the WebUI message handlers for OS-specific settings.
static void InitOSWebUIHandlers(Profile* profile,
content::WebUI* web_ui,
content::WebUIDataSource* html_source);
// Instantiates implementor of the mojom::CrosNetworkConfig mojo interface
// passing the pending receiver that will be internally bound.
void BindInterface(
......
......@@ -8,14 +8,7 @@
#include "base/macros.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/webui/webui_load_timer.h"
#if defined(OS_CHROMEOS)
#include "chromeos/services/network_config/public/mojom/cros_network_config.mojom-forward.h" // nogncheck
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "ui/webui/mojo_web_ui_controller.h"
#else
#include "content/public/browser/web_ui_controller.h"
#endif
class Profile;
......@@ -31,13 +24,7 @@ class PrefRegistrySyncable;
namespace settings {
// The WebUI handler for chrome://settings.
class SettingsUI
#if defined(OS_CHROMEOS)
: public ui::MojoWebUIController
#else
: public content::WebUIController
#endif
{
class SettingsUI : public content::WebUIController {
public:
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
......@@ -51,17 +38,6 @@ class SettingsUI
Profile* profile,
content::WebUI* web_ui,
content::WebUIDataSource* html_source);
// Initializes the WebUI message handlers for OS-specific settings.
static void InitOSWebUIHandlers(Profile* profile,
content::WebUI* web_ui,
content::WebUIDataSource* html_source);
// Instantiates implementor of the mojom::CrosNetworkConfig mojo interface
// passing the pending receiver that will be internally bound.
void BindInterface(
mojo::PendingReceiver<chromeos::network_config::mojom::CrosNetworkConfig>
receiver);
#endif // defined(OS_CHROMEOS)
private:
......@@ -70,10 +46,6 @@ class SettingsUI
WebuiLoadTimer webui_load_timer_;
#if defined(OS_CHROMEOS)
WEB_UI_CONTROLLER_TYPE_DECL();
#endif
DISALLOW_COPY_AND_ASSIGN(SettingsUI);
};
......
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