mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-26 02:17:34 +09:00
parent
9195e9e4e3
commit
b586913598
53 changed files with 60 additions and 750 deletions
|
|
@ -27,11 +27,6 @@
|
|||
#include "nsServiceManagerUtils.h"
|
||||
#include "mozilla/dom/SettingChangeNotificationBinding.h"
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
#include "nsJSUtils.h"
|
||||
#include "SpeakerManagerService.h"
|
||||
#endif
|
||||
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
|
@ -237,20 +232,12 @@ AudioChannelService::Shutdown()
|
|||
|
||||
if (IsParentProcess()) {
|
||||
obs->RemoveObserver(gAudioChannelService, "ipc:content-shutdown");
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
// To monitor the volume settings based on audio channel.
|
||||
obs->RemoveObserver(gAudioChannelService, "mozsettings-changed");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
gAudioChannelService->mWindows.Clear();
|
||||
gAudioChannelService->mPlayingChildren.Clear();
|
||||
gAudioChannelService->mTabParents.Clear();
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
gAudioChannelService->mSpeakerManager.Clear();
|
||||
#endif
|
||||
|
||||
gAudioChannelService = nullptr;
|
||||
}
|
||||
|
|
@ -284,11 +271,6 @@ AudioChannelService::AudioChannelService()
|
|||
obs->AddObserver(this, "outer-window-destroyed", false);
|
||||
if (IsParentProcess()) {
|
||||
obs->AddObserver(this, "ipc:content-shutdown", false);
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
// To monitor the volume settings based on audio channel.
|
||||
obs->AddObserver(this, "mozsettings-changed", false);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -342,13 +324,6 @@ AudioChannelService::UnregisterAudioChannelAgent(AudioChannelAgent* aAgent)
|
|||
RefPtr<AudioChannelAgent> kungFuDeathGrip(aAgent);
|
||||
winData->RemoveAgent(aAgent);
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
bool active = AnyAudioChannelIsActive();
|
||||
for (uint32_t i = 0; i < mSpeakerManager.Length(); i++) {
|
||||
mSpeakerManager[i]->SetAudioChannelActive(active);
|
||||
}
|
||||
#endif
|
||||
|
||||
MaybeSendStatusUpdate();
|
||||
}
|
||||
|
||||
|
|
@ -573,13 +548,6 @@ AudioChannelService::Observe(nsISupports* aSubject, const char* aTopic,
|
|||
iter.GetNext()->WindowVolumeChanged();
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
bool active = AnyAudioChannelIsActive();
|
||||
for (uint32_t i = 0; i < mSpeakerManager.Length(); i++) {
|
||||
mSpeakerManager[i]->SetAudioChannelActive(active);
|
||||
}
|
||||
#endif
|
||||
} else if (!strcmp(aTopic, "ipc:content-shutdown")) {
|
||||
nsCOMPtr<nsIPropertyBag2> props = do_QueryInterface(aSubject);
|
||||
if (!props) {
|
||||
|
|
|
|||
|
|
@ -25,10 +25,6 @@ struct PRLogModuleInfo;
|
|||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
class SpeakerManagerService;
|
||||
#endif
|
||||
|
||||
class TabParent;
|
||||
|
||||
#define NUMBER_OF_AUDIO_CHANNELS (uint32_t)AudioChannel::EndGuard_
|
||||
|
|
@ -189,20 +185,6 @@ public:
|
|||
uint64_t aInnerWindowID,
|
||||
bool aCapture);
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
void RegisterSpeakerManager(SpeakerManagerService* aSpeakerManager)
|
||||
{
|
||||
if (!mSpeakerManager.Contains(aSpeakerManager)) {
|
||||
mSpeakerManager.AppendElement(aSpeakerManager);
|
||||
}
|
||||
}
|
||||
|
||||
void UnregisterSpeakerManager(SpeakerManagerService* aSpeakerManager)
|
||||
{
|
||||
mSpeakerManager.RemoveElement(aSpeakerManager);
|
||||
}
|
||||
#endif
|
||||
|
||||
static const nsAttrValue::EnumTable* GetAudioChannelTable();
|
||||
static AudioChannel GetAudioChannel(const nsAString& aString);
|
||||
static AudioChannel GetDefaultAudioChannel();
|
||||
|
|
@ -347,10 +329,6 @@ private:
|
|||
|
||||
nsTObserverArray<nsAutoPtr<AudioChannelChildStatus>> mPlayingChildren;
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
nsTArray<SpeakerManagerService*> mSpeakerManager;
|
||||
#endif
|
||||
|
||||
// Raw pointers because TabParents must unregister themselves.
|
||||
nsTArray<TabParent*> mTabParents;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue