Index: mojo/public/cpp/bindings/lib/associated_group.cc |
diff --git a/mojo/public/cpp/bindings/lib/associated_group.cc b/mojo/public/cpp/bindings/lib/associated_group.cc |
index a9c53b5e86a8889bad3890e1119243fd5a721795..3e95eeb0276807de1a3c2469fbaca8826def3324 100644 |
--- a/mojo/public/cpp/bindings/lib/associated_group.cc |
+++ b/mojo/public/cpp/bindings/lib/associated_group.cc |
@@ -8,28 +8,27 @@ |
namespace mojo { |
-AssociatedGroup::AssociatedGroup() {} |
+AssociatedGroup::AssociatedGroup() = default; |
-AssociatedGroup::AssociatedGroup(const AssociatedGroup& other) |
- : controller_(other.controller_) {} |
+AssociatedGroup::AssociatedGroup( |
+ scoped_refptr<AssociatedGroupController> controller) |
+ : controller_(std::move(controller)) {} |
-AssociatedGroup::~AssociatedGroup() {} |
+AssociatedGroup::AssociatedGroup(const ScopedInterfaceEndpointHandle& handle) |
+ : controller_getter_(handle.CreateGroupControllerGetter()) {} |
-AssociatedGroup& AssociatedGroup::operator=(const AssociatedGroup& other) { |
- if (this == &other) |
- return *this; |
+AssociatedGroup::AssociatedGroup(const AssociatedGroup& other) = default; |
- controller_ = other.controller_; |
- return *this; |
-} |
+AssociatedGroup::~AssociatedGroup() = default; |
+ |
+AssociatedGroup& AssociatedGroup::operator=(const AssociatedGroup& other) = |
+ default; |
-void AssociatedGroup::CreateEndpointHandlePair( |
- ScopedInterfaceEndpointHandle* local_endpoint, |
- ScopedInterfaceEndpointHandle* remote_endpoint) { |
- if (!controller_) |
- return; |
+AssociatedGroupController* AssociatedGroup::GetController() { |
+ if (controller_) |
+ return controller_.get(); |
- controller_->CreateEndpointHandlePair(local_endpoint, remote_endpoint); |
+ return controller_getter_.Run(); |
} |
} // namespace mojo |