#include "third_party/blink/renderer/core/inspector/v8_inspector_string.h"
#include <utility>
#include "base/numerics/safe_conversions.h"
#include "third_party/blink/renderer/core/inspector/protocol/protocol.h"
#include "third_party/blink/renderer/platform/wtf/text/base64.h"
#include "third_party/inspector_protocol/crdtp/cbor.h"
namespace blink {
v8_inspector::StringView ToV8InspectorStringView(const StringView& string) { … }
std::unique_ptr<v8_inspector::StringBuffer> ToV8InspectorStringBuffer(
const StringView& string) { … }
String ToCoreString(const v8_inspector::StringView& string) { … }
String ToCoreString(std::unique_ptr<v8_inspector::StringBuffer> buffer) { … }
namespace protocol {
String StringUtil::fromUTF16LE(const uint16_t* data, size_t length) { … }
namespace {
class BinaryBasedOnUint8Vector : public Binary::Impl { … };
class BinaryBasedOnCharVector : public Binary::Impl { … };
class BinaryBasedOnCachedData : public Binary::Impl { … };
}
void Binary::AppendSerialized(std::vector<uint8_t>* out) const { … }
String Binary::toBase64() const { … }
Binary Binary::fromBase64(const String& base64, bool* success) { … }
Binary Binary::fromVector(Vector<uint8_t> in) { … }
Binary Binary::fromSpan(const uint8_t* data, size_t size) { … }
Binary Binary::fromCachedData(
std::unique_ptr<v8::ScriptCompiler::CachedData> data) { … }
}
}
namespace crdtp {
Binary;
StringUtil;
bool ProtocolTypeTraits<WTF::String>::Deserialize(DeserializerState* state,
String* value) { … }
void ProtocolTypeTraits<WTF::String>::Serialize(const String& value,
std::vector<uint8_t>* bytes) { … }
bool ProtocolTypeTraits<blink::protocol::Binary>::Deserialize(
DeserializerState* state,
blink::protocol::Binary* value) { … }
void ProtocolTypeTraits<blink::protocol::Binary>::Serialize(
const blink::protocol::Binary& value,
std::vector<uint8_t>* bytes) { … }
}