void AudioChannelServiceChild::UnregisterAudioChannelAgent(AudioChannelAgent* aAgent) { AudioChannelType type; if (!mAgents.Get(aAgent, &type)) { return; } AudioChannelService::UnregisterAudioChannelAgent(aAgent); ContentChild *cc = ContentChild::GetSingleton(); if (cc) { cc->SendAudioChannelUnregisterType(type); } }
void AudioChannelServiceChild::UnregisterAudioChannelAgent(AudioChannelAgent* aAgent) { AudioChannelType type; if (!mAgents.Get(aAgent, &type)) { return; } AudioChannelService::UnregisterAudioChannelAgent(aAgent); ContentChild *cc = ContentChild::GetSingleton(); if (cc) { cc->SendAudioChannelUnregisterType(type); } nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService(); if (obs) { obs->NotifyObservers(nullptr, "audio-channel-agent-changed", nullptr); } }
void AudioChannelServiceChild::UnregisterAudioChannelAgent(AudioChannelAgent* aAgent) { AudioChannelAgentData *pData; if (!mAgents.Get(aAgent, &pData)) { return; } // We need to keep a copy because unregister will remove the // AudioChannelAgentData object from the hashtable. AudioChannelAgentData data(*pData); AudioChannelService::UnregisterAudioChannelAgent(aAgent); ContentChild *cc = ContentChild::GetSingleton(); if (cc) { cc->SendAudioChannelUnregisterType(data.mType, data.mElementHidden); } nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService(); if (obs) { obs->NotifyObservers(nullptr, "audio-channel-agent-changed", nullptr); } }