webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
WebCore::PlatformMediaSessionManager Class Reference

#include <PlatformMediaSessionManager.h>

Inheritance diagram for WebCore::PlatformMediaSessionManager:
WebCore::RemoteCommandListenerClient WebCore::SystemSleepListener::Client WebCore::AudioHardwareListener::Client WebCore::RemoteCommandListenerClient WebCore::SystemSleepListener::Client WebCore::AudioHardwareListener::Client

Public Types

enum  SessionRestrictionFlags {
  NoRestrictions = 0, ConcurrentPlaybackNotPermitted = 1 << 0, BackgroundProcessPlaybackRestricted = 1 << 1, BackgroundTabPlaybackRestricted = 1 << 2,
  InterruptedPlaybackNotPermitted = 1 << 3, NoRestrictions = 0, ConcurrentPlaybackNotPermitted = 1 << 0, BackgroundProcessPlaybackRestricted = 1 << 1,
  BackgroundTabPlaybackRestricted = 1 << 2, InterruptedPlaybackNotPermitted = 1 << 3
}
 
enum  SessionRestrictionFlags {
  NoRestrictions = 0, ConcurrentPlaybackNotPermitted = 1 << 0, BackgroundProcessPlaybackRestricted = 1 << 1, BackgroundTabPlaybackRestricted = 1 << 2,
  InterruptedPlaybackNotPermitted = 1 << 3, NoRestrictions = 0, ConcurrentPlaybackNotPermitted = 1 << 0, BackgroundProcessPlaybackRestricted = 1 << 1,
  BackgroundTabPlaybackRestricted = 1 << 2, InterruptedPlaybackNotPermitted = 1 << 3
}
 
typedef unsigned SessionRestrictions
 
typedef unsigned SessionRestrictions
 

Public Member Functions

virtual ~PlatformMediaSessionManager ()
 
virtual void scheduleUpdateNowPlayingInfo ()
 
bool has (PlatformMediaSession::MediaType) const
 
int count (PlatformMediaSession::MediaType) const
 
bool activeAudioSessionRequired () const
 
bool canProduceAudio () const
 
virtual WEBCORE_EXPORT bool hasActiveNowPlayingSession () const
 
virtual WEBCORE_EXPORT String lastUpdatedNowPlayingTitle () const
 
virtual WEBCORE_EXPORT double lastUpdatedNowPlayingDuration () const
 
virtual WEBCORE_EXPORT double lastUpdatedNowPlayingElapsedTime () const
 
bool willIgnoreSystemInterruptions () const
 
void setWillIgnoreSystemInterruptions (bool ignore)
 
WEBCORE_EXPORT void beginInterruption (PlatformMediaSession::InterruptionType)
 
WEBCORE_EXPORT void endInterruption (PlatformMediaSession::EndInterruptionFlags)
 
WEBCORE_EXPORT void applicationDidEnterForeground () const
 
WEBCORE_EXPORT void applicationWillEnterBackground () const
 
void stopAllMediaPlaybackForDocument (const Document *)
 
WEBCORE_EXPORT void stopAllMediaPlaybackForProcess ()
 
WEBCORE_EXPORT void addRestriction (PlatformMediaSession::MediaType, SessionRestrictions)
 
WEBCORE_EXPORT void removeRestriction (PlatformMediaSession::MediaType, SessionRestrictions)
 
WEBCORE_EXPORT SessionRestrictions restrictions (PlatformMediaSession::MediaType)
 
virtual void resetRestrictions ()
 
virtual bool sessionWillBeginPlayback (PlatformMediaSession &)
 
virtual void sessionWillEndPlayback (PlatformMediaSession &)
 
virtual bool sessionCanLoadMedia (const PlatformMediaSession &) const
 
virtual void sessionDidEndRemoteScrubbing (const PlatformMediaSession &)
 
virtual void clientCharacteristicsChanged (PlatformMediaSession &)
 
void setCurrentSession (PlatformMediaSession &)
 
PlatformMediaSessioncurrentSession () const
 
Vector< PlatformMediaSession * > currentSessionsMatching (std::function< bool(const PlatformMediaSession &)>)
 
void sessionIsPlayingToWirelessPlaybackTargetChanged (PlatformMediaSession &)
 
void sessionCanProduceAudioChanged (PlatformMediaSession &)
 
virtual ~PlatformMediaSessionManager ()
 
virtual void scheduleUpdateNowPlayingInfo ()
 
bool has (PlatformMediaSession::MediaType) const
 
int count (PlatformMediaSession::MediaType) const
 
bool activeAudioSessionRequired () const
 
bool canProduceAudio () const
 
virtual WEBCORE_EXPORT bool hasActiveNowPlayingSession () const
 
virtual WEBCORE_EXPORT String lastUpdatedNowPlayingTitle () const
 
virtual WEBCORE_EXPORT double lastUpdatedNowPlayingDuration () const
 
virtual WEBCORE_EXPORT double lastUpdatedNowPlayingElapsedTime () const
 
bool willIgnoreSystemInterruptions () const
 
void setWillIgnoreSystemInterruptions (bool ignore)
 
WEBCORE_EXPORT void beginInterruption (PlatformMediaSession::InterruptionType)
 
WEBCORE_EXPORT void endInterruption (PlatformMediaSession::EndInterruptionFlags)
 
WEBCORE_EXPORT void applicationDidEnterForeground () const
 
WEBCORE_EXPORT void applicationWillEnterBackground () const
 
void stopAllMediaPlaybackForDocument (const Document *)
 
WEBCORE_EXPORT void stopAllMediaPlaybackForProcess ()
 
WEBCORE_EXPORT void addRestriction (PlatformMediaSession::MediaType, SessionRestrictions)
 
WEBCORE_EXPORT void removeRestriction (PlatformMediaSession::MediaType, SessionRestrictions)
 
WEBCORE_EXPORT SessionRestrictions restrictions (PlatformMediaSession::MediaType)
 
virtual void resetRestrictions ()
 
virtual bool sessionWillBeginPlayback (PlatformMediaSession &)
 
virtual void sessionWillEndPlayback (PlatformMediaSession &)
 
virtual bool sessionCanLoadMedia (const PlatformMediaSession &) const
 
virtual void sessionDidEndRemoteScrubbing (const PlatformMediaSession &)
 
virtual void clientCharacteristicsChanged (PlatformMediaSession &)
 
void setCurrentSession (PlatformMediaSession &)
 
PlatformMediaSessioncurrentSession () const
 
Vector< PlatformMediaSession * > currentSessionsMatching (std::function< bool(const PlatformMediaSession &)>)
 
void sessionIsPlayingToWirelessPlaybackTargetChanged (PlatformMediaSession &)
 
void sessionCanProduceAudioChanged (PlatformMediaSession &)
 

Static Public Member Functions

static WEBCORE_EXPORT PlatformMediaSessionManagersharedManagerIfExists ()
 
static WEBCORE_EXPORT PlatformMediaSessionManagersharedManager ()
 
static void updateNowPlayingInfoIfNecessary ()
 
static WEBCORE_EXPORT PlatformMediaSessionManagersharedManagerIfExists ()
 
static WEBCORE_EXPORT PlatformMediaSessionManagersharedManager ()
 
static void updateNowPlayingInfoIfNecessary ()
 

Protected Member Functions

 PlatformMediaSessionManager ()
 
void addSession (PlatformMediaSession &)
 
virtual void removeSession (PlatformMediaSession &)
 
void forEachSession (const Function< void(PlatformMediaSession &, size_t)> &) const
 
PlatformMediaSessionfindSession (const Function< bool(PlatformMediaSession &, size_t)> &) const
 
bool anyOfSessions (const Function< bool(PlatformMediaSession &, size_t)> &predicate) const
 
 PlatformMediaSessionManager ()
 
void addSession (PlatformMediaSession &)
 
virtual void removeSession (PlatformMediaSession &)
 
void forEachSession (const Function< void(PlatformMediaSession &, size_t)> &) const
 
PlatformMediaSessionfindSession (const Function< bool(PlatformMediaSession &, size_t)> &) const
 
bool anyOfSessions (const Function< bool(PlatformMediaSession &, size_t)> &predicate) const
 

Friends

class PlatformMediaSession
 
class Internals
 

Member Typedef Documentation

◆ SessionRestrictions [1/2]

◆ SessionRestrictions [2/2]

Member Enumeration Documentation

◆ SessionRestrictionFlags [1/2]

Enumerator
NoRestrictions 
ConcurrentPlaybackNotPermitted 
BackgroundProcessPlaybackRestricted 
BackgroundTabPlaybackRestricted 
InterruptedPlaybackNotPermitted 
NoRestrictions 
ConcurrentPlaybackNotPermitted 
BackgroundProcessPlaybackRestricted 
BackgroundTabPlaybackRestricted 
InterruptedPlaybackNotPermitted 

◆ SessionRestrictionFlags [2/2]

Enumerator
NoRestrictions 
ConcurrentPlaybackNotPermitted 
BackgroundProcessPlaybackRestricted 
BackgroundTabPlaybackRestricted 
InterruptedPlaybackNotPermitted 
NoRestrictions 
ConcurrentPlaybackNotPermitted 
BackgroundProcessPlaybackRestricted 
BackgroundTabPlaybackRestricted 
InterruptedPlaybackNotPermitted 

Constructor & Destructor Documentation

◆ ~PlatformMediaSessionManager() [1/2]

virtual WebCore::PlatformMediaSessionManager::~PlatformMediaSessionManager ( )
inlinevirtual

◆ PlatformMediaSessionManager() [1/2]

WebCore::PlatformMediaSessionManager::PlatformMediaSessionManager ( )
explicitprotected

◆ ~PlatformMediaSessionManager() [2/2]

virtual WebCore::PlatformMediaSessionManager::~PlatformMediaSessionManager ( )
inlinevirtual

◆ PlatformMediaSessionManager() [2/2]

WebCore::PlatformMediaSessionManager::PlatformMediaSessionManager ( )
explicitprotected

Member Function Documentation

◆ activeAudioSessionRequired() [1/2]

bool WebCore::PlatformMediaSessionManager::activeAudioSessionRequired ( ) const

◆ activeAudioSessionRequired() [2/2]

bool WebCore::PlatformMediaSessionManager::activeAudioSessionRequired ( ) const

◆ addRestriction() [1/2]

WEBCORE_EXPORT void WebCore::PlatformMediaSessionManager::addRestriction ( PlatformMediaSession::MediaType  ,
SessionRestrictions   
)

◆ addRestriction() [2/2]

WEBCORE_EXPORT void WebCore::PlatformMediaSessionManager::addRestriction ( PlatformMediaSession::MediaType  ,
SessionRestrictions   
)

◆ addSession() [1/2]

void WebCore::PlatformMediaSessionManager::addSession ( PlatformMediaSession )
protected

◆ addSession() [2/2]

void WebCore::PlatformMediaSessionManager::addSession ( PlatformMediaSession )
protected

◆ anyOfSessions() [1/2]

bool WebCore::PlatformMediaSessionManager::anyOfSessions ( const Function< bool(PlatformMediaSession &, size_t)> &  predicate) const
inlineprotected

◆ anyOfSessions() [2/2]

bool WebCore::PlatformMediaSessionManager::anyOfSessions ( const Function< bool(PlatformMediaSession &, size_t)> &  predicate) const
inlineprotected

◆ applicationDidEnterForeground() [1/2]

WEBCORE_EXPORT void WebCore::PlatformMediaSessionManager::applicationDidEnterForeground ( ) const

◆ applicationDidEnterForeground() [2/2]

WEBCORE_EXPORT void WebCore::PlatformMediaSessionManager::applicationDidEnterForeground ( ) const

◆ applicationWillEnterBackground() [1/2]

WEBCORE_EXPORT void WebCore::PlatformMediaSessionManager::applicationWillEnterBackground ( ) const

◆ applicationWillEnterBackground() [2/2]

WEBCORE_EXPORT void WebCore::PlatformMediaSessionManager::applicationWillEnterBackground ( ) const

◆ beginInterruption() [1/2]

WEBCORE_EXPORT void WebCore::PlatformMediaSessionManager::beginInterruption ( PlatformMediaSession::InterruptionType  )

◆ beginInterruption() [2/2]

WEBCORE_EXPORT void WebCore::PlatformMediaSessionManager::beginInterruption ( PlatformMediaSession::InterruptionType  )

◆ canProduceAudio() [1/2]

bool WebCore::PlatformMediaSessionManager::canProduceAudio ( ) const

◆ canProduceAudio() [2/2]

bool WebCore::PlatformMediaSessionManager::canProduceAudio ( ) const

◆ clientCharacteristicsChanged() [1/2]

virtual void WebCore::PlatformMediaSessionManager::clientCharacteristicsChanged ( PlatformMediaSession )
inlinevirtual

◆ clientCharacteristicsChanged() [2/2]

virtual void WebCore::PlatformMediaSessionManager::clientCharacteristicsChanged ( PlatformMediaSession )
inlinevirtual

◆ count() [1/2]

int WebCore::PlatformMediaSessionManager::count ( PlatformMediaSession::MediaType  ) const

◆ count() [2/2]

int WebCore::PlatformMediaSessionManager::count ( PlatformMediaSession::MediaType  ) const

◆ currentSession() [1/2]

PlatformMediaSession* WebCore::PlatformMediaSessionManager::currentSession ( ) const

◆ currentSession() [2/2]

PlatformMediaSession* WebCore::PlatformMediaSessionManager::currentSession ( ) const

◆ currentSessionsMatching() [1/2]

Vector<PlatformMediaSession*> WebCore::PlatformMediaSessionManager::currentSessionsMatching ( std::function< bool(const PlatformMediaSession &)>  )

◆ currentSessionsMatching() [2/2]

Vector<PlatformMediaSession*> WebCore::PlatformMediaSessionManager::currentSessionsMatching ( std::function< bool(const PlatformMediaSession &)>  )

◆ endInterruption() [1/2]

WEBCORE_EXPORT void WebCore::PlatformMediaSessionManager::endInterruption ( PlatformMediaSession::EndInterruptionFlags  )

◆ endInterruption() [2/2]

WEBCORE_EXPORT void WebCore::PlatformMediaSessionManager::endInterruption ( PlatformMediaSession::EndInterruptionFlags  )

◆ findSession() [1/2]

PlatformMediaSession* WebCore::PlatformMediaSessionManager::findSession ( const Function< bool(PlatformMediaSession &, size_t)> &  ) const
protected

◆ findSession() [2/2]

PlatformMediaSession* WebCore::PlatformMediaSessionManager::findSession ( const Function< bool(PlatformMediaSession &, size_t)> &  ) const
protected

◆ forEachSession() [1/2]

void WebCore::PlatformMediaSessionManager::forEachSession ( const Function< void(PlatformMediaSession &, size_t)> &  ) const
protected

◆ forEachSession() [2/2]

void WebCore::PlatformMediaSessionManager::forEachSession ( const Function< void(PlatformMediaSession &, size_t)> &  ) const
protected

◆ has() [1/2]

bool WebCore::PlatformMediaSessionManager::has ( PlatformMediaSession::MediaType  ) const

◆ has() [2/2]

bool WebCore::PlatformMediaSessionManager::has ( PlatformMediaSession::MediaType  ) const

◆ hasActiveNowPlayingSession() [1/2]

virtual WEBCORE_EXPORT bool WebCore::PlatformMediaSessionManager::hasActiveNowPlayingSession ( ) const
inlinevirtual

◆ hasActiveNowPlayingSession() [2/2]

virtual WEBCORE_EXPORT bool WebCore::PlatformMediaSessionManager::hasActiveNowPlayingSession ( ) const
inlinevirtual

◆ lastUpdatedNowPlayingDuration() [1/2]

virtual WEBCORE_EXPORT double WebCore::PlatformMediaSessionManager::lastUpdatedNowPlayingDuration ( ) const
inlinevirtual

◆ lastUpdatedNowPlayingDuration() [2/2]

virtual WEBCORE_EXPORT double WebCore::PlatformMediaSessionManager::lastUpdatedNowPlayingDuration ( ) const
inlinevirtual

◆ lastUpdatedNowPlayingElapsedTime() [1/2]

virtual WEBCORE_EXPORT double WebCore::PlatformMediaSessionManager::lastUpdatedNowPlayingElapsedTime ( ) const
inlinevirtual

◆ lastUpdatedNowPlayingElapsedTime() [2/2]

virtual WEBCORE_EXPORT double WebCore::PlatformMediaSessionManager::lastUpdatedNowPlayingElapsedTime ( ) const
inlinevirtual

◆ lastUpdatedNowPlayingTitle() [1/2]

virtual WEBCORE_EXPORT String WebCore::PlatformMediaSessionManager::lastUpdatedNowPlayingTitle ( ) const
inlinevirtual

◆ lastUpdatedNowPlayingTitle() [2/2]

virtual WEBCORE_EXPORT String WebCore::PlatformMediaSessionManager::lastUpdatedNowPlayingTitle ( ) const
inlinevirtual

◆ removeRestriction() [1/2]

WEBCORE_EXPORT void WebCore::PlatformMediaSessionManager::removeRestriction ( PlatformMediaSession::MediaType  ,
SessionRestrictions   
)

◆ removeRestriction() [2/2]

WEBCORE_EXPORT void WebCore::PlatformMediaSessionManager::removeRestriction ( PlatformMediaSession::MediaType  ,
SessionRestrictions   
)

◆ removeSession() [1/2]

virtual void WebCore::PlatformMediaSessionManager::removeSession ( PlatformMediaSession )
protectedvirtual

◆ removeSession() [2/2]

virtual void WebCore::PlatformMediaSessionManager::removeSession ( PlatformMediaSession )
protectedvirtual

◆ resetRestrictions() [1/2]

virtual void WebCore::PlatformMediaSessionManager::resetRestrictions ( )
virtual

◆ resetRestrictions() [2/2]

virtual void WebCore::PlatformMediaSessionManager::resetRestrictions ( )
virtual

◆ restrictions() [1/2]

WEBCORE_EXPORT SessionRestrictions WebCore::PlatformMediaSessionManager::restrictions ( PlatformMediaSession::MediaType  )

◆ restrictions() [2/2]

WEBCORE_EXPORT SessionRestrictions WebCore::PlatformMediaSessionManager::restrictions ( PlatformMediaSession::MediaType  )

◆ scheduleUpdateNowPlayingInfo() [1/2]

virtual void WebCore::PlatformMediaSessionManager::scheduleUpdateNowPlayingInfo ( )
inlinevirtual

◆ scheduleUpdateNowPlayingInfo() [2/2]

virtual void WebCore::PlatformMediaSessionManager::scheduleUpdateNowPlayingInfo ( )
inlinevirtual

◆ sessionCanLoadMedia() [1/2]

virtual bool WebCore::PlatformMediaSessionManager::sessionCanLoadMedia ( const PlatformMediaSession ) const
virtual

◆ sessionCanLoadMedia() [2/2]

virtual bool WebCore::PlatformMediaSessionManager::sessionCanLoadMedia ( const PlatformMediaSession ) const
virtual

◆ sessionCanProduceAudioChanged() [1/2]

void WebCore::PlatformMediaSessionManager::sessionCanProduceAudioChanged ( PlatformMediaSession )

◆ sessionCanProduceAudioChanged() [2/2]

void WebCore::PlatformMediaSessionManager::sessionCanProduceAudioChanged ( PlatformMediaSession )

◆ sessionDidEndRemoteScrubbing() [1/2]

virtual void WebCore::PlatformMediaSessionManager::sessionDidEndRemoteScrubbing ( const PlatformMediaSession )
inlinevirtual

◆ sessionDidEndRemoteScrubbing() [2/2]

virtual void WebCore::PlatformMediaSessionManager::sessionDidEndRemoteScrubbing ( const PlatformMediaSession )
inlinevirtual

◆ sessionIsPlayingToWirelessPlaybackTargetChanged() [1/2]

void WebCore::PlatformMediaSessionManager::sessionIsPlayingToWirelessPlaybackTargetChanged ( PlatformMediaSession )

◆ sessionIsPlayingToWirelessPlaybackTargetChanged() [2/2]

void WebCore::PlatformMediaSessionManager::sessionIsPlayingToWirelessPlaybackTargetChanged ( PlatformMediaSession )

◆ sessionWillBeginPlayback() [1/2]

virtual bool WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback ( PlatformMediaSession )
virtual

◆ sessionWillBeginPlayback() [2/2]

virtual bool WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback ( PlatformMediaSession )
virtual

◆ sessionWillEndPlayback() [1/2]

virtual void WebCore::PlatformMediaSessionManager::sessionWillEndPlayback ( PlatformMediaSession )
virtual

◆ sessionWillEndPlayback() [2/2]

virtual void WebCore::PlatformMediaSessionManager::sessionWillEndPlayback ( PlatformMediaSession )
virtual

◆ setCurrentSession() [1/2]

void WebCore::PlatformMediaSessionManager::setCurrentSession ( PlatformMediaSession )

◆ setCurrentSession() [2/2]

void WebCore::PlatformMediaSessionManager::setCurrentSession ( PlatformMediaSession )

◆ setWillIgnoreSystemInterruptions() [1/2]

void WebCore::PlatformMediaSessionManager::setWillIgnoreSystemInterruptions ( bool  ignore)
inline

◆ setWillIgnoreSystemInterruptions() [2/2]

void WebCore::PlatformMediaSessionManager::setWillIgnoreSystemInterruptions ( bool  ignore)
inline

◆ sharedManager() [1/2]

static WEBCORE_EXPORT PlatformMediaSessionManager& WebCore::PlatformMediaSessionManager::sharedManager ( )
static

◆ sharedManager() [2/2]

static WEBCORE_EXPORT PlatformMediaSessionManager& WebCore::PlatformMediaSessionManager::sharedManager ( )
static

◆ sharedManagerIfExists() [1/2]

static WEBCORE_EXPORT PlatformMediaSessionManager* WebCore::PlatformMediaSessionManager::sharedManagerIfExists ( )
static

◆ sharedManagerIfExists() [2/2]

static WEBCORE_EXPORT PlatformMediaSessionManager* WebCore::PlatformMediaSessionManager::sharedManagerIfExists ( )
static

◆ stopAllMediaPlaybackForDocument() [1/2]

void WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForDocument ( const Document )

◆ stopAllMediaPlaybackForDocument() [2/2]

void WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForDocument ( const Document )

◆ stopAllMediaPlaybackForProcess() [1/2]

WEBCORE_EXPORT void WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForProcess ( )

◆ stopAllMediaPlaybackForProcess() [2/2]

WEBCORE_EXPORT void WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForProcess ( )

◆ updateNowPlayingInfoIfNecessary() [1/2]

void WebCore::PlatformMediaSessionManager::updateNowPlayingInfoIfNecessary ( )
static

◆ updateNowPlayingInfoIfNecessary() [2/2]

static void WebCore::PlatformMediaSessionManager::updateNowPlayingInfoIfNecessary ( )
static

◆ willIgnoreSystemInterruptions() [1/2]

bool WebCore::PlatformMediaSessionManager::willIgnoreSystemInterruptions ( ) const
inline

◆ willIgnoreSystemInterruptions() [2/2]

bool WebCore::PlatformMediaSessionManager::willIgnoreSystemInterruptions ( ) const
inline

Friends And Related Function Documentation

◆ Internals

Internals
friend

◆ PlatformMediaSession


The documentation for this class was generated from the following files: