#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "third_party/blink/public/mojom/mediasession/media_session.mojom.h"
#include <math.h>
#include <stdint.h>
#include <utility>
#include "base/debug/alias.h"
#include "base/hash/md5_constexpr.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/typed_macros.h"
#include "mojo/public/cpp/bindings/features.h"
#include "mojo/public/cpp/bindings/lib/default_construct_tag_internal.h"
#include "mojo/public/cpp/bindings/lib/generated_code_util.h"
#include "mojo/public/cpp/bindings/lib/message_internal.h"
#include "mojo/public/cpp/bindings/lib/proxy_to_responder.h"
#include "mojo/public/cpp/bindings/lib/send_message_helper.h"
#include "mojo/public/cpp/bindings/lib/serialization_util.h"
#include "mojo/public/cpp/bindings/lib/unserialized_message_context.h"
#include "mojo/public/cpp/bindings/lib/validate_params.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
#include "mojo/public/cpp/bindings/mojo_buildflags.h"
#include "mojo/public/cpp/bindings/urgent_message_scope.h"
#include "mojo/public/interfaces/bindings/interface_control_messages.mojom.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_value.h"
#include "third_party/blink/public/mojom/mediasession/media_session.mojom-params-data.h"
#include "third_party/blink/public/mojom/mediasession/media_session.mojom-shared-message-ids.h"
#include "third_party/blink/public/mojom/mediasession/media_session.mojom-import-headers.h"
#include "third_party/blink/public/mojom/mediasession/media_session.mojom-test-utils.h"
namespace blink::mojom {
MediaSessionSeekToDetails::MediaSessionSeekToDetails()
: … { … }
MediaSessionSeekToDetails::MediaSessionSeekToDetails(
::base::TimeDelta seek_time_in,
bool fast_seek_in)
: … { … }
MediaSessionSeekToDetails::~MediaSessionSeekToDetails() = default;
void MediaSessionSeekToDetails::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool MediaSessionSeekToDetails::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
SpecMediaMetadata::SpecMediaMetadata()
: … { … }
SpecMediaMetadata::SpecMediaMetadata(
const ::std::u16string& title_in,
const ::std::u16string& artist_in,
const ::std::u16string& album_in,
std::vector<::media_session::MediaImage> artwork_in,
std::vector<::media_session::ChapterInformation> chapterInfo_in)
: … { … }
SpecMediaMetadata::~SpecMediaMetadata() = default;
void SpecMediaMetadata::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool SpecMediaMetadata::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
MediaSessionActionDetails::MediaSessionActionDetails() : … { … }
MediaSessionActionDetails::~MediaSessionActionDetails() { … }
void MediaSessionActionDetails::set_seek_to(
MediaSessionSeekToDetailsPtr seek_to) { … }
void MediaSessionActionDetails::DestroyActive() { … }
bool MediaSessionActionDetails::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char MediaSessionClient::Name_[] = …;
MediaSessionClient::IPCStableHashFunction MediaSessionClient::MessageToMethodInfo_(mojo::Message& message) { … }
const char* MediaSessionClient::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t MediaSessionClient::DidReceiveAction_Sym::IPCStableHash() { … }
# endif
MediaSessionClientProxy::MediaSessionClientProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void MediaSessionClientProxy::DidReceiveAction(
::media_session::mojom::MediaSessionAction in_action, MediaSessionActionDetailsPtr in_details) { … }
bool MediaSessionClientStubDispatch::Accept(
MediaSessionClient* impl,
mojo::Message* message) { … }
bool MediaSessionClientStubDispatch::AcceptWithResponder(
MediaSessionClient* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kMediaSessionClientValidationInfo[] = …;
bool MediaSessionClientRequestValidator::Accept(mojo::Message* message) { … }
const char MediaSessionService::Name_[] = …;
MediaSessionService::IPCStableHashFunction MediaSessionService::MessageToMethodInfo_(mojo::Message& message) { … }
const char* MediaSessionService::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t MediaSessionService::SetClient_Sym::IPCStableHash() { … }
uint32_t MediaSessionService::SetPlaybackState_Sym::IPCStableHash() { … }
uint32_t MediaSessionService::SetPositionState_Sym::IPCStableHash() { … }
uint32_t MediaSessionService::SetMetadata_Sym::IPCStableHash() { … }
uint32_t MediaSessionService::SetMicrophoneState_Sym::IPCStableHash() { … }
uint32_t MediaSessionService::SetCameraState_Sym::IPCStableHash() { … }
uint32_t MediaSessionService::EnableAction_Sym::IPCStableHash() { … }
uint32_t MediaSessionService::DisableAction_Sym::IPCStableHash() { … }
# endif
MediaSessionServiceProxy::MediaSessionServiceProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void MediaSessionServiceProxy::SetClient(
::mojo::PendingRemote<MediaSessionClient> in_client) { … }
void MediaSessionServiceProxy::SetPlaybackState(
MediaSessionPlaybackState in_state) { … }
void MediaSessionServiceProxy::SetPositionState(
const std::optional<::media_session::MediaPosition>& in_position) { … }
void MediaSessionServiceProxy::SetMetadata(
SpecMediaMetadataPtr in_metadata) { … }
void MediaSessionServiceProxy::SetMicrophoneState(
::media_session::mojom::MicrophoneState in_microphone_state) { … }
void MediaSessionServiceProxy::SetCameraState(
::media_session::mojom::CameraState in_camera_state) { … }
void MediaSessionServiceProxy::EnableAction(
::media_session::mojom::MediaSessionAction in_action) { … }
void MediaSessionServiceProxy::DisableAction(
::media_session::mojom::MediaSessionAction in_action) { … }
bool MediaSessionServiceStubDispatch::Accept(
MediaSessionService* impl,
mojo::Message* message) { … }
bool MediaSessionServiceStubDispatch::AcceptWithResponder(
MediaSessionService* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kMediaSessionServiceValidationInfo[] = …;
bool MediaSessionServiceRequestValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::blink::mojom::MediaSessionSeekToDetails::DataView, ::blink::mojom::MediaSessionSeekToDetailsPtr>::Read(
::blink::mojom::MediaSessionSeekToDetails::DataView input,
::blink::mojom::MediaSessionSeekToDetailsPtr* output) { … }
bool StructTraits<::blink::mojom::SpecMediaMetadata::DataView, ::blink::mojom::SpecMediaMetadataPtr>::Read(
::blink::mojom::SpecMediaMetadata::DataView input,
::blink::mojom::SpecMediaMetadataPtr* output) { … }
bool UnionTraits<::blink::mojom::MediaSessionActionDetails::DataView, ::blink::mojom::MediaSessionActionDetailsPtr>::Read(
::blink::mojom::MediaSessionActionDetails::DataView input,
::blink::mojom::MediaSessionActionDetailsPtr* output) { … }
}
namespace blink::mojom {
void MediaSessionClientInterceptorForTesting::DidReceiveAction(::media_session::mojom::MediaSessionAction action, MediaSessionActionDetailsPtr details) { … }
MediaSessionClientAsyncWaiter::MediaSessionClientAsyncWaiter(
MediaSessionClient* proxy) : … { … }
MediaSessionClientAsyncWaiter::~MediaSessionClientAsyncWaiter() = default;
void MediaSessionServiceInterceptorForTesting::SetClient(::mojo::PendingRemote<MediaSessionClient> client) { … }
void MediaSessionServiceInterceptorForTesting::SetPlaybackState(MediaSessionPlaybackState state) { … }
void MediaSessionServiceInterceptorForTesting::SetPositionState(const std::optional<::media_session::MediaPosition>& position) { … }
void MediaSessionServiceInterceptorForTesting::SetMetadata(SpecMediaMetadataPtr metadata) { … }
void MediaSessionServiceInterceptorForTesting::SetMicrophoneState(::media_session::mojom::MicrophoneState microphone_state) { … }
void MediaSessionServiceInterceptorForTesting::SetCameraState(::media_session::mojom::CameraState camera_state) { … }
void MediaSessionServiceInterceptorForTesting::EnableAction(::media_session::mojom::MediaSessionAction action) { … }
void MediaSessionServiceInterceptorForTesting::DisableAction(::media_session::mojom::MediaSessionAction action) { … }
MediaSessionServiceAsyncWaiter::MediaSessionServiceAsyncWaiter(
MediaSessionService* proxy) : … { … }
MediaSessionServiceAsyncWaiter::~MediaSessionServiceAsyncWaiter() = default;
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif