#include "services/media_session/media_controller.h"
#include <optional>
#include <set>
#include <variant>
#include <vector>
#include "base/containers/contains.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "services/media_session/audio_focus_request.h"
#include "services/media_session/public/cpp/chapter_information.h"
#include "services/media_session/public/cpp/media_image_manager.h"
#include "services/media_session/public/mojom/media_session.mojom-shared.h"
#include "services/media_session/public/mojom/media_session.mojom.h"
namespace media_session {
namespace {
ChapterMap;
ImagesVariant;
}
class MediaController::ImageObserverHolder { … };
MediaController::MediaController() { … }
MediaController::~MediaController() = default;
void MediaController::Suspend() { … }
void MediaController::Resume() { … }
void MediaController::Stop() { … }
void MediaController::ToggleSuspendResume() { … }
void MediaController::AddObserver(
mojo::PendingRemote<mojom::MediaControllerObserver> observer) { … }
void MediaController::MediaSessionInfoChanged(mojom::MediaSessionInfoPtr info) { … }
void MediaController::MediaSessionMetadataChanged(
const std::optional<MediaMetadata>& metadata) { … }
void MediaController::MediaSessionActionsChanged(
const std::vector<mojom::MediaSessionAction>& actions) { … }
void MediaController::MediaSessionPositionChanged(
const std::optional<media_session::MediaPosition>& position) { … }
void MediaController::MediaSessionImagesChanged(
const base::flat_map<mojom::MediaSessionImageType, std::vector<MediaImage>>&
images) { … }
void MediaController::PreviousTrack() { … }
void MediaController::NextTrack() { … }
void MediaController::Seek(base::TimeDelta seek_time) { … }
void MediaController::SkipAd() { … }
void MediaController::ObserveImages(
mojom::MediaSessionImageType type,
int minimum_size_px,
int desired_size_px,
mojo::PendingRemote<mojom::MediaControllerImageObserver> observer) { … }
void MediaController::SeekTo(base::TimeDelta seek_time) { … }
void MediaController::ScrubTo(base::TimeDelta seek_time) { … }
void MediaController::EnterPictureInPicture() { … }
void MediaController::ExitPictureInPicture() { … }
void MediaController::SetAudioSinkId(const std::optional<std::string>& id) { … }
void MediaController::ToggleMicrophone() { … }
void MediaController::ToggleCamera() { … }
void MediaController::HangUp() { … }
void MediaController::Raise() { … }
void MediaController::SetMute(bool mute) { … }
void MediaController::RequestMediaRemoting() { … }
void MediaController::EnterAutoPictureInPicture() { … }
void MediaController::SetMediaSession(AudioFocusRequest* session) { … }
void MediaController::ClearMediaSession() { … }
void MediaController::BindToInterface(
mojo::PendingReceiver<mojom::MediaController> receiver) { … }
void MediaController::FlushForTesting() { … }
void MediaController::CleanupImageObservers() { … }
void MediaController::Reset() { … }
}