Commit 808b8c3b authored by Bailey Berro's avatar Bailey Berro Committed by Commit Bot

Introduce DiagnosticsUI::BindInterface method for SystemRoutineController

This change introduces a DiagnosticsUI::BindInterface specialization
for SystemRoutineController

Bug: 1128204
Change-Id: I29edfe0df33a53dcae131e1941c45576f217d5a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2541572
Auto-Submit: Bailey Berro <baileyberro@chromium.org>
Reviewed-by: default avatarZentaro Kavanagh <zentaro@chromium.org>
Commit-Queue: Bailey Berro <baileyberro@chromium.org>
Cr-Commit-Position: refs/heads/master@{#828328}
parent 1553d8d5
......@@ -10,6 +10,7 @@
#include "base/memory/ptr_util.h"
#include "chromeos/components/diagnostics_ui/backend/diagnostics_manager.h"
#include "chromeos/components/diagnostics_ui/backend/system_data_provider.h"
#include "chromeos/components/diagnostics_ui/backend/system_routine_controller.h"
#include "chromeos/components/diagnostics_ui/mojom/system_data_provider.mojom.h"
#include "chromeos/components/diagnostics_ui/url_constants.h"
#include "chromeos/grit/chromeos_diagnostics_app_resources.h"
......@@ -122,6 +123,16 @@ void DiagnosticsUI::BindInterface(
}
}
void DiagnosticsUI::BindInterface(
mojo::PendingReceiver<diagnostics::mojom::SystemRoutineController>
receiver) {
diagnostics::SystemRoutineController* system_routine_controller =
diagnostics_manager_->GetSystemRoutineController();
if (system_routine_controller) {
system_routine_controller->BindInterface(std::move(receiver));
}
}
WEB_UI_CONTROLLER_TYPE_IMPL(DiagnosticsUI)
} // namespace chromeos
......@@ -7,6 +7,7 @@
#include "base/macros.h"
#include "chromeos/components/diagnostics_ui/mojom/system_data_provider.mojom-forward.h"
#include "chromeos/components/diagnostics_ui/mojom/system_routine_controller.mojom-forward.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "ui/webui/mojo_web_ui_controller.h"
......@@ -33,6 +34,10 @@ class DiagnosticsUI : public ui::MojoWebUIController {
void BindInterface(
mojo::PendingReceiver<diagnostics::mojom::SystemDataProvider> receiver);
void BindInterface(
mojo::PendingReceiver<diagnostics::mojom::SystemRoutineController>
receiver);
private:
WEB_UI_CONTROLLER_TYPE_DECL();
......
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