blob: 0e974a7fd7413d82a2a5482f91b88b2907c8276b [file] [log] [blame]
morrita81b17e02015-02-06 00:58:301// 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
amistryd4aa70d2016-06-23 07:52:375#include "ipc/ipc_mojo_handle_attachment.h"
morrita81b17e02015-02-06 00:58:306
dchenge48600452015-12-28 02:24:507#include <utility>
8
avi246998d82015-12-22 02:39:049#include "build/build_config.h"
morrita81b17e02015-02-06 00:58:3010
11namespace IPC {
12namespace internal {
13
14MojoHandleAttachment::MojoHandleAttachment(mojo::ScopedHandle handle)
dchenge48600452015-12-28 02:24:5015 : handle_(std::move(handle)) {}
morrita81b17e02015-02-06 00:58:3016
Chris Watkins2d879af2017-11-30 02:11:5917MojoHandleAttachment::~MojoHandleAttachment() = default;
morrita81b17e02015-02-06 00:58:3018
19MessageAttachment::Type MojoHandleAttachment::GetType() const {
sammc6ed3efb2016-11-23 03:17:3520 return Type::MOJO_HANDLE;
morrita81b17e02015-02-06 00:58:3021}
22
morrita81b17e02015-02-06 00:58:3023mojo::ScopedHandle MojoHandleAttachment::TakeHandle() {
dchenge48600452015-12-28 02:24:5024 return std::move(handle_);
morrita81b17e02015-02-06 00:58:3025}
26
27} // namespace internal
28} // namespace IPC