Remove MediaConstraintsData and MediaConstraintsImpl
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 May 2017 08:51:50 +0000 (08:51 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 May 2017 08:51:50 +0000 (08:51 +0000)
commit56d4c6821b1a6f5cb9c6e1665052ef5c58320e4a
treeb33ec068b129a7bcf699d411c2b719a8d614464f
parentac37fc27edea27d06653f5cbae0354c66abd8707
Remove MediaConstraintsData and MediaConstraintsImpl
https://bugs.webkit.org/show_bug.cgi?id=172132

Patch by Youenn Fablet <youenn@apple.com> on 2017-05-16
Reviewed by Eric Carlson.

Source/WebCore:

No observable change of behavior.

Removing MediaConstraintsData and MediaConstraintsImpl allows simplifying the code.
Further simplified the code by making MediaConstraints no longer ref counted and now a struct.
Simplified some RealtimeMediaSource subclasses by removing unused MediaConstraints class members.

* CMakeLists.txt: Removing MediaConstraintsImpl.cpp.
* Modules/mediastream/MediaConstraintsImpl.cpp: Removed.
* Modules/mediastream/MediaConstraintsImpl.h: Removed.
* Modules/mediastream/MediaDevices.cpp:
(WebCore::createMediaConstraints):
(WebCore::MediaDevices::getUserMedia):
(WebCore::createMediaConstraintsImpl): Deleted.
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::createMediaConstraints):
(WebCore::MediaStreamTrack::applyConstraints):
(WebCore::createMediaConstraintsImpl): Deleted.
* Modules/mediastream/MediaTrackConstraints.cpp:
(WebCore::createMediaConstraints):
(WebCore::createMediaConstraintsImpl): Deleted.
* Modules/mediastream/MediaTrackConstraints.h:
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::start):
(WebCore::UserMediaRequest::UserMediaRequest):
(WebCore::UserMediaRequest::allow):
* Modules/mediastream/UserMediaRequest.h:
(WebCore::UserMediaRequest::audioConstraints):
(WebCore::UserMediaRequest::videoConstraints):
* WebCore.xcodeproj/project.pbxproj:
* platform/mediastream/MediaConstraints.cpp:
(WebCore::addDefaultVideoConstraints):
(WebCore::MediaConstraints::isConstraintSet):
(WebCore::MediaConstraints::setDefaultVideoConstraints):
* platform/mediastream/MediaConstraints.h:
(WebCore::MediaConstraints::~MediaConstraints): Deleted.
(WebCore::MediaConstraints::MediaConstraints): Deleted.
* platform/mediastream/MediaStreamConstraintsValidationClient.h:
* platform/mediastream/RealtimeMediaSource.cpp:
(WebCore::RealtimeMediaSource::selectSettings):
(WebCore::RealtimeMediaSource::supportsConstraints):
(WebCore::RealtimeMediaSource::applyConstraints):
* platform/mediastream/RealtimeMediaSourceCenter.cpp:
(WebCore::RealtimeMediaSourceCenter::validateRequestConstraints):
* platform/mediastream/RealtimeMediaSourceCenter.h:
* platform/mediastream/mac/RealtimeIncomingAudioSource.cpp:
(WebCore::RealtimeIncomingAudioSource::supportedConstraints): Deleted.
* platform/mediastream/mac/RealtimeIncomingAudioSource.h:
* platform/mediastream/mac/RealtimeIncomingVideoSource.cpp:
(WebCore::RealtimeIncomingVideoSource::supportedConstraints): Deleted.
* platform/mediastream/mac/RealtimeIncomingVideoSource.h:
* platform/mock/MockRealtimeMediaSource.h:
(WebCore::MockRealtimeMediaSource::constraints): Deleted.

Source/WebKit2:

Removing MediaConstraintsData and MediaConstraintsImpl allows simplifying the code.
Further simplified the code by making MediaConstraints no longer ref counted and now a struct.

* Scripts/webkit/messages.py:
(headers_for_type):
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<MediaConstraints>::encode):
(IPC::ArgumentCoder<MediaConstraints>::decode):
(IPC::ArgumentCoder<MediaConstraintsData>::encode): Deleted.
(IPC::ArgumentCoder<MediaConstraintsData>::decode): Deleted.
* Shared/WebCoreArgumentCoders.h:
* UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
(WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):
(WebKit::UserMediaCaptureManagerProxy::applyConstraints):
* UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
* UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
* UIProcess/UserMediaPermissionRequestManagerProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
(WebKit::UserMediaPermissionRequestManager::sendUserMediaRequest):
* WebProcess/cocoa/UserMediaCaptureManager.cpp:
(WebKit::UserMediaCaptureManager::applyConstraints):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216918 268f45cc-cd09-0410-ab3c-d52691b4dbfc
36 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/MediaConstraintsImpl.cpp [deleted file]
Source/WebCore/Modules/mediastream/MediaConstraintsImpl.h [deleted file]
Source/WebCore/Modules/mediastream/MediaDevices.cpp
Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp
Source/WebCore/Modules/mediastream/MediaTrackConstraints.cpp
Source/WebCore/Modules/mediastream/MediaTrackConstraints.h
Source/WebCore/Modules/mediastream/UserMediaRequest.cpp
Source/WebCore/Modules/mediastream/UserMediaRequest.h
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/mediastream/MediaConstraints.cpp
Source/WebCore/platform/mediastream/MediaConstraints.h
Source/WebCore/platform/mediastream/MediaStreamConstraintsValidationClient.h
Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp
Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.cpp
Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.h
Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSource.cpp
Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSource.h
Source/WebCore/platform/mediastream/mac/RealtimeIncomingVideoSource.cpp
Source/WebCore/platform/mediastream/mac/RealtimeIncomingVideoSource.h
Source/WebCore/platform/mock/MockRealtimeMediaSource.h
Source/WebKit2/ChangeLog
Source/WebKit2/Scripts/webkit/messages.py
Source/WebKit2/Shared/WebCoreArgumentCoders.cpp
Source/WebKit2/Shared/WebCoreArgumentCoders.h
Source/WebKit2/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp
Source/WebKit2/UIProcess/Cocoa/UserMediaCaptureManagerProxy.h
Source/WebKit2/UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in
Source/WebKit2/UIProcess/UserMediaPermissionRequestManagerProxy.cpp
Source/WebKit2/UIProcess/UserMediaPermissionRequestManagerProxy.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp
Source/WebKit2/WebProcess/cocoa/UserMediaCaptureManager.cpp