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 @@ ...@@ -121,7 +121,6 @@
#include "chrome/browser/ui/webui/chromeos/multidevice_setup/multidevice_setup_dialog.h" #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/chromeos/network_ui.h"
#include "chrome/browser/ui/webui/settings/chromeos/os_settings_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/components/multidevice/debug_webui/proximity_auth_ui.h"
#include "chromeos/services/cellular_setup/public/mojom/cellular_setup.mojom.h" #include "chromeos/services/cellular_setup/public/mojom/cellular_setup.mojom.h"
#include "chromeos/services/multidevice_setup/multidevice_setup_service.h" #include "chromeos/services/multidevice_setup/multidevice_setup_service.h"
...@@ -523,8 +522,8 @@ void PopulateChromeWebUIFrameBinders( ...@@ -523,8 +522,8 @@ void PopulateChromeWebUIFrameBinders(
RegisterWebUIControllerInterfaceBinder< RegisterWebUIControllerInterfaceBinder<
chromeos::network_config::mojom::CrosNetworkConfig, chromeos::network_config::mojom::CrosNetworkConfig,
chromeos::InternetConfigDialogUI, chromeos::InternetDetailDialogUI, chromeos::InternetConfigDialogUI, chromeos::InternetDetailDialogUI,
chromeos::NetworkUI, chromeos::OobeUI, chromeos::settings::OSSettingsUI, chromeos::NetworkUI, chromeos::OobeUI, chromeos::settings::OSSettingsUI>(
settings::SettingsUI>(map); map);
#endif #endif
#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \ #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include "ui/webui/mojo_web_ui_controller.h" #include "ui/webui/mojo_web_ui_controller.h"
namespace content { namespace content {
class WebUIDataSource;
class WebUIMessageHandler; class WebUIMessageHandler;
} }
...@@ -28,6 +29,11 @@ class OSSettingsUI : public ui::MojoWebUIController { ...@@ -28,6 +29,11 @@ class OSSettingsUI : public ui::MojoWebUIController {
explicit OSSettingsUI(content::WebUI* web_ui); explicit OSSettingsUI(content::WebUI* web_ui);
~OSSettingsUI() override; ~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 // Instantiates implementor of the mojom::CrosNetworkConfig mojo interface
// passing the pending receiver that will be internally bound. // passing the pending receiver that will be internally bound.
void BindInterface( void BindInterface(
......
...@@ -8,14 +8,7 @@ ...@@ -8,14 +8,7 @@
#include "base/macros.h" #include "base/macros.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/webui/webui_load_timer.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" #include "content/public/browser/web_ui_controller.h"
#endif
class Profile; class Profile;
...@@ -31,13 +24,7 @@ class PrefRegistrySyncable; ...@@ -31,13 +24,7 @@ class PrefRegistrySyncable;
namespace settings { namespace settings {
// The WebUI handler for chrome://settings. // The WebUI handler for chrome://settings.
class SettingsUI class SettingsUI : public content::WebUIController {
#if defined(OS_CHROMEOS)
: public ui::MojoWebUIController
#else
: public content::WebUIController
#endif
{
public: public:
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
...@@ -51,17 +38,6 @@ class SettingsUI ...@@ -51,17 +38,6 @@ class SettingsUI
Profile* profile, Profile* profile,
content::WebUI* web_ui, content::WebUI* web_ui,
content::WebUIDataSource* html_source); 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) #endif // defined(OS_CHROMEOS)
private: private:
...@@ -70,10 +46,6 @@ class SettingsUI ...@@ -70,10 +46,6 @@ class SettingsUI
WebuiLoadTimer webui_load_timer_; WebuiLoadTimer webui_load_timer_;
#if defined(OS_CHROMEOS)
WEB_UI_CONTROLLER_TYPE_DECL();
#endif
DISALLOW_COPY_AND_ASSIGN(SettingsUI); 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