#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/platform/mojo/string16_mojom_traits.h"
#include <cstring>
#include "base/containers/span.h"
#include "base/strings/latin1_string_conversions.h"
#include "mojo/public/cpp/base/big_buffer.h"
#include "mojo/public/cpp/base/big_buffer_mojom_traits.h"
namespace mojo {
MaybeOwnedString16::MaybeOwnedString16(std::u16string owned_storage)
: … { … }
MaybeOwnedString16::MaybeOwnedString16(base::span<const uint16_t> unowned)
: … { … }
MaybeOwnedString16::~MaybeOwnedString16() = default;
MaybeOwnedString16 StructTraits<mojo_base::mojom::String16DataView,
WTF::String>::data(const WTF::String& input) { … }
bool StructTraits<mojo_base::mojom::String16DataView, WTF::String>::Read(
mojo_base::mojom::String16DataView data,
WTF::String* out) { … }
mojo_base::BigBuffer StructTraits<mojo_base::mojom::BigString16DataView,
WTF::String>::data(const WTF::String& input) { … }
bool StructTraits<mojo_base::mojom::BigString16DataView, WTF::String>::Read(
mojo_base::mojom::BigString16DataView data,
WTF::String* out) { … }
}