1 // Copyright (c) 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 "ipc/ipc_mojo_handle_attachment.h" 6 7 #include <utility> 8 9 #include "build/build_config.h" 10 11 namespace IPC { 12 namespace internal { 13 MojoHandleAttachment(mojo::ScopedHandle handle)14MojoHandleAttachment::MojoHandleAttachment(mojo::ScopedHandle handle) 15 : handle_(std::move(handle)) {} 16 ~MojoHandleAttachment()17MojoHandleAttachment::~MojoHandleAttachment() { 18 } 19 GetType() const20MessageAttachment::Type MojoHandleAttachment::GetType() const { 21 return TYPE_MOJO_HANDLE; 22 } 23 24 #if defined(OS_POSIX) TakePlatformFile()25base::PlatformFile MojoHandleAttachment::TakePlatformFile() { 26 NOTREACHED(); 27 return base::kInvalidPlatformFile; 28 } 29 #endif // OS_POSIX 30 TakeHandle()31mojo::ScopedHandle MojoHandleAttachment::TakeHandle() { 32 return std::move(handle_); 33 } 34 35 } // namespace internal 36 } // namespace IPC 37