#include "third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/platform/web_crypto.h"
#include "third_party/blink/public/platform/web_crypto_key.h"
#include "third_party/blink/public/platform/web_crypto_key_algorithm.h"
#include "third_party/blink/public/web/modules/mediastream/media_stream_video_source.h"
#include "third_party/blink/renderer/bindings/core/v8/serialization/v8_script_value_serializer.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_dom_rect_read_only.h"
#include "third_party/blink/renderer/bindings/modules/v8/serialization/serialized_track_params.h"
#include "third_party/blink/renderer/bindings/modules/v8/serialization/web_crypto_sub_tags.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_audio_data.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_crop_target.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_crypto_key.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_dom_file_system.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_encoded_audio_chunk.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_encoded_video_chunk.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_file_system_directory_handle.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_file_system_file_handle.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_landmark.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_media_source_handle.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_media_stream_track.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_point_2d.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_restriction_target.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_rtc_certificate.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_rtc_data_channel.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_rtc_encoded_audio_frame.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_rtc_encoded_video_frame.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_video_frame.h"
#include "third_party/blink/renderer/core/dom/dom_exception.h"
#include "third_party/blink/renderer/modules/crypto/crypto_key.h"
#include "third_party/blink/renderer/modules/file_system_access/file_system_directory_handle.h"
#include "third_party/blink/renderer/modules/file_system_access/file_system_file_handle.h"
#include "third_party/blink/renderer/modules/file_system_access/file_system_handle.h"
#include "third_party/blink/renderer/modules/filesystem/dom_file_system.h"
#include "third_party/blink/renderer/modules/mediasource/media_source_attachment_supplement.h"
#include "third_party/blink/renderer/modules/mediasource/media_source_handle_attachment.h"
#include "third_party/blink/renderer/modules/mediasource/media_source_handle_impl.h"
#include "third_party/blink/renderer/modules/mediasource/media_source_handle_transfer_list.h"
#include "third_party/blink/renderer/modules/mediastream/crop_target.h"
#include "third_party/blink/renderer/modules/mediastream/media_stream_track.h"
#include "third_party/blink/renderer/modules/mediastream/media_stream_utils.h"
#include "third_party/blink/renderer/modules/mediastream/restriction_target.h"
#include "third_party/blink/renderer/modules/peerconnection/rtc_certificate.h"
#include "third_party/blink/renderer/modules/peerconnection/rtc_data_channel.h"
#include "third_party/blink/renderer/modules/peerconnection/rtc_data_channel_attachment.h"
#include "third_party/blink/renderer/modules/peerconnection/rtc_data_channel_transfer_list.h"
#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame.h"
#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame_delegate.h"
#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame.h"
#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.h"
#include "third_party/blink/renderer/modules/webcodecs/audio_data.h"
#include "third_party/blink/renderer/modules/webcodecs/audio_data_attachment.h"
#include "third_party/blink/renderer/modules/webcodecs/audio_data_transfer_list.h"
#include "third_party/blink/renderer/modules/webcodecs/decoder_buffer_attachment.h"
#include "third_party/blink/renderer/modules/webcodecs/encoded_audio_chunk.h"
#include "third_party/blink/renderer/modules/webcodecs/encoded_video_chunk.h"
#include "third_party/blink/renderer/modules/webcodecs/video_frame.h"
#include "third_party/blink/renderer/modules/webcodecs/video_frame_attachment.h"
#include "third_party/blink/renderer/modules/webcodecs/video_frame_transfer_list.h"
#include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
namespace blink {
bool V8ScriptValueSerializerForModules::ExtractTransferable(
v8::Isolate* isolate,
v8::Local<v8::Value> object,
wtf_size_t object_index,
Transferables& transferables,
ExceptionState& exception_state) { … }
bool V8ScriptValueSerializerForModules::WriteDOMObject(
ScriptWrappable* wrappable,
ExceptionState& exception_state) { … }
namespace {
uint32_t AlgorithmIdForWireFormat(WebCryptoAlgorithmId id) { … }
uint32_t AsymmetricKeyTypeForWireFormat(WebCryptoKeyType key_type) { … }
uint32_t NamedCurveForWireFormat(WebCryptoNamedCurve named_curve) { … }
uint32_t KeyUsagesForWireFormat(WebCryptoKeyUsageMask usages,
bool extractable) { … }
}
bool V8ScriptValueSerializerForModules::WriteCryptoKey(
const WebCryptoKey& key,
ExceptionState& exception_state) { … }
bool V8ScriptValueSerializerForModules::WriteFileSystemHandle(
SerializationTag tag,
FileSystemHandle* file_system_handle) { … }
bool V8ScriptValueSerializerForModules::WriteRTCEncodedAudioFrame(
RTCEncodedAudioFrame* audio_frame) { … }
bool V8ScriptValueSerializerForModules::WriteRTCEncodedVideoFrame(
RTCEncodedVideoFrame* video_frame) { … }
bool V8ScriptValueSerializerForModules::WriteVideoFrameHandle(
scoped_refptr<VideoFrameHandle> handle) { … }
bool V8ScriptValueSerializerForModules::WriteMediaAudioBuffer(
scoped_refptr<media::AudioBuffer> audio_data) { … }
bool V8ScriptValueSerializerForModules::WriteDecoderBuffer(
scoped_refptr<media::DecoderBuffer> data,
bool for_audio) { … }
bool V8ScriptValueSerializerForModules::WriteMediaStreamTrack(
MediaStreamTrack* track,
ScriptWrappable::TypeDispatcher& dispatcher,
ExceptionState& exception_state) { … }
bool V8ScriptValueSerializerForModules::WriteRTCDataChannel(
RTCDataChannel* channel) { … }
bool V8ScriptValueSerializerForModules::WriteCropTarget(
CropTarget* crop_target) { … }
bool V8ScriptValueSerializerForModules::WriteRestrictionTarget(
RestrictionTarget* restriction_target) { … }
bool V8ScriptValueSerializerForModules::WriteMediaSourceHandle(
MediaSourceHandleImpl* handle,
ExceptionState& exception_state) { … }
}