From b1d7055d91d410ff0235538f71e2ae33d475acde Mon Sep 17 00:00:00 2001 From: Ed Morley Date: Mon, 4 Aug 2014 12:16:30 +0100 Subject: [PATCH] Backed out changeset 4c12508e3b69 (bug 1039666) for conflicts with bug 1037424 --- dom/media/MediaManager.cpp | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/dom/media/MediaManager.cpp b/dom/media/MediaManager.cpp index 7ef24dd8307f..abe5fbb22671 100644 --- a/dom/media/MediaManager.cpp +++ b/dom/media/MediaManager.cpp @@ -54,13 +54,6 @@ #include "MediaPermissionGonk.h" #endif -#if defined(XP_MACOSX) -#include "nsCocoaFeatures.h" -#endif -#if defined (XP_WIN) -#include "mozilla/WindowsVersion.h" -#endif - // GetCurrentTime is defined in winbase.h as zero argument macro forwarding to // GetTickCount() and conflicts with MediaStream::GetCurrentTime. #ifdef GetCurrentTime @@ -1555,17 +1548,12 @@ MediaManager::GetUserMedia(bool aPrivileged, auto& tc = c.mVideo.GetAsMediaTrackConstraints(); // deny screensharing request if support is disabled if (tc.mMediaSource != dom::MediaSourceEnum::Camera) { - if (!Preferences::GetBool("media.getusermedia.screensharing.enabled", false) || - // Block screen/window sharing on Mac OSX 10.6 and WinXP until proved that they work -#if defined(XP_MACOSX) - !nsCocoaFeatures::OnLionOrLater() || -#endif -#if defined (XP_WIN) - !IsVistaOrLater() || -#endif - /* Deny screensharing if the requesting document is not from a host - on the whitelist. */ - !HostHasPermission(*docURI)) { + if (!Preferences::GetBool("media.getusermedia.screensharing.enabled", false)) { + return runnable->Denied(NS_LITERAL_STRING("PERMISSION_DENIED")); + } + /* Deny screensharing if the requesting document is not from a host + on the whitelist. */ + if (!HostHasPermission(*docURI)) { return runnable->Denied(NS_LITERAL_STRING("PERMISSION_DENIED")); } }