Bug 1357649 - Remove remnants of AudioChannelManager. r=bz

--HG--
extra : rebase_source : 21fba2905cf9171f34c0e155a4ff5a1162829789
This commit is contained in:
Mike Hommey 2017-04-19 15:55:28 +09:00
Родитель 8f8bcda062
Коммит e4927e7310
7 изменённых файлов: 0 добавлений и 106 удалений

Просмотреть файл

@ -73,10 +73,6 @@
#include "mozilla/dom/MediaDevices.h"
#include "MediaManager.h"
#ifdef MOZ_AUDIO_CHANNEL_MANAGER
#include "AudioChannelManager.h"
#endif
#include "nsIDOMGlobalPropertyInitializer.h"
#include "nsJSUtils.h"
@ -207,9 +203,6 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(Navigator)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mConnection)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mStorageManager)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mAuthentication)
#ifdef MOZ_AUDIO_CHANNEL_MANAGER
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mAudioChannelManager)
#endif
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mMediaDevices)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mTimeManager)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mServiceWorkerContainer)
@ -271,12 +264,6 @@ Navigator::Invalidate()
mMediaDevices = nullptr;
#ifdef MOZ_AUDIO_CHANNEL_MANAGER
if (mAudioChannelManager) {
mAudioChannelManager = nullptr;
}
#endif
if (mTimeManager) {
mTimeManager = nullptr;
}
@ -1693,23 +1680,6 @@ Navigator::CheckPermission(nsPIDOMWindowInner* aWindow, const char* aType)
return permission == nsIPermissionManager::ALLOW_ACTION;
}
#ifdef MOZ_AUDIO_CHANNEL_MANAGER
system::AudioChannelManager*
Navigator::GetMozAudioChannelManager(ErrorResult& aRv)
{
if (!mAudioChannelManager) {
if (!mWindow) {
aRv.Throw(NS_ERROR_UNEXPECTED);
return nullptr;
}
mAudioChannelManager = new system::AudioChannelManager();
mAudioChannelManager->Init(mWindow);
}
return mAudioChannelManager;
}
#endif
JSObject*
Navigator::WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto)
{

Просмотреть файл

@ -84,12 +84,6 @@ namespace time {
class TimeManager;
} // namespace time
namespace system {
#ifdef MOZ_AUDIO_CHANNEL_MANAGER
class AudioChannelManager;
#endif
} // namespace system
class Navigator final : public nsIDOMNavigator
, public nsIMozNavigatorNetwork
, public nsWrapperCache
@ -207,9 +201,6 @@ public:
#ifdef MOZ_TIME_MANAGER
time::TimeManager* GetMozTime(ErrorResult& aRv);
#endif // MOZ_TIME_MANAGER
#ifdef MOZ_AUDIO_CHANNEL_MANAGER
system::AudioChannelManager* GetMozAudioChannelManager(ErrorResult& aRv);
#endif // MOZ_AUDIO_CHANNEL_MANAGER
Presentation* GetPresentation(ErrorResult& aRv);
@ -301,9 +292,6 @@ private:
RefPtr<PowerManager> mPowerManager;
RefPtr<network::Connection> mConnection;
RefPtr<WebAuthentication> mAuthentication;
#ifdef MOZ_AUDIO_CHANNEL_MANAGER
RefPtr<system::AudioChannelManager> mAudioChannelManager;
#endif
RefPtr<MediaDevices> mMediaDevices;
RefPtr<time::TimeManager> mTimeManager;
RefPtr<ServiceWorkerContainer> mServiceWorkerContainer;

Просмотреть файл

@ -78,11 +78,6 @@ DOMInterfaces = {
'nativeType': 'mozilla::dom::archivereader::ArchiveRequest',
},
'AudioChannelManager': {
'nativeType': 'mozilla::dom::system::AudioChannelManager',
'headerFile': 'AudioChannelManager.h'
},
'AudioBuffer': {
'implicitJSContext': [ 'copyToChannel' ],
},

Просмотреть файл

@ -1,37 +0,0 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/.
*/
interface AudioChannelManager : EventTarget {
/**
* Indicates whether the headphones are plugged in or not.
*/
readonly attribute boolean headphones;
/**
* Fired when the headphones are plugged or unplugged.
*
* When the headphones are unplugged, we may start playing audio through the
* system's speakers. Similarly, when headphones are plugged in, we may
* switch audio from speakers to headphones.
*
* If audio is currently playing in this window or in one of its children, we
* will fire this event before we switch the audio output from headphones to
* speakers (or vice versa). This allows you to, for example, pause your
* window's audio when the headphones are unplugged.
*/
attribute EventHandler onheadphoneschange;
/**
* Indicates which audio channel is used to adjust volume when pressing HW
* volume keys.
*/
attribute DOMString volumeControlChannel;
[Pure, Cached, Throws,
Pref="dom.mozBrowserFramesEnabled",
ChromeOnly]
readonly attribute sequence<BrowserElementAudioChannel> allowedAudioChannels;
};

Просмотреть файл

@ -287,14 +287,6 @@ partial interface Navigator {
};
#endif // MOZ_TIME_MANAGER
#ifdef MOZ_AUDIO_CHANNEL_MANAGER
// nsIMozNavigatorAudioChannelManager
partial interface Navigator {
[Throws]
readonly attribute AudioChannelManager mozAudioChannelManager;
};
#endif // MOZ_AUDIO_CHANNEL_MANAGER
callback NavigatorUserMediaSuccessCallback = void (MediaStream stream);
callback NavigatorUserMediaErrorCallback = void (MediaStreamError error);

Просмотреть файл

@ -974,11 +974,6 @@ WEBIDL_FILES = [
'XULElement.webidl',
]
if CONFIG['MOZ_AUDIO_CHANNEL_MANAGER']:
WEBIDL_FILES += [
'AudioChannelManager.webidl',
]
if CONFIG['MOZ_WEBRTC']:
WEBIDL_FILES += [
'DataChannel.webidl',

Просмотреть файл

@ -2200,7 +2200,6 @@ MOZ_EXCLUDE_HYPHENATION_DICTIONARIES=
MOZ_INSTALL_TRACKING=
ACCESSIBILITY=1
MOZ_TIME_MANAGER=
MOZ_AUDIO_CHANNEL_MANAGER=
MOZ_CONTENT_SANDBOX=
MOZ_GMP_SANDBOX=
MOZ_SANDBOX=1
@ -4404,14 +4403,6 @@ if test -n "$MOZ_TIME_MANAGER"; then
fi
AC_SUBST(MOZ_TIME_MANAGER)
dnl ========================================================
dnl = Enable Support for AudioChannelManager API
dnl ========================================================
if test -n "$MOZ_AUDIO_CHANNEL_MANAGER"; then
AC_DEFINE(MOZ_AUDIO_CHANNEL_MANAGER)
fi
AC_SUBST(MOZ_AUDIO_CHANNEL_MANAGER)
dnl ========================================================
dnl = Enable Support for Secure Element API
dnl ========================================================