summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps/extensions/GMPUtils.jsm
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-02-06 06:07:37 -0500
committerMatt A. Tobin <email@mattatobin.com>2020-02-06 06:07:37 -0500
commit758618b6054d9332a8a0bd79f73623abfd5e1d3c (patch)
treedc43ee1b34ea6cf86e7061905abd347eab88eb1e /toolkit/mozapps/extensions/GMPUtils.jsm
parent43f91872bdaea906e6b30b44d265da3ad202991a (diff)
downloadUXP-758618b6054d9332a8a0bd79f73623abfd5e1d3c.tar
UXP-758618b6054d9332a8a0bd79f73623abfd5e1d3c.tar.gz
UXP-758618b6054d9332a8a0bd79f73623abfd5e1d3c.tar.lz
UXP-758618b6054d9332a8a0bd79f73623abfd5e1d3c.tar.xz
UXP-758618b6054d9332a8a0bd79f73623abfd5e1d3c.zip
Issue #65 - Remove AppConstants from toolkit/mozapps/extensions
Diffstat (limited to 'toolkit/mozapps/extensions/GMPUtils.jsm')
-rw-r--r--toolkit/mozapps/extensions/GMPUtils.jsm17
1 files changed, 10 insertions, 7 deletions
diff --git a/toolkit/mozapps/extensions/GMPUtils.jsm b/toolkit/mozapps/extensions/GMPUtils.jsm
index 814ae4914..3c691610d 100644
--- a/toolkit/mozapps/extensions/GMPUtils.jsm
+++ b/toolkit/mozapps/extensions/GMPUtils.jsm
@@ -15,7 +15,6 @@ this.EXPORTED_SYMBOLS = [ "GMP_PLUGIN_IDS",
Cu.import("resource://gre/modules/Preferences.jsm");
Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/AppConstants.jsm");
// GMP IDs
const OPEN_H264_ID = "gmp-gmpopenh264";
@@ -71,21 +70,25 @@ this.GMPUtils = {
return true;
}
if (aPlugin.id == WIDEVINE_ID) {
+
+#if defined(XP_WIN) || defined(XP_LINUX) || defined(XP_MACOSX)
// The Widevine plugin is available for Windows versions Vista and later,
// Mac OSX, and Linux.
- return AppConstants.isPlatformAndVersionAtLeast("win", "6") ||
- AppConstants.platform == "macosx" ||
- AppConstants.platform == "linux";
+ return true;
+#else
+ return false;
+#endif
}
return true;
},
_is32bitModeMacOS: function() {
- if (AppConstants.platform != "macosx") {
- return false;
- }
+#ifdef XP_MACOSX
return Services.appinfo.XPCOMABI.split("-")[0] == "x86";
+#else
+ return false;
+#endif
},
/**