diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-07-06 15:53:52 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-07-06 15:53:52 +0200 |
commit | 941e54654eabed0a3568f7fefe424a45aa02eddb (patch) | |
tree | 49aa02b174c428962d99142d8061267bfcd79e69 /dom/audiochannel | |
parent | ad9ee72dcd7981bc47b3844a224d69fadfdfd8ef (diff) | |
parent | 0daa12376295d5d796256a116eb2a348a3a9273f (diff) | |
download | UXP-941e54654eabed0a3568f7fefe424a45aa02eddb.tar UXP-941e54654eabed0a3568f7fefe424a45aa02eddb.tar.gz UXP-941e54654eabed0a3568f7fefe424a45aa02eddb.tar.lz UXP-941e54654eabed0a3568f7fefe424a45aa02eddb.tar.xz UXP-941e54654eabed0a3568f7fefe424a45aa02eddb.zip |
Merge branch 'master' of https://github.com/MoonchildProductions/UXP into _testBranch_test_1
Diffstat (limited to 'dom/audiochannel')
-rw-r--r-- | dom/audiochannel/AudioChannelService.cpp | 32 | ||||
-rw-r--r-- | dom/audiochannel/AudioChannelService.h | 22 |
2 files changed, 0 insertions, 54 deletions
diff --git a/dom/audiochannel/AudioChannelService.cpp b/dom/audiochannel/AudioChannelService.cpp index 87cde41e9..db6f2037b 100644 --- a/dom/audiochannel/AudioChannelService.cpp +++ b/dom/audiochannel/AudioChannelService.cpp @@ -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) { diff --git a/dom/audiochannel/AudioChannelService.h b/dom/audiochannel/AudioChannelService.h index b16832b5f..7d3de8a46 100644 --- a/dom/audiochannel/AudioChannelService.h +++ b/dom/audiochannel/AudioChannelService.h @@ -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; |