native_handle_type_converters.h 943 B

123456789101112131415161718192021222324252627282930
  1. // Copyright 2017 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. #ifndef IPC_NATIVE_HANDLE_TYPE_CONVERTERS_H_
  5. #define IPC_NATIVE_HANDLE_TYPE_CONVERTERS_H_
  6. #include "ipc/ipc_message_attachment.h"
  7. #include "mojo/public/cpp/bindings/type_converter.h" // nogncheck
  8. #include "mojo/public/interfaces/bindings/native_struct.mojom-shared.h"
  9. namespace mojo {
  10. template <>
  11. struct TypeConverter<IPC::MessageAttachment::Type,
  12. native::SerializedHandleType> {
  13. static IPC::MessageAttachment::Type Convert(
  14. native::SerializedHandleType type);
  15. };
  16. template <>
  17. struct TypeConverter<native::SerializedHandleType,
  18. IPC::MessageAttachment::Type> {
  19. static native::SerializedHandleType Convert(
  20. IPC::MessageAttachment::Type type);
  21. };
  22. } // namespace mojo
  23. #endif // IPC_NATIVE_HANDLE_TYPE_CONVERTERS_H_