зеркало из https://github.com/mozilla/gecko-dev.git
Bug 823273 - Part 2: Music volume should be faded when notification sound is on going - IPC changes. r=baku
This commit is contained in:
Родитель
aef0c55ac6
Коммит
97bcdc43ea
|
@ -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<AudioChannelService> 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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -65,6 +65,13 @@ struct ParamTraits<mozilla::dom::AudioChannelType>
|
|||
mozilla::dom::AUDIO_CHANNEL_LAST>
|
||||
{ };
|
||||
|
||||
template <>
|
||||
struct ParamTraits<mozilla::dom::AudioChannelState>
|
||||
: public EnumSerializer<mozilla::dom::AudioChannelState,
|
||||
mozilla::dom::AUDIO_CHANNEL_STATE_NORMAL,
|
||||
mozilla::dom::AUDIO_CHANNEL_STATE_LAST>
|
||||
{ };
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче