[MediaStream] do not cache gUM permissions
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 May 2017 01:16:47 +0000 (01:16 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 May 2017 01:16:47 +0000 (01:16 +0000)
commit34e35f7803a3636b9d71704c55130a14f6e5563e
treee95bbc8e16b0a6ddbe4b51831ab8a268ad97cc3e
parent3e6ff3802c72f04f764d0718843bc44711148ad8
[MediaStream] do not cache gUM permissions
https://bugs.webkit.org/show_bug.cgi?id=172245

Reviewed by Youenn Fablet.

Source/WebCore:

No new tests, updated fast/mediastream/MediaDevices-getUserMedia.html.

* platform/mediastream/RealtimeMediaSourceCenter.cpp:
(WebCore::RealtimeMediaSourceCenter::validateRequestConstraints): Add salt parameter.
* platform/mediastream/RealtimeMediaSourceCenter.h:

Source/WebKit2:

* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::invalidatePendingRequests):
(WebKit::UserMediaPermissionRequestManagerProxy::createRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasDenied):
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted):
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
(WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
(WebKit::FrameAuthorizationState::FrameAuthorizationState): Deleted.
(WebKit::FrameAuthorizationState::hasPermissionToUseCaptureDevice): Deleted.
(WebKit::FrameAuthorizationState::setHasPermissionToUseCaptureDevice): Deleted.
(WebKit::FrameAuthorizationState::ensureSecurityOriginsAreEqual): Deleted.
(WebKit::UserMediaPermissionRequestManagerProxy::stateForRequest): Deleted.
* UIProcess/UserMediaPermissionRequestManagerProxy.h:
(WebKit::FrameAuthorizationState::setDeviceIdentifierHashSalt): Deleted.
(WebKit::FrameAuthorizationState::deviceIdentifierHashSalt): Deleted.
* UIProcess/UserMediaPermissionRequestProxy.cpp:
(WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):
* UIProcess/UserMediaPermissionRequestProxy.h:
(WebKit::UserMediaPermissionRequestProxy::create):
(WebKit::UserMediaPermissionRequestProxy::deviceIdentifierHashSalt):

LayoutTests:

* fast/mediastream/MediaDevices-getUserMedia-expected.txt: Updated.
* fast/mediastream/MediaDevices-getUserMedia.html:
* http/tests/media/media-stream/get-user-media-prompt-expected.txt:
* http/tests/media/media-stream/get-user-media-prompt.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217081 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/mediastream/MediaDevices-getUserMedia-expected.txt
LayoutTests/fast/mediastream/MediaDevices-getUserMedia.html
LayoutTests/http/tests/media/media-stream/get-user-media-prompt-expected.txt
LayoutTests/http/tests/media/media-stream/get-user-media-prompt.html
Source/WebCore/ChangeLog
Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.cpp
Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.h
Source/WebCore/platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp
Source/WebCore/platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/UserMediaPermissionRequestManagerProxy.cpp
Source/WebKit2/UIProcess/UserMediaPermissionRequestManagerProxy.h
Source/WebKit2/UIProcess/UserMediaPermissionRequestProxy.cpp
Source/WebKit2/UIProcess/UserMediaPermissionRequestProxy.h