Bug 1160101 - Disable Adobe EME by default; enable only in Mozilla builds. r=glandium, a=lizzard
authorEdwin Flores <edwin@mozilla.com>
Wed, 03 Jun 2015 22:44:55 +1200
changeset 266185 516ef88d8790
parent 266184 8ecfee4a2185
child 266186 a75365b95a17
push id4779
push userryanvm@gmail.com
push date2015-06-04 14:18 +0000
treeherdermozilla-beta@516ef88d8790 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium, lizzard
bugs1160101
milestone39.0
Bug 1160101 - Disable Adobe EME by default; enable only in Mozilla builds. r=glandium, a=lizzard
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
@@ -56,16 +56,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
@@ -1835,20 +1835,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
@@ -5350,27 +5350,41 @@ if test -n "$MOZ_FMP4"; then
     AC_DEFINE(MOZ_FMP4)
     MOZ_EME=1
 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