зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1678373 - Remove mAudibleState. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D127559
This commit is contained in:
Родитель
53a1455dd0
Коммит
c6826b9fad
|
@ -159,20 +159,18 @@ void TelemetryProbesReporter::OnVisibilityChanged(Visibility aVisibility) {
|
||||||
|
|
||||||
void TelemetryProbesReporter::OnAudibleChanged(AudibleState aAudibleState) {
|
void TelemetryProbesReporter::OnAudibleChanged(AudibleState aAudibleState) {
|
||||||
AssertOnMainThreadAndNotShutdown();
|
AssertOnMainThreadAndNotShutdown();
|
||||||
LOG("Audibility changed: %s -> %s", ToAudibilityStr(mAudibleState),
|
LOG("Audibility changed, now %s", ToAudibilityStr(aAudibleState));
|
||||||
ToAudibilityStr(aAudibleState));
|
|
||||||
if (aAudibleState == AudibleState::eNotAudible) {
|
if (aAudibleState == AudibleState::eNotAudible) {
|
||||||
MOZ_ASSERT(mAudibleState == AudibleState::eAudible);
|
if (!mInaudibleAudioPlayTime.IsStarted()) {
|
||||||
StartInaudibleAudioTimeAccumulator();
|
StartInaudibleAudioTimeAccumulator();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
MOZ_ASSERT(mAudibleState == AudibleState::eNotAudible);
|
|
||||||
// This happens when starting playback, no need to pause, because it hasn't
|
// This happens when starting playback, no need to pause, because it hasn't
|
||||||
// been started yet.
|
// been started yet.
|
||||||
if (mInaudibleAudioPlayTime.IsStarted()) {
|
if (mInaudibleAudioPlayTime.IsStarted()) {
|
||||||
PauseInaudibleAudioTimeAccumulator();
|
PauseInaudibleAudioTimeAccumulator();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mAudibleState = aAudibleState;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TelemetryProbesReporter::OnMutedChanged(bool aMuted) {
|
void TelemetryProbesReporter::OnMutedChanged(bool aMuted) {
|
||||||
|
|
|
@ -154,8 +154,6 @@ class TelemetryProbesReporter final {
|
||||||
|
|
||||||
Visibility mMediaElementVisibility = Visibility::eInitial;
|
Visibility mMediaElementVisibility = Visibility::eInitial;
|
||||||
|
|
||||||
AudibleState mAudibleState = AudibleState::eNotAudible;
|
|
||||||
|
|
||||||
MediaContent mMediaContent = MediaContent::MEDIA_HAS_NOTHING;
|
MediaContent mMediaContent = MediaContent::MEDIA_HAS_NOTHING;
|
||||||
|
|
||||||
bool mIsPlaying = false;
|
bool mIsPlaying = false;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче