зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1620113 - part3 : rename function names to explicitly mention that they're used for main controller. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D66856 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
18fec441a6
Коммит
3e6d700352
|
@ -197,7 +197,7 @@ void MediaControlService::ControllerManager::Shutdown() {
|
|||
DisconnectMainControllerEvents();
|
||||
}
|
||||
|
||||
void MediaControlService::ControllerManager::ControllerPlaybackStateChanged(
|
||||
void MediaControlService::ControllerManager::MainControllerPlaybackStateChanged(
|
||||
MediaSessionPlaybackState aState) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
mSource->SetPlaybackState(aState);
|
||||
|
@ -209,7 +209,7 @@ void MediaControlService::ControllerManager::ControllerPlaybackStateChanged(
|
|||
}
|
||||
}
|
||||
|
||||
void MediaControlService::ControllerManager::ControllerMetadataChanged(
|
||||
void MediaControlService::ControllerManager::MainControllerMetadataChanged(
|
||||
const MediaMetadataBase& aMetadata) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
mSource->SetMediaMetadata(aMetadata);
|
||||
|
@ -246,10 +246,10 @@ void MediaControlService::ControllerManager::ConnectToMainControllerEvents() {
|
|||
mPlayStateChangedListener =
|
||||
mMainController->PlaybackStateChangedEvent().Connect(
|
||||
AbstractThread::MainThread(), this,
|
||||
&ControllerManager::ControllerPlaybackStateChanged);
|
||||
&ControllerManager::MainControllerPlaybackStateChanged);
|
||||
mMetadataChangedListener = mMainController->MetadataChangedEvent().Connect(
|
||||
AbstractThread::MainThread(), this,
|
||||
&ControllerManager::ControllerMetadataChanged);
|
||||
&ControllerManager::MainControllerMetadataChanged);
|
||||
|
||||
// Update controller's current status to the event source.
|
||||
mSource->SetPlaybackState(mMainController->GetState());
|
||||
|
|
|
@ -101,9 +101,9 @@ class MediaControlService final : public nsIObserver {
|
|||
MediaController* GetControllerById(uint64_t aId) const;
|
||||
uint64_t GetControllersNum() const;
|
||||
|
||||
// Callback functions for monitoring main controller's status change.
|
||||
void ControllerPlaybackStateChanged(MediaSessionPlaybackState aState);
|
||||
void ControllerMetadataChanged(const MediaMetadataBase& aMetadata);
|
||||
// These functions are used for monitoring main controller's status change.
|
||||
void MainControllerPlaybackStateChanged(MediaSessionPlaybackState aState);
|
||||
void MainControllerMetadataChanged(const MediaMetadataBase& aMetadata);
|
||||
|
||||
private:
|
||||
void UpdateMainController(MediaController* aController);
|
||||
|
|
Загрузка…
Ссылка в новой задаче