Commit d45267c7 authored by Bailey Berro's avatar Bailey Berro Committed by Commit Bot

Add SystemRoutineController::BindInterface method

Adds the ability to bind the SystemRoutineController interface.

Bug: 1128204
Change-Id: Id729b624018fef5dbec273a562ca76a120fcc026
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2541648
Commit-Queue: Bailey Berro <baileyberro@chromium.org>
Auto-Submit: Bailey Berro <baileyberro@chromium.org>
Reviewed-by: default avatarZentaro Kavanagh <zentaro@chromium.org>
Cr-Commit-Position: refs/heads/master@{#828289}
parent 878d2afa
......@@ -99,6 +99,11 @@ void SystemRoutineController::RunRoutine(
ExecuteRoutine(type);
}
void SystemRoutineController::BindInterface(
mojo::PendingReceiver<mojom::SystemRoutineController> pending_receiver) {
receiver_.Bind(std::move(pending_receiver));
}
void SystemRoutineController::ExecuteRoutine(mojom::RoutineType routine_type) {
BindCrosHealthdDiagnosticsServiceIfNeccessary();
......
......@@ -9,6 +9,7 @@
#include "chromeos/components/diagnostics_ui/mojom/system_routine_controller.mojom.h"
#include "chromeos/services/cros_healthd/public/mojom/cros_healthd.mojom.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
......@@ -41,6 +42,9 @@ class SystemRoutineController : public mojom::SystemRoutineController {
void RunRoutine(mojom::RoutineType type,
mojo::PendingRemote<mojom::RoutineRunner> runner) override;
void BindInterface(
mojo::PendingReceiver<mojom::SystemRoutineController> pending_receiver);
private:
void ExecuteRoutine(mojom::RoutineType routine_type);
......
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