1 // Copyright 2018 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/platform/platform_channel_endpoint.h" 6 7 namespace mojo { 8 9 PlatformChannelEndpoint::PlatformChannelEndpoint() = default; 10 11 PlatformChannelEndpoint::PlatformChannelEndpoint( 12 PlatformChannelEndpoint&& other) = default; 13 PlatformChannelEndpoint(PlatformHandle handle)14PlatformChannelEndpoint::PlatformChannelEndpoint(PlatformHandle handle) 15 : handle_(std::move(handle)) {} 16 17 PlatformChannelEndpoint::~PlatformChannelEndpoint() = default; 18 19 PlatformChannelEndpoint& PlatformChannelEndpoint::operator=( 20 PlatformChannelEndpoint&& other) = default; 21 reset()22void PlatformChannelEndpoint::reset() { 23 handle_.reset(); 24 } 25 Clone() const26PlatformChannelEndpoint PlatformChannelEndpoint::Clone() const { 27 return PlatformChannelEndpoint(handle_.Clone()); 28 } 29 30 } // namespace mojo 31