[MediaStream] 'devicechange' event when more capture device information are revealed.
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Dec 2018 16:28:31 +0000 (16:28 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Dec 2018 16:28:31 +0000 (16:28 +0000)
commitcc129afffe4ce4fbbb68d64362eae24e5a549d9d
tree7cf5cc0cc95d96ca5e0c87c9cc74bf8f4336969f
parentb76ba6f32ac7c25208bc4917af88ee4bec30222d
[MediaStream] 'devicechange' event when more capture device information are revealed.
https://bugs.webkit.org/show_bug.cgi?id=192268

Reviewed by Youenn Fablet.

Source/WebCore:

Test: fast/mediastream/enumerate-devices-change-event.html

* Modules/mediastream/MediaDevicesRequest.cpp:
(WebCore::MediaDevicesRequest::start): Remove code to modify device based on access, that is
now done in the UI process.
(WebCore::MediaDevicesRequest::filterDeviceList): Deleted.
* Modules/mediastream/MediaDevicesRequest.h:
* platform/mediastream/RealtimeMediaSourceCenter.h:

Source/WebKit:

* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Call captureDevicesChanged
if a filtered device list was returned previously.
(WebKit::UserMediaPermissionRequestManagerProxy::resetAccess): Clear m_hasFilteredDeviceList.
(WebKit::UserMediaPermissionRequestManagerProxy::wasGrantedVideoOrAudioAccess): New.
(WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): Filter device
list and strip device IDs if gUM permission hasn't been given.
(WebKit::UserMediaPermissionRequestManagerProxy::watchdogTimerFired): Clear m_hasFilteredDeviceList.
* UIProcess/UserMediaPermissionRequestManagerProxy.h:

LayoutTests:

* fast/mediastream/device-change-event-2.html: Fix bogus title.
* fast/mediastream/enumerate-devices-change-event-expected.txt: Added.
* fast/mediastream/enumerate-devices-change-event.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238796 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/mediastream/device-change-event-2.html
LayoutTests/fast/mediastream/enumerate-devices-change-event-expected.txt [new file with mode: 0644]
LayoutTests/fast/mediastream/enumerate-devices-change-event.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/MediaDevicesRequest.cpp
Source/WebCore/Modules/mediastream/MediaDevicesRequest.h
Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.h
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp
Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.h