chromium/third_party/blink/renderer/platform/mojo/drag_mojom_traits.h

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

#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_MOJO_DRAG_MOJOM_TRAITS_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_MOJO_DRAG_MOJOM_TRAITS_H_

#include <stdint.h>

#include <optional>

#include "mojo/public/cpp/base/big_buffer.h"
#include "mojo/public/cpp/base/file_path_mojom_traits.h"
#include "mojo/public/cpp/bindings/string_traits_wtf.h"
#include "mojo/public/cpp/bindings/struct_traits.h"
#include "mojo/public/cpp/bindings/union_traits.h"
#include "services/network/public/mojom/referrer_policy.mojom-forward.h"
#include "third_party/abseil-cpp/absl/types/variant.h"
#include "third_party/blink/public/mojom/data_transfer/data_transfer.mojom-shared.h"
#include "third_party/blink/public/mojom/drag/drag.mojom-shared.h"
#include "third_party/blink/public/mojom/file_system_access/file_system_access_data_transfer_token.mojom-blink.h"
#include "third_party/blink/public/platform/web_drag_data.h"
#include "third_party/blink/renderer/platform/blob/serialized_blob_mojom_traits.h"
#include "third_party/blink/renderer/platform/mojo/kurl_mojom_traits.h"
#include "third_party/blink/renderer/platform/mojo/string16_mojom_traits.h"
#include "third_party/blink/renderer/platform/platform_export.h"
#include "third_party/blink/renderer/platform/weborigin/kurl.h"
#include "third_party/blink/renderer/platform/wtf/forward.h"

namespace blink {
template <typename T>
class WebVector;
}

namespace mojo {

template <>
struct PLATFORM_EXPORT StructTraits<blink::mojom::DragItemStringDataView,
                                    blink::WebDragData::StringItem> {};

template <>
struct PLATFORM_EXPORT StructTraits<blink::mojom::DataTransferFileDataView,
                                    blink::WebDragData::FilenameItem> {};

template <>
struct PLATFORM_EXPORT StructTraits<blink::mojom::DragItemBinaryDataView,
                                    blink::WebDragData::BinaryDataItem> {};

template <>
struct PLATFORM_EXPORT
    StructTraits<blink::mojom::DragItemFileSystemFileDataView,
                 blink::WebDragData::FileSystemFileItem> {};

template <>
struct PLATFORM_EXPORT
    UnionTraits<blink::mojom::DragItemDataView, blink::WebDragData::Item> {};

template <>
struct PLATFORM_EXPORT
    StructTraits<blink::mojom::DragDataDataView, blink::WebDragData> {};

}  // namespace mojo

#endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_MOJO_DRAG_MOJOM_TRAITS_H_