chromium/services/media_session/public/cpp/test/mock_media_session.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "services/media_session/public/cpp/test/mock_media_session.h"

#include <utility>

#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/ranges/algorithm.h"

namespace media_session {
namespace test {

namespace {

bool IsPositionEqual(const MediaPosition& p1, const MediaPosition& p2) {}

bool IsPositionGreaterOrEqual(const MediaPosition& p1,
                              const MediaPosition& p2) {}

}  // namespace

MockMediaSessionMojoObserver::MockMediaSessionMojoObserver(
    mojom::MediaSession& media_session) {}

MockMediaSessionMojoObserver::~MockMediaSessionMojoObserver() = default;

void MockMediaSessionMojoObserver::MediaSessionInfoChanged(
    mojom::MediaSessionInfoPtr session) {}

void MockMediaSessionMojoObserver::MediaSessionMetadataChanged(
    const std::optional<MediaMetadata>& metadata) {}

void MockMediaSessionMojoObserver::MediaSessionActionsChanged(
    const std::vector<mojom::MediaSessionAction>& actions) {}

void MockMediaSessionMojoObserver::MediaSessionImagesChanged(
    const base::flat_map<mojom::MediaSessionImageType, std::vector<MediaImage>>&
        images) {}

void MockMediaSessionMojoObserver::MediaSessionPositionChanged(
    const std::optional<media_session::MediaPosition>& position) {}

void MockMediaSessionMojoObserver::WaitForState(
    mojom::MediaSessionInfo::SessionState wanted_state) {}

void MockMediaSessionMojoObserver::WaitForPlaybackState(
    mojom::MediaPlaybackState wanted_state) {}

void MockMediaSessionMojoObserver::WaitForMicrophoneState(
    mojom::MicrophoneState wanted_state) {}

void MockMediaSessionMojoObserver::WaitForCameraState(
    mojom::CameraState wanted_state) {}

void MockMediaSessionMojoObserver::WaitForAudioVideoStates(
    const std::vector<mojom::MediaAudioVideoState>& wanted_states) {}

void MockMediaSessionMojoObserver::WaitForControllable(bool is_controllable) {}

void MockMediaSessionMojoObserver::WaitForExpectedHideMetadata(
    bool hide_metadata) {}

void MockMediaSessionMojoObserver::WaitForEmptyMetadata() {}

void MockMediaSessionMojoObserver::WaitForExpectedMetadata(
    const MediaMetadata& metadata) {}

void MockMediaSessionMojoObserver::WaitForEmptyActions() {}

void MockMediaSessionMojoObserver::WaitForExpectedActions(
    const std::set<mojom::MediaSessionAction>& actions) {}

void MockMediaSessionMojoObserver::WaitForExpectedImagesOfType(
    mojom::MediaSessionImageType type,
    const std::vector<MediaImage>& images) {}

void MockMediaSessionMojoObserver::WaitForEmptyPosition() {}

void MockMediaSessionMojoObserver::WaitForExpectedPosition(
    const MediaPosition& position) {}

base::TimeDelta MockMediaSessionMojoObserver::WaitForExpectedPositionAtLeast(
    const MediaPosition& position) {}

bool MockMediaSessionMojoObserver::WaitForMeetsVisibilityThreshold(
    bool meets_visibility_threshold) {}

void MockMediaSessionMojoObserver::StartWaiting() {}

void MockMediaSessionMojoObserver::QuitWaitingIfNeeded() {}

MockMediaSession::MockMediaSession() = default;

MockMediaSession::MockMediaSession(bool force_duck) :{}

MockMediaSession::~MockMediaSession() {}

void MockMediaSession::Suspend(SuspendType suspend_type) {}

void MockMediaSession::Resume(SuspendType suspend_type) {}

void MockMediaSession::StartDucking() {}

void MockMediaSession::StopDucking() {}

void MockMediaSession::GetMediaSessionInfo(
    GetMediaSessionInfoCallback callback) {}

void MockMediaSession::AddObserver(
    mojo::PendingRemote<mojom::MediaSessionObserver> observer) {}

void MockMediaSession::GetDebugInfo(GetDebugInfoCallback callback) {}

void MockMediaSession::PreviousTrack() {}

void MockMediaSession::NextTrack() {}

void MockMediaSession::SkipAd() {}

void MockMediaSession::Seek(base::TimeDelta seek_time) {}

void MockMediaSession::Stop(SuspendType type) {}

void MockMediaSession::GetMediaImageBitmap(
    const MediaImage& image,
    int minimum_size_px,
    int desired_size_px,
    GetMediaImageBitmapCallback callback) {}

void MockMediaSession::SeekTo(base::TimeDelta seek_time) {}

void MockMediaSession::ScrubTo(base::TimeDelta seek_time) {}

void MockMediaSession::EnterPictureInPicture() {}

void MockMediaSession::ExitPictureInPicture() {}

void MockMediaSession::GetVisibility(GetVisibilityCallback callback) {}

void MockMediaSession::SetIsControllable(bool value) {}

void MockMediaSession::AbandonAudioFocusFromClient() {}

base::UnguessableToken MockMediaSession::RequestAudioFocusFromService(
    mojo::Remote<mojom::AudioFocusManager>& service,
    mojom::AudioFocusType audio_focus_type) {}

bool MockMediaSession::RequestGroupedAudioFocusFromService(
    const base::UnguessableToken& request_id,
    mojo::Remote<mojom::AudioFocusManager>& service,
    mojom::AudioFocusType audio_focus_type,
    const base::UnguessableToken& group_id) {}

mojom::MediaSessionInfo::SessionState MockMediaSession::GetState() const {}

void MockMediaSession::FlushForTesting() {}

void MockMediaSession::SimulateMetadataChanged(
    const std::optional<MediaMetadata>& metadata) {}

void MockMediaSession::SimulatePositionChanged(
    const std::optional<MediaPosition>& position) {}

void MockMediaSession::ClearAllImages() {}

void MockMediaSession::SetImagesOfType(mojom::MediaSessionImageType type,
                                       const std::vector<MediaImage>& images) {}

void MockMediaSession::EnableAction(mojom::MediaSessionAction action) {}

void MockMediaSession::DisableAction(mojom::MediaSessionAction action) {}

void MockMediaSession::SetState(mojom::MediaSessionInfo::SessionState state) {}

void MockMediaSession::NotifyObservers() {}

mojom::MediaSessionInfoPtr MockMediaSession::GetMediaSessionInfoSync() const {}

void MockMediaSession::NotifyActionObservers() {}

void MockMediaSession::RequestAudioFocusFromClient(
    mojom::AudioFocusType audio_focus_type) {}

}  // namespace test
}  // namespace media_session