Bug 1259581: Remove MOZ_MEDIA_NAVIGATOR. r=jesup
authorKyle Huey <khuey@kylehuey.com>
Tue, 05 Apr 2016 20:12:03 -0700
changeset 329695 791433f9b681a4a3bce3106484352b684d76970a
parent 329694 496db28e275d83a8a8d57033384d18199ccbcbd9
child 329696 472ddbb34a370a4876b3ac3a953b4f0474592a4c
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1259581
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1259581: Remove MOZ_MEDIA_NAVIGATOR. r=jesup
b2g/confvars.sh
b2g/graphene/confvars.sh
browser/confvars.sh
dom/base/Navigator.cpp
dom/base/Navigator.h
dom/base/nsDocument.cpp
dom/webidl/Navigator.webidl
embedding/ios/confvars.sh
mobile/android/confvars.sh
old-configure.in
--- a/b2g/confvars.sh
+++ b/b2g/confvars.sh
@@ -39,18 +39,16 @@ MOZ_RAW=1
 MOZ_AUDIO_CHANNEL_MANAGER=1
 fi
 
 # use custom widget for html:select
 MOZ_USE_NATIVE_POPUP_WINDOWS=1
 
 MOZ_XULRUNNER=
 
-MOZ_MEDIA_NAVIGATOR=1
-
 MOZ_APP_ID={3c2e2abc-06d4-11e1-ac3b-374f68613e61}
 
 MOZ_TIME_MANAGER=1
 
 MOZ_SIMPLEPUSH=1
 MOZ_PAY=1
 MOZ_TOOLKIT_SEARCH=
 MOZ_PLACES=
--- a/b2g/graphene/confvars.sh
+++ b/b2g/graphene/confvars.sh
@@ -35,18 +35,16 @@ NSS_NO_LIBPKIX=1
 NSS_DISABLE_DBM=1
 
 if test "$OS_TARGET" = "Android"; then
 MOZ_CAPTURE=1
 MOZ_RAW=1
 MOZ_AUDIO_CHANNEL_MANAGER=1
 fi
 
-MOZ_MEDIA_NAVIGATOR=1
-
 MOZ_APP_ID={d1bfe7d9-c01e-4237-998b-7b5f960a4314}
 MOZ_TIME_MANAGER=1
 
 MOZ_PAY=1
 MOZ_TOOLKIT_SEARCH=
 MOZ_PLACES=
 MOZ_B2G=1
 
--- a/browser/confvars.sh
+++ b/browser/confvars.sh
@@ -49,17 +49,16 @@ MOZ_APP_ID={ec8030f7-c20a-464f-9b0e-13a3
 # This should usually be the same as the value MAR_CHANNEL_ID.
 # If more than one ID is needed, then you should use a comma separated list
 # of values.
 ACCEPTED_MAR_CHANNEL_IDS=firefox-mozilla-central
 # The MAR_CHANNEL_ID must not contain the following 3 characters: ",\t "
 MAR_CHANNEL_ID=firefox-mozilla-central
 MOZ_PROFILE_MIGRATOR=1
 MOZ_APP_STATIC_INI=1
-MOZ_MEDIA_NAVIGATOR=1
 MOZ_WEBGL_CONFORMANT=1
 # Enable navigator.mozPay
 MOZ_PAY=1
 # Enable activities. These are used for FxOS developers currently.
 MOZ_ACTIVITIES=1
 MOZ_JSDOWNLOADS=1
 MOZ_WEBM_ENCODER=1
 MOZ_RUST_MP4PARSE=1
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -75,20 +75,18 @@
 #include "DeviceStorage.h"
 #include "nsIDOMNavigatorSystemMessages.h"
 #include "nsStreamUtils.h"
 #include "nsIAppsService.h"
 #include "mozIApplication.h"
 #include "WidgetUtils.h"
 #include "nsIPresentationService.h"
 
-#ifdef MOZ_MEDIA_NAVIGATOR
 #include "mozilla/dom/MediaDevices.h"
 #include "MediaManager.h"
-#endif
 #ifdef MOZ_B2G_BT
 #include "BluetoothManager.h"
 #endif
 #include "DOMCameraManager.h"
 
 #ifdef MOZ_AUDIO_CHANNEL_MANAGER
 #include "AudioChannelManager.h"
 #endif
@@ -1358,17 +1356,16 @@ Navigator::SendBeacon(const nsAString& a
   }
   // make the beaconListener hold a strong reference to the loadgroup
   // which is released in ::OnStartRequest
   beaconListener->SetLoadGroup(loadGroup);
 
   return true;
 }
 
-#ifdef MOZ_MEDIA_NAVIGATOR
 MediaDevices*
 Navigator::GetMediaDevices(ErrorResult& aRv)
 {
   if (!mMediaDevices) {
     if (!mWindow ||
         !mWindow->GetOuterWindow() ||
         mWindow->GetOuterWindow()->GetCurrentInnerWindow() != mWindow) {
       aRv.Throw(NS_ERROR_NOT_AVAILABLE);
@@ -1426,17 +1423,16 @@ Navigator::MozGetUserMediaDevices(const 
     aRv.Throw(NS_ERROR_NOT_AVAILABLE);
     return;
   }
 
   MediaManager* manager = MediaManager::Get();
   aRv = manager->GetUserMediaDevices(mWindow, aConstraints, onsuccess, onerror,
                                      aInnerWindowID, aCallID);
 }
-#endif
 
 DesktopNotificationCenter*
 Navigator::GetMozNotification(ErrorResult& aRv)
 {
   if (mNotification) {
     return mNotification;
   }
 
@@ -2192,23 +2188,21 @@ Navigator::SetWindow(nsPIDOMWindowInner 
 
 void
 Navigator::OnNavigation()
 {
   if (!mWindow) {
     return;
   }
 
-#ifdef MOZ_MEDIA_NAVIGATOR
   // If MediaManager is open let it inform any live streams or pending callbacks
   MediaManager *manager = MediaManager::GetIfExists();
   if (manager) {
     manager->OnNavigation(mWindow->WindowID());
   }
-#endif
   if (mCameraManager) {
     mCameraManager->OnNavigation(mWindow->WindowID());
   }
 }
 
 bool
 Navigator::CheckPermission(const char* type)
 {
@@ -2301,27 +2295,25 @@ Navigator::HasNFCSupport(JSContext* /* u
   nsCOMPtr<nsPIDOMWindowInner> win = GetWindowFromGlobal(aGlobal);
 
   // Do not support NFC if NFC content helper does not exist.
   nsCOMPtr<nsISupports> contentHelper = do_GetService("@mozilla.org/nfc/content-helper;1");
   return !!contentHelper;
 }
 #endif // MOZ_NFC
 
-#ifdef MOZ_MEDIA_NAVIGATOR
 /* static */
 bool
 Navigator::HasUserMediaSupport(JSContext* /* unused */,
                                JSObject* /* unused */)
 {
   // Make enabling peerconnection enable getUserMedia() as well
   return Preferences::GetBool("media.navigator.enabled", false) ||
          Preferences::GetBool("media.peerconnection.enabled", false);
 }
-#endif // MOZ_MEDIA_NAVIGATOR
 
 /* static */
 bool
 Navigator::HasDataStoreSupport(nsIPrincipal* aPrincipal)
 {
   workers::AssertIsOnMainThread();
 
   return DataStoreService::CheckPermission(aPrincipal);
--- a/dom/base/Navigator.h
+++ b/dom/base/Navigator.h
@@ -66,21 +66,19 @@ class FMRadio;
 class Promise;
 
 class DesktopNotificationCenter;
 class MobileMessageManager;
 class MozIdleObserver;
 #ifdef MOZ_GAMEPAD
 class Gamepad;
 #endif // MOZ_GAMEPAD
-#ifdef MOZ_MEDIA_NAVIGATOR
 class NavigatorUserMediaSuccessCallback;
 class NavigatorUserMediaErrorCallback;
 class MozGetUserMediaDevicesSuccessCallback;
-#endif // MOZ_MEDIA_NAVIGATOR
 
 namespace network {
 class Connection;
 } // namespace network
 
 #ifdef MOZ_B2G_BT
 namespace bluetooth {
 class BluetoothManager;
@@ -289,28 +287,26 @@ public:
 #endif // MOZ_AUDIO_CHANNEL_MANAGER
 
   Presentation* GetPresentation(ErrorResult& aRv);
 
   bool SendBeacon(const nsAString& aUrl,
                   const Nullable<ArrayBufferViewOrBlobOrStringOrFormData>& aData,
                   ErrorResult& aRv);
 
-#ifdef MOZ_MEDIA_NAVIGATOR
   void MozGetUserMedia(const MediaStreamConstraints& aConstraints,
                        NavigatorUserMediaSuccessCallback& aOnSuccess,
                        NavigatorUserMediaErrorCallback& aOnError,
                        ErrorResult& aRv);
   void MozGetUserMediaDevices(const MediaStreamConstraints& aConstraints,
                               MozGetUserMediaDevicesSuccessCallback& aOnSuccess,
                               NavigatorUserMediaErrorCallback& aOnError,
                               uint64_t aInnerWindowID,
                               const nsAString& aCallID,
                               ErrorResult& aRv);
-#endif // MOZ_MEDIA_NAVIGATOR
 
   already_AddRefed<ServiceWorkerContainer> ServiceWorker();
 
   void GetLanguages(nsTArray<nsString>& aLanguages);
 
   bool MozE10sEnabled();
 
 #ifdef MOZ_PAY
@@ -325,20 +321,18 @@ public:
   static bool HasWakeLockSupport(JSContext* /* unused*/, JSObject* /*unused */);
   static bool HasCameraSupport(JSContext* /* unused */,
                                JSObject* aGlobal);
   static bool HasWifiManagerSupport(JSContext* /* unused */,
                                   JSObject* aGlobal);
 #ifdef MOZ_NFC
   static bool HasNFCSupport(JSContext* /* unused */, JSObject* aGlobal);
 #endif // MOZ_NFC
-#ifdef MOZ_MEDIA_NAVIGATOR
   static bool HasUserMediaSupport(JSContext* /* unused */,
                                   JSObject* /* unused */);
-#endif // MOZ_MEDIA_NAVIGATOR
 
   static bool HasDataStoreSupport(nsIPrincipal* aPrincipal);
 
   static bool HasDataStoreSupport(JSContext* cx, JSObject* aGlobal);
 
 #ifdef MOZ_B2G
   static bool HasMobileIdSupport(JSContext* aCx, JSObject* aGlobal);
 #endif
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -250,19 +250,17 @@
 #include "mozilla/StyleSetHandleInlines.h"
 #include "mozilla/StyleSheetHandle.h"
 #include "mozilla/StyleSheetHandleInlines.h"
 
 #include "mozilla/DocLoadingTimelineMarker.h"
 
 #include "nsISpeculativeConnect.h"
 
-#ifdef MOZ_MEDIA_NAVIGATOR
 #include "mozilla/MediaManager.h"
-#endif // MOZ_MEDIA_NAVIGATOR
 #ifdef MOZ_WEBRTC
 #include "IPeerConnection.h"
 #endif // MOZ_WEBRTC
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 typedef nsTArray<Link*> LinkArray;
@@ -8836,23 +8834,21 @@ nsDocument::CanSavePresentation(nsIReque
         printf("document %s has request %s\n",
                docSpec.get(), requestName.get());
 #endif
         return false;
       }
     }
   }
 
-#ifdef MOZ_MEDIA_NAVIGATOR
   // Check if we have active GetUserMedia use
   if (MediaManager::Exists() && win &&
       MediaManager::Get()->IsWindowStillActive(win->WindowID())) {
     return false;
   }
-#endif // MOZ_MEDIA_NAVIGATOR
 
 #ifdef MOZ_WEBRTC
   // Check if we have active PeerConnections
   nsCOMPtr<IPeerConnectionManager> pcManager =
     do_GetService(IPEERCONNECTION_MANAGER_CONTRACTID);
 
   if (pcManager && win) {
     bool active;
--- a/dom/webidl/Navigator.webidl
+++ b/dom/webidl/Navigator.webidl
@@ -379,17 +379,16 @@ partial interface Navigator {
 #ifdef MOZ_AUDIO_CHANNEL_MANAGER
 // nsIMozNavigatorAudioChannelManager
 partial interface Navigator {
   [Throws]
   readonly attribute AudioChannelManager mozAudioChannelManager;
 };
 #endif // MOZ_AUDIO_CHANNEL_MANAGER
 
-#ifdef MOZ_MEDIA_NAVIGATOR
 callback NavigatorUserMediaSuccessCallback = void (MediaStream stream);
 callback NavigatorUserMediaErrorCallback = void (MediaStreamError error);
 
 partial interface Navigator {
   [Throws, Func="Navigator::HasUserMediaSupport"]
   readonly attribute MediaDevices mediaDevices;
 
   // Deprecated. Use mediaDevices.getUserMedia instead.
@@ -413,17 +412,16 @@ partial interface Navigator {
                               optional unsigned long long innerWindowID = 0,
                               // The callID is needed in case of multiple
                               // concurrent requests to find the right one.
                               // It is optional only as legacy.
                               // TODO: Rewrite to not need this method anymore,
                               // now that devices are enumerated earlier.
                               optional DOMString callID = "");
 };
-#endif // MOZ_MEDIA_NAVIGATOR
 
 // Service Workers/Navigation Controllers
 partial interface Navigator {
   [Func="ServiceWorkerContainer::IsEnabled", SameObject]
   readonly attribute ServiceWorkerContainer serviceWorker;
 };
 
 partial interface Navigator {
--- a/embedding/ios/confvars.sh
+++ b/embedding/ios/confvars.sh
@@ -8,10 +8,9 @@ MOZ_APP_DISPLAYNAME=GeckoEmbed
 MOZ_UPDATER=
 MOZ_CHROME_FILE_FORMAT=omni
 MOZ_APP_VERSION=$MOZILLA_VERSION
 MOZ_PLACES=1
 MOZ_EXTENSIONS_DEFAULT=" gio"
 MOZ_SERVICES_COMMON=1
 MOZ_SERVICES_CRYPTO=1
 MOZ_SERVICES_SYNC=1
-MOZ_MEDIA_NAVIGATOR=1
 MOZ_SERVICES_HEALTHREPORT=1
--- a/mobile/android/confvars.sh
+++ b/mobile/android/confvars.sh
@@ -22,19 +22,16 @@ MOZ_ANDROID_MIN_SDK_VERSION=15
 MOZ_ANDROID_APPLICATION_CLASS=org.mozilla.gecko.GeckoApplication
 MOZ_ANDROID_BROWSER_INTENT_CLASS=org.mozilla.gecko.BrowserApp
 MOZ_ANDROID_SEARCH_INTENT_CLASS=org.mozilla.search.SearchActivity
 
 MOZ_SAFE_BROWSING=1
 
 MOZ_NO_SMART_CARDS=1
 
-# Enable getUserMedia
-MOZ_MEDIA_NAVIGATOR=1
-
 # Enable NFC permission
 MOZ_ANDROID_BEAM=1
 
 MOZ_XULRUNNER=
 
 MOZ_CAPTURE=1
 MOZ_RAW=1
 MOZ_PLACES=
--- a/old-configure.in
+++ b/old-configure.in
@@ -2739,17 +2739,16 @@ MOZ_DIRECTSHOW=
 MOZ_WEBRTC=1
 MOZ_PEERCONNECTION=
 MOZ_SRTP=
 MOZ_WEBRTC_SIGNALING=
 MOZ_WEBRTC_ASSERT_ALWAYS=1
 MOZ_WEBRTC_HARDWARE_AEC_NS=
 MOZ_SCTP=
 MOZ_ANDROID_OMX=
-MOZ_MEDIA_NAVIGATOR=
 MOZ_OMX_PLUGIN=
 MOZ_VPX_ERROR_CONCEALMENT=
 MOZ_WEBSPEECH=1
 MOZ_WEBSPEECH_MODELS=
 MOZ_WEBSPEECH_POCKETSPHINX=
 MOZ_WEBSPEECH_TEST_BACKEND=1
 VPX_USE_YASM=
 VPX_ASFLAGS=
@@ -3990,28 +3989,16 @@ MOZ_ARG_ENABLE_BOOL(android-omx,
     MOZ_ANDROID_OMX=1,
     MOZ_ANDROID_OMX=)
 
 if test -n "$MOZ_ANDROID_OMX"; then
   AC_DEFINE(MOZ_ANDROID_OMX)
 fi
 
 dnl ========================================================
-dnl = Enable getUserMedia support
-dnl ========================================================
-MOZ_ARG_ENABLE_BOOL(media-navigator,
-[  --enable-media-navigator  Enable support for getUserMedia],
-    MOZ_MEDIA_NAVIGATOR=1,
-    MOZ_MEDIA_NAVIGATOR=)
-
-if test -n "$MOZ_MEDIA_NAVIGATOR"; then
-  AC_DEFINE(MOZ_MEDIA_NAVIGATOR)
-fi
-
-dnl ========================================================
 dnl = Enable building OMX media plugin (B2G or Android)
 dnl ========================================================
 if test "$OS_TARGET" = Android -a x"$MOZ_WIDGET_TOOLKIT" != x"gonk"; then
   dnl Enable support on android by default
   MOZ_OMX_PLUGIN=1
 fi
 
 MOZ_ARG_ENABLE_BOOL(omx-plugin,