#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/platform/mojo/drag_mojom_traits.h"
#include <algorithm>
#include <optional>
#include <string>
#include "base/check.h"
#include "base/containers/span.h"
#include "base/files/file_path.h"
#include "base/functional/overloaded.h"
#include "base/memory/scoped_refptr.h"
#include "base/notreached.h"
#include "mojo/public/cpp/base/big_buffer.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
#include "third_party/abseil-cpp/absl/types/variant.h"
#include "third_party/blink/public/mojom/blob/serialized_blob.mojom.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/file_path_conversion.h"
#include "third_party/blink/public/platform/web_drag_data.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/platform/web_vector.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
namespace mojo {
WTF::String StructTraits<blink::mojom::DragItemStringDataView,
blink::WebDragData::StringItem>::
string_type(const blink::WebDragData::StringItem& item) { … }
WTF::String StructTraits<blink::mojom::DragItemStringDataView,
blink::WebDragData::StringItem>::
string_data(const blink::WebDragData::StringItem& item) { … }
WTF::String StructTraits<blink::mojom::DragItemStringDataView,
blink::WebDragData::StringItem>::
title(const blink::WebDragData::StringItem& item) { … }
std::optional<blink::KURL> StructTraits<blink::mojom::DragItemStringDataView,
blink::WebDragData::StringItem>::
base_url(const blink::WebDragData::StringItem& item) { … }
bool StructTraits<blink::mojom::DragItemStringDataView,
blink::WebDragData::StringItem>::
Read(blink::mojom::DragItemStringDataView data,
blink::WebDragData::StringItem* out) { … }
base::FilePath StructTraits<blink::mojom::DataTransferFileDataView,
blink::WebDragData::FilenameItem>::
path(const blink::WebDragData::FilenameItem& item) { … }
base::FilePath StructTraits<blink::mojom::DataTransferFileDataView,
blink::WebDragData::FilenameItem>::
display_name(const blink::WebDragData::FilenameItem& item) { … }
mojo::PendingRemote<blink::mojom::blink::FileSystemAccessDataTransferToken>
StructTraits<blink::mojom::DataTransferFileDataView,
blink::WebDragData::FilenameItem>::
file_system_access_token(const blink::WebDragData::FilenameItem& item) { … }
bool StructTraits<blink::mojom::DataTransferFileDataView,
blink::WebDragData::FilenameItem>::
Read(blink::mojom::DataTransferFileDataView data,
blink::WebDragData::FilenameItem* out) { … }
mojo_base::BigBuffer StructTraits<blink::mojom::DragItemBinaryDataView,
blink::WebDragData::BinaryDataItem>::
data(const blink::WebDragData::BinaryDataItem& item) { … }
bool StructTraits<blink::mojom::DragItemBinaryDataView,
blink::WebDragData::BinaryDataItem>::
is_image_accessible(const blink::WebDragData::BinaryDataItem& item) { … }
blink::KURL StructTraits<blink::mojom::DragItemBinaryDataView,
blink::WebDragData::BinaryDataItem>::
source_url(const blink::WebDragData::BinaryDataItem& item) { … }
base::FilePath StructTraits<blink::mojom::DragItemBinaryDataView,
blink::WebDragData::BinaryDataItem>::
filename_extension(const blink::WebDragData::BinaryDataItem& item) { … }
WTF::String StructTraits<blink::mojom::DragItemBinaryDataView,
blink::WebDragData::BinaryDataItem>::
content_disposition(const blink::WebDragData::BinaryDataItem& item) { … }
bool StructTraits<blink::mojom::DragItemBinaryDataView,
blink::WebDragData::BinaryDataItem>::
Read(blink::mojom::DragItemBinaryDataView data,
blink::WebDragData::BinaryDataItem* out) { … }
blink::KURL StructTraits<blink::mojom::DragItemFileSystemFileDataView,
blink::WebDragData::FileSystemFileItem>::
url(const blink::WebDragData::FileSystemFileItem& item) { … }
int64_t StructTraits<blink::mojom::DragItemFileSystemFileDataView,
blink::WebDragData::FileSystemFileItem>::
size(const blink::WebDragData::FileSystemFileItem& item) { … }
WTF::String StructTraits<blink::mojom::DragItemFileSystemFileDataView,
blink::WebDragData::FileSystemFileItem>::
file_system_id(const blink::WebDragData::FileSystemFileItem& item) { … }
scoped_refptr<blink::BlobDataHandle>
StructTraits<blink::mojom::DragItemFileSystemFileDataView,
blink::WebDragData::FileSystemFileItem>::
serialized_blob(const blink::WebDragData::FileSystemFileItem& item) { … }
bool StructTraits<blink::mojom::DragItemFileSystemFileDataView,
blink::WebDragData::FileSystemFileItem>::
Read(blink::mojom::DragItemFileSystemFileDataView data,
blink::WebDragData::FileSystemFileItem* out) { … }
bool UnionTraits<blink::mojom::DragItemDataView, blink::WebDragData::Item>::
Read(blink::mojom::DragItemDataView data, blink::WebDragData::Item* out) { … }
blink::mojom::DragItemDataView::Tag
UnionTraits<blink::mojom::DragItemDataView, blink::WebDragData::Item>::GetTag(
const blink::WebDragData::Item& item) { … }
const blink::WebVector<blink::WebDragData::Item>&
StructTraits<blink::mojom::DragDataDataView, blink::WebDragData>::items(
const blink::WebDragData& drag_data) { … }
WTF::String StructTraits<blink::mojom::DragDataDataView, blink::WebDragData>::
file_system_id(const blink::WebDragData& drag_data) { … }
bool StructTraits<blink::mojom::DragDataDataView, blink::WebDragData>::
force_default_action(const blink::WebDragData& drag_data) { … }
network::mojom::ReferrerPolicy StructTraits<
blink::mojom::DragDataDataView,
blink::WebDragData>::referrer_policy(const blink::WebDragData& drag_data) { … }
bool StructTraits<blink::mojom::DragDataDataView, blink::WebDragData>::Read(
blink::mojom::DragDataDataView data,
blink::WebDragData* out) { … }
}