зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1458383 - Don't dispatch mediaBlockStop notification. r=baku
This is a partial backout of Bug 1347791 part 3; a5fbb7e2d1d0. We don't need to track in the front end code when a tab is foregrounded, so we don't need to dispatch this message any more. MozReview-Commit-ID: 6M0n9Ik65vE --HG-- extra : rebase_source : 37ca839bdf9f323b11e010df643c31f895c602f5
This commit is contained in:
Родитель
9ce68d24d6
Коммит
81473d18de
|
@ -791,25 +791,9 @@ AudioChannelService::AudioChannelWindow::RemoveAgent(AudioChannelAgent* aAgent)
|
|||
void
|
||||
AudioChannelService::AudioChannelWindow::NotifyMediaBlockStop(nsPIDOMWindowOuter* aWindow)
|
||||
{
|
||||
// Can't use raw pointer for lamba variable capturing, use smart ptr.
|
||||
nsCOMPtr<nsPIDOMWindowOuter> window = aWindow;
|
||||
NS_DispatchToCurrentThread(NS_NewRunnableFunction(
|
||||
"dom::AudioChannelService::AudioChannelWindow::NotifyMediaBlockStop",
|
||||
[window]() -> void {
|
||||
nsCOMPtr<nsIObserverService> observerService =
|
||||
services::GetObserverService();
|
||||
if (NS_WARN_IF(!observerService)) {
|
||||
return;
|
||||
}
|
||||
|
||||
observerService->NotifyObservers(ToSupports(window),
|
||||
"audio-playback",
|
||||
u"mediaBlockStop");
|
||||
})
|
||||
);
|
||||
|
||||
if (mShouldSendActiveMediaBlockStopEvent) {
|
||||
mShouldSendActiveMediaBlockStopEvent = false;
|
||||
nsCOMPtr<nsPIDOMWindowOuter> window = aWindow;
|
||||
NS_DispatchToCurrentThread(NS_NewRunnableFunction(
|
||||
"dom::AudioChannelService::AudioChannelWindow::NotifyMediaBlockStop",
|
||||
[window]() -> void {
|
||||
|
|
Загрузка…
Ссылка в новой задаче