ipc_mojo_handle_attachment.cc 699 B

12345678910111213141516171819202122232425262728
  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. #include "ipc/ipc_mojo_handle_attachment.h"
  5. #include <utility>
  6. #include "build/build_config.h"
  7. namespace IPC {
  8. namespace internal {
  9. MojoHandleAttachment::MojoHandleAttachment(mojo::ScopedHandle handle)
  10. : handle_(std::move(handle)) {}
  11. MojoHandleAttachment::~MojoHandleAttachment() = default;
  12. MessageAttachment::Type MojoHandleAttachment::GetType() const {
  13. return Type::MOJO_HANDLE;
  14. }
  15. mojo::ScopedHandle MojoHandleAttachment::TakeHandle() {
  16. return std::move(handle_);
  17. }
  18. } // namespace internal
  19. } // namespace IPC