PlaybackSessionInterfaceMac.h [plain text]
#pragma once
#if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE)
#include "HTMLMediaElementEnums.h"
#include "PlaybackSessionInterface.h"
#include "PlaybackSessionModel.h"
#include <wtf/RefCounted.h>
#include <wtf/RetainPtr.h>
#include <wtf/WeakObjCPtr.h>
#include <wtf/WeakPtr.h>
#include <wtf/text/WTFString.h>
OBJC_CLASS WebPlaybackControlsManager;
namespace WebCore {
class IntRect;
class PlaybackSessionModel;
class WEBCORE_EXPORT PlaybackSessionInterfaceMac final
: public PlaybackSessionInterface
, public PlaybackSessionModelClient
, public RefCounted<PlaybackSessionInterfaceMac> {
public:
static Ref<PlaybackSessionInterfaceMac> create(PlaybackSessionModel&);
virtual ~PlaybackSessionInterfaceMac();
PlaybackSessionModel* playbackSessionModel() const;
void durationChanged(double) final;
void currentTimeChanged(double , double ) final;
void rateChanged(bool , float ) final;
void seekableRangesChanged(const TimeRanges&, double , double ) final;
void audioMediaSelectionOptionsChanged(const Vector<MediaSelectionOption>& , uint64_t ) final;
void legibleMediaSelectionOptionsChanged(const Vector<MediaSelectionOption>& , uint64_t ) final;
void audioMediaSelectionIndexChanged(uint64_t) final;
void legibleMediaSelectionIndexChanged(uint64_t) final;
void externalPlaybackChanged(bool , PlaybackSessionModel::ExternalPlaybackTargetType, const String& ) final;
void isPictureInPictureSupportedChanged(bool) final;
void invalidate();
void ensureControlsManager();
#if ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
void setPlayBackControlsManager(WebPlaybackControlsManager *);
WebPlaybackControlsManager *playBackControlsManager();
void updatePlaybackControlsManagerCanTogglePictureInPicture();
#endif
void beginScrubbing();
void endScrubbing();
private:
PlaybackSessionInterfaceMac(PlaybackSessionModel&);
WeakPtr<PlaybackSessionModel> m_playbackSessionModel;
#if ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
WeakObjCPtr<WebPlaybackControlsManager> m_playbackControlsManager;
void updatePlaybackControlsManagerTiming(double currentTime, double anchorTime, double playbackRate, bool isPlaying);
#endif
};
}
#endif // PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE)