2015-05-03 22:32:37 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-12-04 23:46:07 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_dom_audiochannelservice_h__
|
|
|
|
#define mozilla_dom_audiochannelservice_h__
|
|
|
|
|
2015-07-10 19:38:44 +03:00
|
|
|
#include "nsIAudioChannelService.h"
|
2012-12-04 23:46:07 +04:00
|
|
|
#include "nsAutoPtr.h"
|
2012-12-28 21:57:35 +04:00
|
|
|
#include "nsIObserver.h"
|
2015-07-10 19:38:51 +03:00
|
|
|
#include "nsTObserverArray.h"
|
2013-03-17 11:55:16 +04:00
|
|
|
#include "nsTArray.h"
|
2012-12-04 23:46:07 +04:00
|
|
|
|
2012-12-06 19:25:18 +04:00
|
|
|
#include "AudioChannelAgent.h"
|
2014-04-10 21:39:20 +04:00
|
|
|
#include "nsAttrValue.h"
|
2014-03-20 14:45:55 +04:00
|
|
|
#include "mozilla/dom/AudioChannelBinding.h"
|
2016-05-03 04:52:38 +03:00
|
|
|
#include "mozilla/Function.h"
|
2012-12-04 23:46:07 +04:00
|
|
|
|
2014-06-25 09:15:12 +04:00
|
|
|
class nsIRunnable;
|
2016-01-30 20:05:36 +03:00
|
|
|
class nsPIDOMWindowOuter;
|
2015-11-10 13:32:00 +03:00
|
|
|
struct PRLogModuleInfo;
|
2014-03-11 14:46:55 +04:00
|
|
|
|
2012-12-04 23:46:07 +04:00
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
2015-12-11 19:17:33 +03:00
|
|
|
|
2013-11-25 03:50:03 +04:00
|
|
|
#ifdef MOZ_WIDGET_GONK
|
|
|
|
class SpeakerManagerService;
|
|
|
|
#endif
|
2015-07-10 19:38:44 +03:00
|
|
|
|
2015-12-11 19:17:33 +03:00
|
|
|
class TabParent;
|
|
|
|
|
2015-08-05 05:47:10 +03:00
|
|
|
#define NUMBER_OF_AUDIO_CHANNELS (uint32_t)AudioChannel::EndGuard_
|
2015-07-10 19:38:44 +03:00
|
|
|
|
2016-05-03 04:52:38 +03:00
|
|
|
class AudioPlaybackConfig
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
AudioPlaybackConfig()
|
|
|
|
: mVolume(1.0)
|
|
|
|
, mMuted(false)
|
|
|
|
, mSuspend(nsISuspendedTypes::NONE_SUSPENDED)
|
|
|
|
{}
|
|
|
|
|
|
|
|
AudioPlaybackConfig(float aVolume, bool aMuted, uint32_t aSuspended)
|
|
|
|
: mVolume(aVolume)
|
|
|
|
, mMuted(aMuted)
|
|
|
|
, mSuspend(aSuspended)
|
|
|
|
{}
|
|
|
|
|
|
|
|
void SetConfig(float aVolume, bool aMuted, uint32_t aSuspended)
|
|
|
|
{
|
|
|
|
mVolume = aVolume;
|
|
|
|
mMuted = aMuted;
|
|
|
|
mSuspend = aSuspended;
|
|
|
|
}
|
|
|
|
|
|
|
|
float mVolume;
|
|
|
|
bool mMuted;
|
|
|
|
uint32_t mSuspend;
|
|
|
|
};
|
|
|
|
|
2015-07-10 19:38:44 +03:00
|
|
|
class AudioChannelService final : public nsIAudioChannelService
|
|
|
|
, public nsIObserver
|
2012-12-04 23:46:07 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
2012-12-28 21:57:35 +04:00
|
|
|
NS_DECL_NSIOBSERVER
|
2015-07-10 19:38:44 +03:00
|
|
|
NS_DECL_NSIAUDIOCHANNELSERVICE
|
2012-12-04 23:46:07 +04:00
|
|
|
|
2016-05-03 05:03:02 +03:00
|
|
|
enum AudibleState : bool {
|
|
|
|
eAudible = true,
|
|
|
|
eNotAudible = false
|
|
|
|
};
|
|
|
|
|
|
|
|
enum AudioCaptureState : bool {
|
|
|
|
eCapturing = true,
|
|
|
|
eNotCapturing = false
|
|
|
|
};
|
|
|
|
|
2016-06-01 05:26:04 +03:00
|
|
|
enum AudibleChangedReasons : uint32_t {
|
|
|
|
eVolumeChanged = 0,
|
|
|
|
eDataAudibleChanged = 1,
|
|
|
|
ePauseStateChanged = 2
|
|
|
|
};
|
|
|
|
|
2014-08-29 10:10:16 +04:00
|
|
|
/**
|
|
|
|
* Returns the AudioChannelServce singleton.
|
|
|
|
* If AudioChannelServce is not exist, create and return new one.
|
|
|
|
* Only to be called from main thread.
|
|
|
|
*/
|
2015-07-10 19:38:44 +03:00
|
|
|
static already_AddRefed<AudioChannelService> GetOrCreate();
|
2014-08-29 10:10:16 +04:00
|
|
|
|
2015-07-10 19:38:49 +03:00
|
|
|
static bool IsAudioChannelMutedByDefault();
|
|
|
|
|
2015-11-10 13:32:00 +03:00
|
|
|
static PRLogModuleInfo* GetAudioChannelLog();
|
|
|
|
|
2016-06-01 05:21:13 +03:00
|
|
|
static bool IsEnableAudioCompeting();
|
|
|
|
|
2012-12-04 23:46:07 +04:00
|
|
|
/**
|
2012-12-06 19:25:18 +04:00
|
|
|
* Any audio channel agent that starts playing should register itself to
|
2014-04-10 21:39:20 +04:00
|
|
|
* this service, sharing the AudioChannel.
|
2012-12-04 23:46:07 +04:00
|
|
|
*/
|
2016-05-03 12:59:27 +03:00
|
|
|
void RegisterAudioChannelAgent(AudioChannelAgent* aAgent,
|
|
|
|
AudibleState aAudible);
|
2012-12-04 23:46:07 +04:00
|
|
|
|
|
|
|
/**
|
2013-09-12 16:26:03 +04:00
|
|
|
* Any audio channel agent that stops playing should unregister itself to
|
2012-12-04 23:46:07 +04:00
|
|
|
* this service.
|
|
|
|
*/
|
2015-12-24 12:17:30 +03:00
|
|
|
void UnregisterAudioChannelAgent(AudioChannelAgent* aAgent);
|
2012-12-04 23:46:07 +04:00
|
|
|
|
2015-12-11 19:17:33 +03:00
|
|
|
/**
|
|
|
|
* For nested iframes.
|
|
|
|
*/
|
|
|
|
void RegisterTabParent(TabParent* aTabParent);
|
|
|
|
void UnregisterTabParent(TabParent* aTabParent);
|
|
|
|
|
2012-12-04 23:46:07 +04:00
|
|
|
/**
|
2015-07-10 19:38:44 +03:00
|
|
|
* Return the state to indicate this audioChannel for his window should keep
|
2016-05-03 04:52:38 +03:00
|
|
|
* playing/muted/suspended.
|
2012-12-04 23:46:07 +04:00
|
|
|
*/
|
2016-05-03 04:52:38 +03:00
|
|
|
AudioPlaybackConfig GetMediaConfig(nsPIDOMWindowOuter* aWindow,
|
|
|
|
uint32_t aAudioChannel) const;
|
2015-07-10 19:38:44 +03:00
|
|
|
|
2016-05-03 05:03:02 +03:00
|
|
|
/**
|
|
|
|
* Called this method when the audible state of the audio playback changed,
|
|
|
|
* it would dispatch the playback event to observers which want to know the
|
|
|
|
* actual audible state of the window.
|
|
|
|
*/
|
2016-06-01 05:26:04 +03:00
|
|
|
void AudioAudibleChanged(AudioChannelAgent* aAgent,
|
|
|
|
AudibleState aAudible,
|
|
|
|
AudibleChangedReasons aReason);
|
2016-05-03 05:03:02 +03:00
|
|
|
|
2015-07-10 19:38:44 +03:00
|
|
|
/* Methods for the BrowserElementAudioChannel */
|
2016-01-30 20:05:36 +03:00
|
|
|
float GetAudioChannelVolume(nsPIDOMWindowOuter* aWindow, AudioChannel aChannel);
|
2015-07-10 19:38:44 +03:00
|
|
|
|
2016-01-30 20:05:36 +03:00
|
|
|
void SetAudioChannelVolume(nsPIDOMWindowOuter* aWindow, AudioChannel aChannel,
|
2015-07-10 19:38:44 +03:00
|
|
|
float aVolume);
|
|
|
|
|
2016-01-30 20:05:36 +03:00
|
|
|
bool GetAudioChannelMuted(nsPIDOMWindowOuter* aWindow, AudioChannel aChannel);
|
2015-07-10 19:38:44 +03:00
|
|
|
|
2016-01-30 20:05:36 +03:00
|
|
|
void SetAudioChannelMuted(nsPIDOMWindowOuter* aWindow, AudioChannel aChannel,
|
2015-07-10 19:38:44 +03:00
|
|
|
bool aMuted);
|
|
|
|
|
2016-01-30 20:05:36 +03:00
|
|
|
bool IsAudioChannelActive(nsPIDOMWindowOuter* aWindow, AudioChannel aChannel);
|
2013-01-05 09:03:51 +04:00
|
|
|
|
2014-05-29 11:20:42 +04:00
|
|
|
/**
|
|
|
|
* Return true if there is a telephony channel active in this process
|
|
|
|
* or one of its subprocesses.
|
|
|
|
*/
|
2015-07-10 19:38:44 +03:00
|
|
|
bool TelephonyChannelIsActive();
|
2014-05-29 11:20:42 +04:00
|
|
|
|
2013-04-26 04:53:26 +04:00
|
|
|
/**
|
2013-09-02 13:45:44 +04:00
|
|
|
* Return true if a normal or content channel is active for the given
|
|
|
|
* process ID.
|
2013-04-26 04:53:26 +04:00
|
|
|
*/
|
2015-07-10 19:38:44 +03:00
|
|
|
bool ProcessContentOrNormalChannelIsActive(uint64_t aChildID);
|
2013-04-26 04:53:26 +04:00
|
|
|
|
2013-09-12 16:26:03 +04:00
|
|
|
/***
|
|
|
|
* AudioChannelManager calls this function to notify the default channel used
|
2014-04-10 21:39:20 +04:00
|
|
|
* to adjust volume when there is no any active channel. if aChannel is -1,
|
|
|
|
* the default audio channel will be used. Otherwise aChannel is casted to
|
|
|
|
* AudioChannel enum.
|
2013-09-12 16:26:03 +04:00
|
|
|
*/
|
2014-04-10 21:39:20 +04:00
|
|
|
virtual void SetDefaultVolumeControlChannel(int32_t aChannel,
|
2015-02-25 13:46:11 +03:00
|
|
|
bool aVisible);
|
2013-09-12 16:26:03 +04:00
|
|
|
|
2013-11-25 03:50:03 +04:00
|
|
|
bool AnyAudioChannelIsActive();
|
|
|
|
|
2016-01-30 20:05:36 +03:00
|
|
|
void RefreshAgentsVolume(nsPIDOMWindowOuter* aWindow);
|
2016-05-03 04:52:38 +03:00
|
|
|
void RefreshAgentsSuspend(nsPIDOMWindowOuter* aWindow,
|
|
|
|
nsSuspendedTypes aSuspend);
|
2014-03-11 14:46:55 +04:00
|
|
|
|
2015-12-11 19:17:33 +03:00
|
|
|
void RefreshAgentsVolumeAndPropagate(AudioChannel aAudioChannel,
|
2016-01-30 20:05:36 +03:00
|
|
|
nsPIDOMWindowOuter* aWindow);
|
2015-12-11 19:17:33 +03:00
|
|
|
|
2015-07-09 17:40:08 +03:00
|
|
|
// This method needs to know the inner window that wants to capture audio. We
|
|
|
|
// group agents per top outer window, but we can have multiple innerWindow per
|
|
|
|
// top outerWindow (subiframes, etc.) and we have to identify all the agents
|
|
|
|
// just for a particular innerWindow.
|
2016-01-30 20:05:36 +03:00
|
|
|
void SetWindowAudioCaptured(nsPIDOMWindowOuter* aWindow,
|
2015-12-24 12:28:45 +03:00
|
|
|
uint64_t aInnerWindowID,
|
|
|
|
bool aCapture);
|
2015-07-09 17:40:08 +03:00
|
|
|
|
2013-11-25 03:50:03 +04:00
|
|
|
#ifdef MOZ_WIDGET_GONK
|
|
|
|
void RegisterSpeakerManager(SpeakerManagerService* aSpeakerManager)
|
|
|
|
{
|
|
|
|
if (!mSpeakerManager.Contains(aSpeakerManager)) {
|
|
|
|
mSpeakerManager.AppendElement(aSpeakerManager);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void UnregisterSpeakerManager(SpeakerManagerService* aSpeakerManager)
|
|
|
|
{
|
|
|
|
mSpeakerManager.RemoveElement(aSpeakerManager);
|
|
|
|
}
|
|
|
|
#endif
|
2014-03-20 14:45:55 +04:00
|
|
|
|
2014-04-10 21:39:20 +04:00
|
|
|
static const nsAttrValue::EnumTable* GetAudioChannelTable();
|
|
|
|
static AudioChannel GetAudioChannel(const nsAString& aString);
|
2014-03-20 14:45:55 +04:00
|
|
|
static AudioChannel GetDefaultAudioChannel();
|
2014-04-10 21:39:20 +04:00
|
|
|
static void GetAudioChannelString(AudioChannel aChannel, nsAString& aString);
|
|
|
|
static void GetDefaultAudioChannelString(nsAString& aString);
|
2014-03-20 14:45:55 +04:00
|
|
|
|
2015-07-10 19:38:44 +03:00
|
|
|
void Notify(uint64_t aWindowID);
|
2015-07-11 15:14:58 +03:00
|
|
|
|
2015-07-10 19:38:46 +03:00
|
|
|
void ChildStatusReceived(uint64_t aChildID, bool aTelephonyChannel,
|
|
|
|
bool aContentOrNormalChannel, bool aAnyChannel);
|
|
|
|
|
2015-07-10 19:38:44 +03:00
|
|
|
private:
|
|
|
|
AudioChannelService();
|
|
|
|
~AudioChannelService();
|
2015-07-10 19:38:46 +03:00
|
|
|
|
2016-05-03 04:52:38 +03:00
|
|
|
void RefreshAgents(nsPIDOMWindowOuter* aWindow,
|
|
|
|
mozilla::function<void(AudioChannelAgent*)> aFunc);
|
|
|
|
|
2015-08-31 13:52:42 +03:00
|
|
|
static void CreateServiceIfNeeded();
|
|
|
|
|
2015-07-15 03:16:21 +03:00
|
|
|
/**
|
|
|
|
* Shutdown the singleton.
|
|
|
|
*/
|
|
|
|
static void Shutdown();
|
|
|
|
|
2015-07-10 19:38:46 +03:00
|
|
|
void MaybeSendStatusUpdate();
|
|
|
|
|
|
|
|
bool ContentOrNormalChannelIsActive();
|
|
|
|
|
2013-09-12 16:26:03 +04:00
|
|
|
/* Send the default-volume-channel-changed notification */
|
2014-04-10 21:39:20 +04:00
|
|
|
void SetDefaultVolumeControlChannelInternal(int32_t aChannel,
|
2015-02-25 13:46:11 +03:00
|
|
|
bool aVisible, uint64_t aChildID);
|
2013-09-12 16:26:03 +04:00
|
|
|
|
2016-06-01 05:21:13 +03:00
|
|
|
void RefreshAgentsAudioFocusChanged(AudioChannelAgent* aAgent,
|
|
|
|
bool aActive);
|
|
|
|
|
2016-05-03 04:52:38 +03:00
|
|
|
class AudioChannelConfig final : public AudioPlaybackConfig
|
2015-07-10 19:38:44 +03:00
|
|
|
{
|
2016-05-03 04:52:38 +03:00
|
|
|
public:
|
2015-07-10 19:38:44 +03:00
|
|
|
AudioChannelConfig()
|
2016-05-03 04:52:38 +03:00
|
|
|
: AudioPlaybackConfig(1.0, IsAudioChannelMutedByDefault(),
|
|
|
|
nsISuspendedTypes::NONE_SUSPENDED)
|
2015-07-10 19:38:44 +03:00
|
|
|
, mNumberOfAgents(0)
|
|
|
|
{}
|
2013-01-11 02:56:20 +04:00
|
|
|
|
2015-07-10 19:38:44 +03:00
|
|
|
uint32_t mNumberOfAgents;
|
|
|
|
};
|
2015-07-10 19:38:46 +03:00
|
|
|
|
2016-05-03 05:03:02 +03:00
|
|
|
class AudioChannelWindow final
|
2015-07-10 19:38:44 +03:00
|
|
|
{
|
2016-05-03 05:03:02 +03:00
|
|
|
public:
|
2015-07-10 19:38:51 +03:00
|
|
|
explicit AudioChannelWindow(uint64_t aWindowID)
|
2016-06-01 05:21:13 +03:00
|
|
|
: mWindowID(aWindowID)
|
|
|
|
, mIsAudioCaptured(false)
|
|
|
|
, mOwningAudioFocus(!AudioChannelService::IsEnableAudioCompeting())
|
2015-10-20 15:42:24 +03:00
|
|
|
{
|
|
|
|
// Workaround for bug1183033, system channel type can always playback.
|
|
|
|
mChannels[(int16_t)AudioChannel::System].mMuted = false;
|
|
|
|
}
|
2015-07-10 19:38:51 +03:00
|
|
|
|
2016-06-01 05:21:13 +03:00
|
|
|
void AudioFocusChanged(AudioChannelAgent* aNewPlayingAgent, bool aActive);
|
2016-06-01 05:26:04 +03:00
|
|
|
void AudioAudibleChanged(AudioChannelAgent* aAgent,
|
|
|
|
AudibleState aAudible,
|
|
|
|
AudibleChangedReasons aReason);
|
2016-05-03 05:03:02 +03:00
|
|
|
|
2016-05-03 12:59:27 +03:00
|
|
|
void AppendAgent(AudioChannelAgent* aAgent, AudibleState aAudible);
|
2016-05-03 05:03:02 +03:00
|
|
|
void RemoveAgent(AudioChannelAgent* aAgent);
|
|
|
|
|
2015-07-10 19:38:51 +03:00
|
|
|
uint64_t mWindowID;
|
2015-12-24 12:28:45 +03:00
|
|
|
bool mIsAudioCaptured;
|
2015-07-10 19:38:44 +03:00
|
|
|
AudioChannelConfig mChannels[NUMBER_OF_AUDIO_CHANNELS];
|
2015-07-10 19:38:51 +03:00
|
|
|
|
|
|
|
// Raw pointer because the AudioChannelAgent must unregister itself.
|
|
|
|
nsTObserverArray<AudioChannelAgent*> mAgents;
|
2016-05-03 05:03:02 +03:00
|
|
|
nsTObserverArray<AudioChannelAgent*> mAudibleAgents;
|
|
|
|
|
2016-06-01 05:21:13 +03:00
|
|
|
// Owning audio focus when the window starts playing audible sound, and
|
|
|
|
// lose audio focus when other windows starts playing.
|
|
|
|
bool mOwningAudioFocus;
|
|
|
|
|
2016-05-03 05:03:02 +03:00
|
|
|
private:
|
|
|
|
void AudioCapturedChanged(AudioChannelAgent* aAgent,
|
|
|
|
AudioCaptureState aCapture);
|
|
|
|
|
2016-06-01 05:26:04 +03:00
|
|
|
void AppendAudibleAgentIfNotContained(AudioChannelAgent* aAgent,
|
|
|
|
AudibleChangedReasons aReason);
|
|
|
|
void RemoveAudibleAgentIfContained(AudioChannelAgent* aAgent,
|
|
|
|
AudibleChangedReasons aReason);
|
2016-05-03 05:03:02 +03:00
|
|
|
|
|
|
|
void AppendAgentAndIncreaseAgentsNum(AudioChannelAgent* aAgent);
|
|
|
|
void RemoveAgentAndReduceAgentsNum(AudioChannelAgent* aAgent);
|
|
|
|
|
|
|
|
bool IsFirstAudibleAgent() const;
|
|
|
|
bool IsLastAudibleAgent() const;
|
|
|
|
|
|
|
|
void NotifyAudioAudibleChanged(nsPIDOMWindowOuter* aWindow,
|
2016-06-01 05:26:04 +03:00
|
|
|
AudibleState aAudible,
|
|
|
|
AudibleChangedReasons aReason);
|
|
|
|
|
2016-05-03 05:03:02 +03:00
|
|
|
void NotifyChannelActive(uint64_t aWindowID, AudioChannel aChannel,
|
|
|
|
bool aActive);
|
2016-06-01 05:21:13 +03:00
|
|
|
|
|
|
|
void RequestAudioFocus(AudioChannelAgent* aAgent);
|
|
|
|
void NotifyAudioCompetingChanged(AudioChannelAgent* aAgent, bool aActive);
|
|
|
|
|
|
|
|
uint32_t GetCompetingBehavior(AudioChannelAgent* aAgent,
|
|
|
|
int32_t aIncomingChannelType,
|
|
|
|
bool aIncomingChannelActive) const;
|
|
|
|
bool IsAgentInvolvingInAudioCompeting(AudioChannelAgent* aAgent) const;
|
|
|
|
bool IsAudioCompetingInSameTab() const;
|
|
|
|
bool IsContainingPlayingAgent(AudioChannelAgent* aAgent) const;
|
2016-09-09 04:50:40 +03:00
|
|
|
|
|
|
|
bool IsInactiveWindow() const;
|
2015-07-10 19:38:44 +03:00
|
|
|
};
|
2015-07-11 15:14:58 +03:00
|
|
|
|
2015-07-10 19:38:51 +03:00
|
|
|
AudioChannelWindow*
|
2016-01-30 20:05:36 +03:00
|
|
|
GetOrCreateWindowData(nsPIDOMWindowOuter* aWindow);
|
2015-07-11 15:14:58 +03:00
|
|
|
|
2015-07-10 19:38:51 +03:00
|
|
|
AudioChannelWindow*
|
|
|
|
GetWindowData(uint64_t aWindowID) const;
|
|
|
|
|
|
|
|
struct AudioChannelChildStatus final
|
|
|
|
{
|
|
|
|
explicit AudioChannelChildStatus(uint64_t aChildID)
|
|
|
|
: mChildID(aChildID)
|
|
|
|
, mActiveTelephonyChannel(false)
|
2015-07-10 19:38:46 +03:00
|
|
|
, mActiveContentOrNormalChannel(false)
|
|
|
|
{}
|
|
|
|
|
2015-07-10 19:38:51 +03:00
|
|
|
uint64_t mChildID;
|
2015-07-10 19:38:46 +03:00
|
|
|
bool mActiveTelephonyChannel;
|
|
|
|
bool mActiveContentOrNormalChannel;
|
|
|
|
};
|
|
|
|
|
2015-07-10 19:38:51 +03:00
|
|
|
AudioChannelChildStatus*
|
|
|
|
GetChildStatus(uint64_t aChildID) const;
|
|
|
|
|
|
|
|
void
|
|
|
|
RemoveChildStatus(uint64_t aChildID);
|
|
|
|
|
|
|
|
nsTObserverArray<nsAutoPtr<AudioChannelWindow>> mWindows;
|
2015-07-10 19:38:46 +03:00
|
|
|
|
2015-07-10 19:38:51 +03:00
|
|
|
nsTObserverArray<nsAutoPtr<AudioChannelChildStatus>> mPlayingChildren;
|
2015-07-10 19:38:46 +03:00
|
|
|
|
2013-11-25 03:50:03 +04:00
|
|
|
#ifdef MOZ_WIDGET_GONK
|
|
|
|
nsTArray<SpeakerManagerService*> mSpeakerManager;
|
|
|
|
#endif
|
2013-01-25 19:12:17 +04:00
|
|
|
|
2015-12-11 19:17:33 +03:00
|
|
|
// Raw pointers because TabParents must unregister themselves.
|
|
|
|
nsTArray<TabParent*> mTabParents;
|
|
|
|
|
2014-06-25 09:15:12 +04:00
|
|
|
nsCOMPtr<nsIRunnable> mRunnable;
|
|
|
|
|
2015-07-11 03:55:59 +03:00
|
|
|
uint64_t mDefChannelChildID;
|
2015-07-10 19:38:46 +03:00
|
|
|
|
2015-07-10 19:38:46 +03:00
|
|
|
// These boolean are used to know if we have to send an status update to the
|
|
|
|
// service running in the main process.
|
|
|
|
bool mTelephonyChannel;
|
|
|
|
bool mContentOrNormalChannel;
|
|
|
|
bool mAnyChannel;
|
|
|
|
|
2012-12-06 07:01:58 +04:00
|
|
|
// This is needed for IPC comunication between
|
|
|
|
// AudioChannelServiceChild and this class.
|
|
|
|
friend class ContentParent;
|
|
|
|
friend class ContentChild;
|
2012-12-04 23:46:07 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif
|