Luis Hector Chavez | 645501c | 2016-12-28 10:56:26 -0800 | [diff] [blame] | 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 | |
| 14 | MojoHandleAttachment::MojoHandleAttachment(mojo::ScopedHandle handle) |
| 15 | : handle_(std::move(handle)) {} |
| 16 | |
| 17 | MojoHandleAttachment::~MojoHandleAttachment() { |
| 18 | } |
| 19 | |
| 20 | MessageAttachment::Type MojoHandleAttachment::GetType() const { |
Jay Civelli | cfc1eaa | 2017-08-21 17:18:10 -0700 | [diff] [blame] | 21 | return Type::MOJO_HANDLE; |
Luis Hector Chavez | 645501c | 2016-12-28 10:56:26 -0800 | [diff] [blame] | 22 | } |
| 23 | |
Luis Hector Chavez | 645501c | 2016-12-28 10:56:26 -0800 | [diff] [blame] | 24 | mojo::ScopedHandle MojoHandleAttachment::TakeHandle() { |
| 25 | return std::move(handle_); |
| 26 | } |
| 27 | |
| 28 | } // namespace internal |
| 29 | } // namespace IPC |