cros: Replace some use of mojo::BindingSet in ash with Binding
Several mojo interface implementation in //ash only support a single
connection. For example, many interfaces exist primarily to provide
a single client/delegate interface back to the browser. Replace
their usage of BindingSet with Binding.
Also clean up some interface overrides where a FooImpl in ash
overrides both mojom::Foo and mojom::FooClient. These impl objects
are not "is-a" client interface impls, so don't derive from that
interface.
Bug: none
Test: ash_unittests, browser_tests
Change-Id: Id65aadda0ad9dd74702fbf21fbb8aa307b39d9fc
Reviewed-on: https://chromium-review.googlesource.com/766649
Commit-Queue: James Cook <jamescook@chromium.org>
Reviewed-by: Michael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516100}
diff --git a/ash/login/lock_screen_controller.cc b/ash/login/lock_screen_controller.cc
index 5e75a93..ed86dfd 100644
--- a/ash/login/lock_screen_controller.cc
+++ b/ash/login/lock_screen_controller.cc
@@ -31,7 +31,8 @@
} // namespace
-LockScreenController::LockScreenController() = default;
+LockScreenController::LockScreenController() : binding_(this) {}
+
LockScreenController::~LockScreenController() = default;
// static
@@ -48,7 +49,7 @@
}
void LockScreenController::BindRequest(mojom::LockScreenRequest request) {
- bindings_.AddBinding(this, std::move(request));
+ binding_.Bind(std::move(request));
}
void LockScreenController::SetClient(mojom::LockScreenClientPtr client) {