Backed out changeset 4c12508e3b69 (bug 1039666) for conflicts with bug 1037424

This commit is contained in:
Ed Morley 2014-08-04 12:16:30 +01:00
Родитель 4b72634bdc
Коммит b1d7055d91
1 изменённых файлов: 6 добавлений и 18 удалений

Просмотреть файл

@ -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"));
}
}