Bug 1160101 - Disable Adobe EME by default; enable only in Mozilla builds - r=glandium
authorEdwin Flores <edwin@mozilla.com>
Wed, 03 Jun 2015 22:44:55 +1200
changeset 277759 5d8c22617d0dc0ab571903f572849da42051dc2a
parent 277758 8d2064e2c5111114ba60a0c475bc6482f62a5ccf
child 277760 9fffe48757f6663ae36eb747cd7e9b6f56a3a0ae
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-beta@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1160101
milestone41.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 1160101 - Disable Adobe EME by default; enable only in Mozilla builds - r=glandium
browser/app/moz.build
browser/app/profile/firefox.js
browser/config/mozconfigs/win32/common-opt
configure.in
--- a/browser/app/moz.build
+++ b/browser/app/moz.build
@@ -55,16 +55,19 @@ if CONFIG['_MSC_VER']:
     # Always enter a Windows program through wmain, whether or not we're
     # a console application.
     WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup']
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     RCINCLUDE = 'splash.rc'
     DEFINES['MOZ_PHOENIX'] = True
 
+for cdm in CONFIG['MOZ_EME_MODULES']:
+    DEFINES['MOZ_%s_EME' % cdm.upper()] = True
+
 # Control the default heap size.
 # This is the heap returned by GetProcessHeap().
 # As we use the CRT heap, the default size is too large and wastes VM.
 #
 # The default heap size is 1MB on Win32.
 # The heap will grow if need be.
 #
 # Set it to 256k.  See bug 127069.
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1837,20 +1837,20 @@ pref("identity.fxaccounts.migrateToDevEd
 // On GTK, we now default to showing the menubar only when alt is pressed:
 #ifdef MOZ_WIDGET_GTK
 pref("ui.key.menuAccessKeyFocuses", true);
 #endif
 
 // Encrypted media extensions.
 pref("media.eme.enabled", true);
 pref("media.eme.apiVisible", true);
+pref("browser.eme.ui.enabled", true);
 
-#ifdef XP_WIN
+#ifdef MOZ_ADOBE_EME
 pref("media.gmp-eme-adobe.enabled", true);
-pref("browser.eme.ui.enabled", true);
 #endif
 
 // Play with different values of the decay time and get telemetry,
 // 0 means to randomize (and persist) the experiment value in users' profiles,
 // -1 means no experiment is run and we use the preferred value for frecency (6h)
 pref("browser.cache.frecency_experiment", 0);
 
 pref("browser.translation.detectLanguage", false);
--- a/browser/config/mozconfigs/win32/common-opt
+++ b/browser/config/mozconfigs/win32/common-opt
@@ -27,10 +27,15 @@ export MOZILLA_OFFICIAL=1
 
 export MOZ_TELEMETRY_REPORTING=1
 
 . $topsrcdir/build/win32/mozconfig.vs2013-win64
 
 # Treat warnings as errors in directories with FAIL_ON_WARNINGS.
 ac_add_options --enable-warnings-as-errors
 
+# Enable Adobe Primetime CDM on 32-bit Windows in Mozilla builds.
+# Enabled here on the assumption that downstream vendors will not be using
+# these build configs.
+ac_add_options --enable-eme=adobe
+
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
--- a/configure.in
+++ b/configure.in
@@ -5335,27 +5335,41 @@ if test "$MOZ_WIDGET_TOOLKIT" = "gonk" -
     MOZ_GONK_MEDIACODEC=1
     AC_SUBST(MOZ_GONK_MEDIACODEC)
 fi
 
 dnl ========================================================
 dnl = EME support
 dnl ========================================================
 
-MOZ_ARG_DISABLE_BOOL(eme,
-[  --disable-eme  Disable support for Encrypted Media Extensions],
-    MOZ_EME=,
-    MOZ_EME=1)
-
+MOZ_ARG_ENABLE_STRING(eme,
+[  --enable-eme[=adobe]  Enable support for Encrypted Media Extensions  ],
+    MOZ_EME_ARGS=$enableval)
+
+if test "$MOZ_EME_ARGS"; then
+    if test "$MOZ_EME_ARGS" = "no"; then
+        dnl EME explicitly disabled with --disable-eme
+        MOZ_EME=
+    elif test "$MOZ_EME_ARGS" = "yes"; then
+        dnl EME explicitly enabled with --enable-eme
+        MOZ_EME=1
+    else
+        dnl EME explicitly enabled with --enable-eme=<args>
+        MOZ_EME=1
+        MOZ_EME_MODULES=`echo $MOZ_EME_ARGS | sed -e 's/,/ /g'`
+    fi
+fi
+
+AC_SUBST_SET(MOZ_EME_MODULES)
 if test -n "$MOZ_EME"; then
     if test -z "$MOZ_FMP4"; then
         AC_MSG_ERROR([Encrypted Media Extension support requires Fragmented MP4 support])
     fi
     AC_DEFINE(MOZ_EME)
-fi;
+fi
 
 dnl ========================================================
 dnl = Enable media plugin support
 dnl ========================================================
 if test "$OS_TARGET" = Android -a x"$MOZ_WIDGET_TOOLKIT" != x"gonk"; then
   dnl Enable support on android by default
   MOZ_ANDROID_OMX=1
 fi