Bug 1513733 - part1 : rename 'NotifyScheduledSourceNodeStarted()' r=karlt

In order to call this method on other situations, rename it to 'StartBlockedAudioContextIfAllowed()'.

Differential Revision: https://phabricator.services.mozilla.com/D14592

--HG--
extra : moz-landing-system : lando
This commit is contained in:
alwu 2019-01-11 20:42:02 +00:00
Родитель 4676fc4f15
Коммит 38e9580406
5 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -705,7 +705,7 @@ void AudioBufferSourceNode::Start(double aWhen, double aOffset,
ns->SetDoubleParameter(START, aWhen);
}
Context()->NotifyScheduledSourceNodeStarted();
Context()->StartBlockedAudioContextIfAllowed();
}
void AudioBufferSourceNode::Start(double aWhen, ErrorResult& aRv) {

Просмотреть файл

@ -183,7 +183,7 @@ AudioContext::AudioContext(nsPIDOMWindowInner* aWindow, bool aIsOffline,
FFTBlock::MainThreadInit();
}
void AudioContext::NotifyScheduledSourceNodeStarted() {
void AudioContext::StartBlockedAudioContextIfAllowed() {
MOZ_ASSERT(NS_IsMainThread());
MaybeUpdateAutoplayTelemetry();
// Only try to start AudioContext when AudioContext was not allowed to start.

Просмотреть файл

@ -185,7 +185,7 @@ class AudioContext final : public DOMEventTargetHelper,
// Called when an AudioScheduledSourceNode started, this method might resume
// the AudioContext if it was not allowed to start.
void NotifyScheduledSourceNodeStarted();
void StartBlockedAudioContextIfAllowed();
// Those three methods return a promise to content, that is resolved when an
// (possibly long) operation is completed on the MSG (and possibly other)

Просмотреть файл

@ -224,7 +224,7 @@ void ConstantSourceNode::Start(double aWhen, ErrorResult& aRv) {
aWhen);
MarkActive();
Context()->NotifyScheduledSourceNodeStarted();
Context()->StartBlockedAudioContextIfAllowed();
}
void ConstantSourceNode::Stop(double aWhen, ErrorResult& aRv) {

Просмотреть файл

@ -488,7 +488,7 @@ void OscillatorNode::Start(double aWhen, ErrorResult& aRv) {
aWhen);
MarkActive();
Context()->NotifyScheduledSourceNodeStarted();
Context()->StartBlockedAudioContextIfAllowed();
}
void OscillatorNode::Stop(double aWhen, ErrorResult& aRv) {