bool AudioChannelServiceChild::GetMuted(AudioChannelAgent* aAgent, bool aElementHidden) { AudioChannelAgentData data; if (!mAgents.Get(aAgent, &data)) { return true; } ContentChild *cc = ContentChild::GetSingleton(); bool muted = true; if (cc) { cc->SendAudioChannelGetMuted(data.mType, aElementHidden, data.mElementHidden, &muted); } // Update visibility. if (data.mElementHidden != aElementHidden || data.mMuted != muted) { data.mElementHidden = aElementHidden; data.mMuted = muted; mAgents.Put(aAgent, data); } if (cc) { cc->SendAudioChannelChangedNotification(); } return muted; }
bool AudioChannelServiceChild::GetMuted(AudioChannelType aType, bool aMozHidden) { ContentChild *cc = ContentChild::GetSingleton(); bool muted = false; if (cc) { cc->SendAudioChannelGetMuted(aType, aMozHidden, &muted); } return muted; }