#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "media/mojo/mojom/media_player.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 "media/mojo/mojom/media_player.mojom-params-data.h"
#include "media/mojo/mojom/media_player.mojom-shared-message-ids.h"
#include "media/mojo/mojom/media_player.mojom-import-headers.h"
#include "media/mojo/mojom/media_player.mojom-test-utils.h"
namespace media::mojom {
const char MediaPlayer::Name_[] = …;
MediaPlayer::IPCStableHashFunction MediaPlayer::MessageToMethodInfo_(mojo::Message& message) { … }
const char* MediaPlayer::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t MediaPlayer::RequestPlay_Sym::IPCStableHash() { … }
uint32_t MediaPlayer::RequestPause_Sym::IPCStableHash() { … }
uint32_t MediaPlayer::RequestSeekForward_Sym::IPCStableHash() { … }
uint32_t MediaPlayer::RequestSeekBackward_Sym::IPCStableHash() { … }
uint32_t MediaPlayer::RequestSeekTo_Sym::IPCStableHash() { … }
uint32_t MediaPlayer::RequestEnterPictureInPicture_Sym::IPCStableHash() { … }
uint32_t MediaPlayer::RequestMute_Sym::IPCStableHash() { … }
uint32_t MediaPlayer::SetVolumeMultiplier_Sym::IPCStableHash() { … }
uint32_t MediaPlayer::SetPersistentState_Sym::IPCStableHash() { … }
uint32_t MediaPlayer::SetPowerExperimentState_Sym::IPCStableHash() { … }
uint32_t MediaPlayer::SetAudioSinkId_Sym::IPCStableHash() { … }
uint32_t MediaPlayer::SuspendForFrameClosed_Sym::IPCStableHash() { … }
uint32_t MediaPlayer::RequestMediaRemoting_Sym::IPCStableHash() { … }
uint32_t MediaPlayer::RequestVisibility_Sym::IPCStableHash() { … }
# endif
class MediaPlayer_RequestVisibility_ForwardToCallback
: public mojo::MessageReceiver { … };
MediaPlayerProxy::MediaPlayerProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void MediaPlayerProxy::RequestPlay(
) { … }
void MediaPlayerProxy::RequestPause(
bool in_triggered_by_user) { … }
void MediaPlayerProxy::RequestSeekForward(
::base::TimeDelta in_seek_time) { … }
void MediaPlayerProxy::RequestSeekBackward(
::base::TimeDelta in_seek_time) { … }
void MediaPlayerProxy::RequestSeekTo(
::base::TimeDelta in_seek_time) { … }
void MediaPlayerProxy::RequestEnterPictureInPicture(
) { … }
void MediaPlayerProxy::RequestMute(
bool in_mute) { … }
void MediaPlayerProxy::SetVolumeMultiplier(
double in_multiplier) { … }
void MediaPlayerProxy::SetPersistentState(
bool in_persistent) { … }
void MediaPlayerProxy::SetPowerExperimentState(
bool in_enabled) { … }
void MediaPlayerProxy::SetAudioSinkId(
const std::string& in_sink_id) { … }
void MediaPlayerProxy::SuspendForFrameClosed(
) { … }
void MediaPlayerProxy::RequestMediaRemoting(
) { … }
void MediaPlayerProxy::RequestVisibility(
RequestVisibilityCallback callback) { … }
class MediaPlayer_RequestVisibility_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool MediaPlayer_RequestVisibility_ForwardToCallback::Accept(
mojo::Message* message) { … }
void MediaPlayer_RequestVisibility_ProxyToResponder::Run(
bool in_has_sufficiently_visible_video) { … }
bool MediaPlayerStubDispatch::Accept(
MediaPlayer* impl,
mojo::Message* message) { … }
bool MediaPlayerStubDispatch::AcceptWithResponder(
MediaPlayer* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kMediaPlayerValidationInfo[] = …;
bool MediaPlayerRequestValidator::Accept(mojo::Message* message) { … }
bool MediaPlayerResponseValidator::Accept(mojo::Message* message) { … }
const char MediaPlayerObserverClient::Name_[] = …;
MediaPlayerObserverClient::IPCStableHashFunction MediaPlayerObserverClient::MessageToMethodInfo_(mojo::Message& message) { … }
const char* MediaPlayerObserverClient::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t MediaPlayerObserverClient::GetHasPlayedBefore_Sym::IPCStableHash() { … }
# endif
class MediaPlayerObserverClient_GetHasPlayedBefore_ForwardToCallback
: public mojo::MessageReceiver { … };
MediaPlayerObserverClientProxy::MediaPlayerObserverClientProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void MediaPlayerObserverClientProxy::GetHasPlayedBefore(
GetHasPlayedBeforeCallback callback) { … }
class MediaPlayerObserverClient_GetHasPlayedBefore_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool MediaPlayerObserverClient_GetHasPlayedBefore_ForwardToCallback::Accept(
mojo::Message* message) { … }
void MediaPlayerObserverClient_GetHasPlayedBefore_ProxyToResponder::Run(
bool in_has_played_before) { … }
bool MediaPlayerObserverClientStubDispatch::Accept(
MediaPlayerObserverClient* impl,
mojo::Message* message) { … }
bool MediaPlayerObserverClientStubDispatch::AcceptWithResponder(
MediaPlayerObserverClient* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kMediaPlayerObserverClientValidationInfo[] = …;
bool MediaPlayerObserverClientRequestValidator::Accept(mojo::Message* message) { … }
bool MediaPlayerObserverClientResponseValidator::Accept(mojo::Message* message) { … }
const char MediaPlayerObserver::Name_[] = …;
MediaPlayerObserver::IPCStableHashFunction MediaPlayerObserver::MessageToMethodInfo_(mojo::Message& message) { … }
const char* MediaPlayerObserver::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t MediaPlayerObserver::OnMediaPlaying_Sym::IPCStableHash() { … }
uint32_t MediaPlayerObserver::OnMediaPaused_Sym::IPCStableHash() { … }
uint32_t MediaPlayerObserver::OnMutedStatusChanged_Sym::IPCStableHash() { … }
uint32_t MediaPlayerObserver::OnMediaMetadataChanged_Sym::IPCStableHash() { … }
uint32_t MediaPlayerObserver::OnMediaPositionStateChanged_Sym::IPCStableHash() { … }
uint32_t MediaPlayerObserver::OnMediaEffectivelyFullscreenChanged_Sym::IPCStableHash() { … }
uint32_t MediaPlayerObserver::OnMediaSizeChanged_Sym::IPCStableHash() { … }
uint32_t MediaPlayerObserver::OnPictureInPictureAvailabilityChanged_Sym::IPCStableHash() { … }
uint32_t MediaPlayerObserver::OnAudioOutputSinkChanged_Sym::IPCStableHash() { … }
uint32_t MediaPlayerObserver::OnUseAudioServiceChanged_Sym::IPCStableHash() { … }
uint32_t MediaPlayerObserver::OnAudioOutputSinkChangingDisabled_Sym::IPCStableHash() { … }
uint32_t MediaPlayerObserver::OnRemotePlaybackMetadataChange_Sym::IPCStableHash() { … }
uint32_t MediaPlayerObserver::OnVideoVisibilityChanged_Sym::IPCStableHash() { … }
# endif
MediaPlayerObserverProxy::MediaPlayerObserverProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void MediaPlayerObserverProxy::OnMediaPlaying(
) { … }
void MediaPlayerObserverProxy::OnMediaPaused(
bool in_stream_ended) { … }
void MediaPlayerObserverProxy::OnMutedStatusChanged(
bool in_muted) { … }
void MediaPlayerObserverProxy::OnMediaMetadataChanged(
bool in_has_audio, bool in_has_video, ::media::MediaContentType in_content_type) { … }
void MediaPlayerObserverProxy::OnMediaPositionStateChanged(
const ::media_session::MediaPosition& in_media_position) { … }
void MediaPlayerObserverProxy::OnMediaEffectivelyFullscreenChanged(
::blink::WebFullscreenVideoStatus in_status) { … }
void MediaPlayerObserverProxy::OnMediaSizeChanged(
const ::gfx::Size& in_size) { … }
void MediaPlayerObserverProxy::OnPictureInPictureAvailabilityChanged(
bool in_available) { … }
void MediaPlayerObserverProxy::OnAudioOutputSinkChanged(
const std::string& in_hashed_device_id) { … }
void MediaPlayerObserverProxy::OnUseAudioServiceChanged(
bool in_uses_audio_service) { … }
void MediaPlayerObserverProxy::OnAudioOutputSinkChangingDisabled(
) { … }
void MediaPlayerObserverProxy::OnRemotePlaybackMetadataChange(
::media_session::mojom::RemotePlaybackMetadataPtr in_remote_playback_metadata) { … }
void MediaPlayerObserverProxy::OnVideoVisibilityChanged(
bool in_meets_visibility_threshold) { … }
bool MediaPlayerObserverStubDispatch::Accept(
MediaPlayerObserver* impl,
mojo::Message* message) { … }
bool MediaPlayerObserverStubDispatch::AcceptWithResponder(
MediaPlayerObserver* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kMediaPlayerObserverValidationInfo[] = …;
bool MediaPlayerObserverRequestValidator::Accept(mojo::Message* message) { … }
const char MediaPlayerHost::Name_[] = …;
MediaPlayerHost::IPCStableHashFunction MediaPlayerHost::MessageToMethodInfo_(mojo::Message& message) { … }
const char* MediaPlayerHost::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t MediaPlayerHost::OnMediaPlayerAdded_Sym::IPCStableHash() { … }
# endif
MediaPlayerHostProxy::MediaPlayerHostProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void MediaPlayerHostProxy::OnMediaPlayerAdded(
::mojo::PendingAssociatedRemote<MediaPlayer> in_player_remote, ::mojo::PendingAssociatedReceiver<MediaPlayerObserver> in_observer, int32_t in_player_id) { … }
bool MediaPlayerHostStubDispatch::Accept(
MediaPlayerHost* impl,
mojo::Message* message) { … }
bool MediaPlayerHostStubDispatch::AcceptWithResponder(
MediaPlayerHost* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kMediaPlayerHostValidationInfo[] = …;
bool MediaPlayerHostRequestValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
}
namespace media::mojom {
void MediaPlayerInterceptorForTesting::RequestPlay() { … }
void MediaPlayerInterceptorForTesting::RequestPause(bool triggered_by_user) { … }
void MediaPlayerInterceptorForTesting::RequestSeekForward(::base::TimeDelta seek_time) { … }
void MediaPlayerInterceptorForTesting::RequestSeekBackward(::base::TimeDelta seek_time) { … }
void MediaPlayerInterceptorForTesting::RequestSeekTo(::base::TimeDelta seek_time) { … }
void MediaPlayerInterceptorForTesting::RequestEnterPictureInPicture() { … }
void MediaPlayerInterceptorForTesting::RequestMute(bool mute) { … }
void MediaPlayerInterceptorForTesting::SetVolumeMultiplier(double multiplier) { … }
void MediaPlayerInterceptorForTesting::SetPersistentState(bool persistent) { … }
void MediaPlayerInterceptorForTesting::SetPowerExperimentState(bool enabled) { … }
void MediaPlayerInterceptorForTesting::SetAudioSinkId(const std::string& sink_id) { … }
void MediaPlayerInterceptorForTesting::SuspendForFrameClosed() { … }
void MediaPlayerInterceptorForTesting::RequestMediaRemoting() { … }
void MediaPlayerInterceptorForTesting::RequestVisibility(RequestVisibilityCallback callback) { … }
MediaPlayerAsyncWaiter::MediaPlayerAsyncWaiter(
MediaPlayer* proxy) : … { … }
MediaPlayerAsyncWaiter::~MediaPlayerAsyncWaiter() = default;
void MediaPlayerAsyncWaiter::RequestVisibility(
bool* out_has_sufficiently_visible_video) { … }
bool MediaPlayerAsyncWaiter::RequestVisibility(
) { … }
void MediaPlayerObserverClientInterceptorForTesting::GetHasPlayedBefore(GetHasPlayedBeforeCallback callback) { … }
MediaPlayerObserverClientAsyncWaiter::MediaPlayerObserverClientAsyncWaiter(
MediaPlayerObserverClient* proxy) : … { … }
MediaPlayerObserverClientAsyncWaiter::~MediaPlayerObserverClientAsyncWaiter() = default;
void MediaPlayerObserverClientAsyncWaiter::GetHasPlayedBefore(
bool* out_has_played_before) { … }
bool MediaPlayerObserverClientAsyncWaiter::GetHasPlayedBefore(
) { … }
void MediaPlayerObserverInterceptorForTesting::OnMediaPlaying() { … }
void MediaPlayerObserverInterceptorForTesting::OnMediaPaused(bool stream_ended) { … }
void MediaPlayerObserverInterceptorForTesting::OnMutedStatusChanged(bool muted) { … }
void MediaPlayerObserverInterceptorForTesting::OnMediaMetadataChanged(bool has_audio, bool has_video, ::media::MediaContentType content_type) { … }
void MediaPlayerObserverInterceptorForTesting::OnMediaPositionStateChanged(const ::media_session::MediaPosition& media_position) { … }
void MediaPlayerObserverInterceptorForTesting::OnMediaEffectivelyFullscreenChanged(::blink::WebFullscreenVideoStatus status) { … }
void MediaPlayerObserverInterceptorForTesting::OnMediaSizeChanged(const ::gfx::Size& size) { … }
void MediaPlayerObserverInterceptorForTesting::OnPictureInPictureAvailabilityChanged(bool available) { … }
void MediaPlayerObserverInterceptorForTesting::OnAudioOutputSinkChanged(const std::string& hashed_device_id) { … }
void MediaPlayerObserverInterceptorForTesting::OnUseAudioServiceChanged(bool uses_audio_service) { … }
void MediaPlayerObserverInterceptorForTesting::OnAudioOutputSinkChangingDisabled() { … }
void MediaPlayerObserverInterceptorForTesting::OnRemotePlaybackMetadataChange(::media_session::mojom::RemotePlaybackMetadataPtr remote_playback_metadata) { … }
void MediaPlayerObserverInterceptorForTesting::OnVideoVisibilityChanged(bool meets_visibility_threshold) { … }
MediaPlayerObserverAsyncWaiter::MediaPlayerObserverAsyncWaiter(
MediaPlayerObserver* proxy) : … { … }
MediaPlayerObserverAsyncWaiter::~MediaPlayerObserverAsyncWaiter() = default;
void MediaPlayerHostInterceptorForTesting::OnMediaPlayerAdded(::mojo::PendingAssociatedRemote<MediaPlayer> player_remote, ::mojo::PendingAssociatedReceiver<MediaPlayerObserver> observer, int32_t player_id) { … }
MediaPlayerHostAsyncWaiter::MediaPlayerHostAsyncWaiter(
MediaPlayerHost* proxy) : … { … }
MediaPlayerHostAsyncWaiter::~MediaPlayerHostAsyncWaiter() = default;
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif