blob: e3421c3e88bc31aa78b4d0b51427cb4948bb5d36 [file] [log] [blame]
morrita1b52e4c2015-02-06 09:58:30 +09001// 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
amistry6555e692016-06-23 16:52:37 +09005#include "ipc/ipc_mojo_handle_attachment.h"
morrita1b52e4c2015-02-06 09:58:30 +09006
dcheng6c1ffcf2015-12-28 11:24:50 +09007#include <utility>
8
avi42ebda42015-12-22 11:39:04 +09009#include "build/build_config.h"
morrita1b52e4c2015-02-06 09:58:30 +090010
11namespace IPC {
12namespace internal {
13
14MojoHandleAttachment::MojoHandleAttachment(mojo::ScopedHandle handle)
dcheng6c1ffcf2015-12-28 11:24:50 +090015 : handle_(std::move(handle)) {}
morrita1b52e4c2015-02-06 09:58:30 +090016
17MojoHandleAttachment::~MojoHandleAttachment() {
18}
19
20MessageAttachment::Type MojoHandleAttachment::GetType() const {
sammc14583362016-11-23 12:17:35 +090021 return Type::MOJO_HANDLE;
morrita1b52e4c2015-02-06 09:58:30 +090022}
23
morrita1b52e4c2015-02-06 09:58:30 +090024mojo::ScopedHandle MojoHandleAttachment::TakeHandle() {
dcheng6c1ffcf2015-12-28 11:24:50 +090025 return std::move(handle_);
morrita1b52e4c2015-02-06 09:58:30 +090026}
27
28} // namespace internal
29} // namespace IPC