1 // Copyright 2016 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/edk/system/ports/port_ref.h" 6 7 #include "mojo/edk/system/ports/port.h" 8 9 namespace mojo { 10 namespace edk { 11 namespace ports { 12 13 PortRef::~PortRef() { 14 } 15 16 PortRef::PortRef() { 17 } 18 19 PortRef::PortRef(const PortName& name, scoped_refptr<Port> port) 20 : name_(name), port_(std::move(port)) {} 21 22 PortRef::PortRef(const PortRef& other) 23 : name_(other.name_), port_(other.port_) { 24 } 25 26 PortRef& PortRef::operator=(const PortRef& other) { 27 if (&other != this) { 28 name_ = other.name_; 29 port_ = other.port_; 30 } 31 return *this; 32 } 33 34 } // namespace ports 35 } // namespace edk 36 } // namespace mojo 37