chromium/extensions/common/mojom/message_port_mojom_traits.h

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef EXTENSIONS_COMMON_MOJOM_MESSAGE_PORT_MOJOM_TRAITS_H_
#define EXTENSIONS_COMMON_MOJOM_MESSAGE_PORT_MOJOM_TRAITS_H_

#include <string>

#include "extensions/common/api/messaging/message.h"
#include "extensions/common/api/messaging/messaging_endpoint.h"
#include "extensions/common/api/messaging/port_id.h"
#include "extensions/common/mojom/message_port.mojom-shared.h"
#include "mojo/public/cpp/bindings/struct_traits.h"

namespace mojo {

template <>
struct StructTraits<extensions::mojom::MessageDataView, extensions::Message> {};

template <>
struct StructTraits<extensions::mojom::PortIdDataView, extensions::PortId> {};

template <>
struct StructTraits<extensions::mojom::MessagingEndpointDataView,
                    extensions::MessagingEndpoint> {};

}  // namespace mojo

#endif  // EXTENSIONS_COMMON_MOJOM_MESSAGE_PORT_MOJOM_TRAITS_H_