Bug 1287827 - Part 5. Remove Loop's special permissions for about:loopconversation from MediaManager. r=jib

This commit is contained in:
Mark Banner 2016-07-27 11:42:26 +01:00
Родитель f12f4ca9c9
Коммит 3dee065445
1 изменённых файлов: 2 добавлений и 12 удалений

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

@ -2074,7 +2074,7 @@ MediaManager::GetUserMedia(nsPIDOMWindowInner* aWindow,
return NS_ERROR_UNEXPECTED;
}
bool loop = IsLoop(docURI);
bool privileged = loop || IsPrivileged();
bool privileged = IsPrivileged();
bool isHTTPS = false;
docURI->SchemeIs("https", &isHTTPS);
nsCString host;
@ -2168,7 +2168,7 @@ MediaManager::GetUserMedia(nsPIDOMWindowInner* aWindow,
false) && !IsVistaOrLater()) ||
#endif
(!privileged && !HostIsHttps(*docURI)) ||
!(loop || HostHasPermission(*docURI))) {
!HostHasPermission(*docURI)) {
RefPtr<MediaStreamError> error =
new MediaStreamError(aWindow,
NS_LITERAL_STRING("NotAllowedError"));
@ -2213,16 +2213,6 @@ MediaManager::GetUserMedia(nsPIDOMWindowInner* aWindow,
}
}
}
// For all but tab sharing, Loop needs to prompt as we are using the
// permission menu for selection of the device currently. For tab sharing,
// Loop has implicit permissions within Firefox, as it is built-in,
// and will manage the active tab and provide appropriate UI.
if (loop && (videoType == MediaSourceEnum::Window ||
videoType == MediaSourceEnum::Application ||
videoType == MediaSourceEnum::Screen)) {
privileged = false;
}
} else if (IsOn(c.mVideo)) {
videoType = MediaSourceEnum::Camera;
}