diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 3877bced472a..af28f359174c 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -1581,16 +1581,16 @@ ContentParent::RecvFirstIdle() } bool -ContentParent::RecvAudioChannelGetMuted(const AudioChannelType& aType, +ContentParent::RecvAudioChannelGetState(const AudioChannelType& aType, const bool& aElementHidden, const bool& aElementWasHidden, - bool* aValue) + AudioChannelState* aState) { nsRefPtr service = AudioChannelService::GetAudioChannelService(); - *aValue = false; + *aState = AUDIO_CHANNEL_STATE_NORMAL; if (service) { - *aValue = service->GetMutedInternal(aType, mChildID, + *aState = service->GetStateInternal(aType, mChildID, aElementHidden, aElementWasHidden); } return true; diff --git a/dom/ipc/ContentParent.h b/dom/ipc/ContentParent.h index 2e09b01ad617..225343b5cde2 100644 --- a/dom/ipc/ContentParent.h +++ b/dom/ipc/ContentParent.h @@ -414,10 +414,10 @@ private: virtual bool RecvFirstIdle(); - virtual bool RecvAudioChannelGetMuted(const AudioChannelType& aType, + virtual bool RecvAudioChannelGetState(const AudioChannelType& aType, const bool& aElementHidden, const bool& aElementWasHidden, - bool* aValue); + AudioChannelState* aValue); virtual bool RecvAudioChannelRegisterType(const AudioChannelType& aType); virtual bool RecvAudioChannelUnregisterType(const AudioChannelType& aType, diff --git a/dom/ipc/PContent.ipdl b/dom/ipc/PContent.ipdl index dd0fde319908..f749793cd792 100644 --- a/dom/ipc/PContent.ipdl +++ b/dom/ipc/PContent.ipdl @@ -50,6 +50,7 @@ using IPC::Principal; using mozilla::null_t; using mozilla::void_t; using mozilla::dom::AudioChannelType; +using mozilla::dom::AudioChannelState; using mozilla::dom::BlobConstructorParams; using mozilla::dom::NativeThreadId; using mozilla::hal::ProcessPriority; @@ -436,9 +437,9 @@ parent: async FirstIdle(); // Get Muted from the main AudioChannelService. - sync AudioChannelGetMuted(AudioChannelType aType, bool aElementHidden, + sync AudioChannelGetState(AudioChannelType aType, bool aElementHidden, bool aElementWasHidden) - returns (bool value); + returns (AudioChannelState value); sync AudioChannelRegisterType(AudioChannelType aType); sync AudioChannelUnregisterType(AudioChannelType aType, diff --git a/dom/ipc/TabMessageUtils.h b/dom/ipc/TabMessageUtils.h index f727c75717d7..b3f73cc1fca6 100644 --- a/dom/ipc/TabMessageUtils.h +++ b/dom/ipc/TabMessageUtils.h @@ -65,6 +65,13 @@ struct ParamTraits mozilla::dom::AUDIO_CHANNEL_LAST> { }; +template <> +struct ParamTraits + : public EnumSerializer +{ }; + }