• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "mojo/public/cpp/bindings/associated_group.h"
6 
7 #include "mojo/public/cpp/bindings/associated_group_controller.h"
8 
9 namespace mojo {
10 
AssociatedGroup()11 AssociatedGroup::AssociatedGroup() {}
12 
AssociatedGroup(const AssociatedGroup & other)13 AssociatedGroup::AssociatedGroup(const AssociatedGroup& other)
14     : controller_(other.controller_) {}
15 
~AssociatedGroup()16 AssociatedGroup::~AssociatedGroup() {}
17 
operator =(const AssociatedGroup & other)18 AssociatedGroup& AssociatedGroup::operator=(const AssociatedGroup& other) {
19   if (this == &other)
20     return *this;
21 
22   controller_ = other.controller_;
23   return *this;
24 }
25 
CreateEndpointHandlePair(ScopedInterfaceEndpointHandle * local_endpoint,ScopedInterfaceEndpointHandle * remote_endpoint)26 void AssociatedGroup::CreateEndpointHandlePair(
27     ScopedInterfaceEndpointHandle* local_endpoint,
28     ScopedInterfaceEndpointHandle* remote_endpoint) {
29   if (!controller_)
30     return;
31 
32   controller_->CreateEndpointHandlePair(local_endpoint, remote_endpoint);
33 }
34 
35 }  // namespace mojo
36