Source/WebCore/ChangeLog

 12015-10-28 Adam Bergkvist <adam.bergkvist@ericsson.com>
 2
 3 WebRTC: Update RTCPeerConnection API and introduce PeerConnectionBackend
 4 https://bugs.webkit.org/show_bug.cgi?id=150166
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 This change introduces PeerConnectionBackend which is a WebCore interface
 9 that allows RTCPeerConnection to have platform abstractions at different
 10 levels. For example, the MediaEndpoint interface [1] is a lower level
 11 WebRTC backend abstraction where a big part of the WebRTC specification
 12 is implemented in WebCore to be reusable. RTCPeerConnectionHandler (in
 13 the repo today) is on the other hand a higher level WebRTC backend
 14 abstraction where the calls are mostly forwarded directly to the
 15 backend. The PeerConnectionBackend interface facilitates both approaches.
 16
 17 RTCPeerConnection
 18 | (has)
 19 |
 20 PeerConnectionBackend
 21 | |
 22 | | (realizes)
 23 | MediaEndpointPeerConnection
 24 | | (has)
 25 | |
 26 | MediaEndpoint (platform interface)
 27 |
 28 | (realizes)
 29 RTCPeerHandlerPeerConnection
 30 | (has)
 31 |
 32 RCPeerConnectionHandler (existing platform interface)
 33
 34 Notable changes:
 35
 36 # Overloaded methods on RTCPeerConnection (Promise + legacy callback
 37 signatures) are implemented with JSBuiltins.
 38
 39 # "Queued operations" ([1] Section 4.3.1) is implemented in JS bindings
 40 with Promises. Issue: Non-queued operations are still exposed to the
 41 script (see FIXME in RTCPeerConnection.idl).
 42
 43 # New RTCPeerConnection features
 44 - add/removeTrack()
 45 - pending/currentLocal/RemoteDescription attributes
 46 - RTCRtpSender/Receiver
 47
 48 # Information carrying objects like RTCSessionDescription and
 49 RTCCandidate don't encapsulate a "mirrored" platform object anymore.
 50
 51 # Remove RTCPeerConnection specific callback implementations (not used
 52 with JS bindings)
 53
 54 [1] http://webkit.org/b/150165
 55 [2] https://w3c.github.io/webrtc-pc/archives/20151006/webrtc.html
 56
 57 Tests: Mock should be added to test future WebRTC backend abstractions.
 58
 59 * CMakeLists.txt:
 60 * DerivedSources.make:
 61 * Modules/mediastream/PeerConnectionBackend.cpp: Added.
 62 (WebCore::createPeerConnectionBackend):
 63 * Modules/mediastream/PeerConnectionBackend.h: Added.
 64 (WebCore::PeerConnectionBackendClient::~PeerConnectionBackendClient):
 65 (WebCore::PeerConnectionBackend::~PeerConnectionBackend):
 66 * Modules/mediastream/PeerConnectionStates.h: Added.
 67 * Modules/mediastream/RTCConfiguration.cpp: Added.
 68 (WebCore::validateIceServerURL):
 69 (WebCore::parseIceServer):
 70 (WebCore::RTCConfiguration::create):
 71 (WebCore::RTCConfiguration::RTCConfiguration):
 72 (WebCore::RTCConfiguration::initialize):
 73 * Modules/mediastream/RTCConfiguration.h:
 74 (WebCore::RTCConfiguration::iceTransportPolicy):
 75 (WebCore::RTCConfiguration::bundlePolicy):
 76 (WebCore::RTCConfiguration::iceServers):
 77 (WebCore::RTCConfiguration::create): Deleted.
 78 (WebCore::RTCConfiguration::appendServer): Deleted.
 79 (WebCore::RTCConfiguration::numberOfServers): Deleted.
 80 (WebCore::RTCConfiguration::server): Deleted.
 81 (WebCore::RTCConfiguration::iceTransports): Deleted.
 82 (WebCore::RTCConfiguration::setIceTransports): Deleted.
 83 (WebCore::RTCConfiguration::requestIdentity): Deleted.
 84 (WebCore::RTCConfiguration::setRequestIdentity): Deleted.
 85 (WebCore::RTCConfiguration::privateConfiguration): Deleted.
 86 (WebCore::RTCConfiguration::RTCConfiguration): Deleted.
 87 * Modules/mediastream/RTCConfiguration.idl:
 88 * Modules/mediastream/RTCIceCandidate.cpp:
 89 (WebCore::RTCIceCandidate::create):
 90 (WebCore::RTCIceCandidate::RTCIceCandidate):
 91 (WebCore::RTCIceCandidate::candidate):
 92 (WebCore::RTCIceCandidate::setCandidate):
 93 (WebCore::RTCIceCandidate::sdpMid):
 94 (WebCore::RTCIceCandidate::setSdpMid):
 95 (WebCore::RTCIceCandidate::sdpMLineIndex):
 96 (WebCore::RTCIceCandidate::setSdpMLineIndex):
 97 (WebCore::RTCIceCandidate::descriptor): Deleted.
 98 * Modules/mediastream/RTCIceCandidate.h:
 99 * Modules/mediastream/RTCIceCandidate.idl:
 100 * Modules/mediastream/RTCIceCandidateEvent.cpp:
 101 (WebCore::RTCIceCandidateEvent::create):
 102 (WebCore::RTCIceCandidateEvent::RTCIceCandidateEvent):
 103 * Modules/mediastream/RTCIceCandidateEvent.h:
 104 * Modules/mediastream/RTCIceServer.h:
 105 (WebCore::RTCIceServer::urls):
 106 (WebCore::RTCIceServer::credential):
 107 (WebCore::RTCIceServer::username):
 108 (WebCore::RTCIceServer::RTCIceServer):
 109 (WebCore::RTCIceServer::create): Deleted.
 110 (WebCore::RTCIceServer::privateServer): Deleted.
 111 * Modules/mediastream/RTCOfferAnswerOptions.cpp:
 112 (WebCore::RTCOfferAnswerOptions::RTCOfferAnswerOptions):
 113 (WebCore::RTCOfferAnswerOptions::initialize):
 114 (WebCore::RTCOfferOptions::RTCOfferOptions):
 115 (WebCore::RTCOfferOptions::initialize):
 116 (WebCore::RTCAnswerOptions::create):
 117 (WebCore::RTCAnswerOptions::initialize):
 118 (WebCore::RTCOfferAnswerOptions::create): Deleted.
 119 * Modules/mediastream/RTCOfferAnswerOptions.h:
 120 (WebCore::RTCOfferAnswerOptions::voiceActivityDetection):
 121 (WebCore::RTCOfferOptions::~RTCOfferOptions):
 122 (WebCore::RTCOfferOptions::offerToReceiveVideo):
 123 (WebCore::RTCOfferOptions::offerToReceiveAudio):
 124 (WebCore::RTCOfferOptions::iceRestart):
 125 (WebCore::RTCAnswerOptions::~RTCAnswerOptions):
 126 (WebCore::RTCAnswerOptions::RTCAnswerOptions):
 127 (WebCore::RTCOfferAnswerOptions::requestIdentity): Deleted.
 128 (WebCore::RTCOfferAnswerOptions::privateOfferAnswerOptions): Deleted.
 129 (WebCore::RTCOfferAnswerOptions::RTCOfferAnswerOptions): Deleted.
 130 (WebCore::RTCOfferOptions::voiceActivityDetection): Deleted.
 131 (WebCore::RTCOfferOptions::privateOfferOptions): Deleted.
 132 (WebCore::RTCOfferOptions::RTCOfferOptions): Deleted.
 133 * Modules/mediastream/RTCPeerConnection.cpp:
 134 (WebCore::RTCPeerConnection::create):
 135 (WebCore::RTCPeerConnection::RTCPeerConnection):
 136 (WebCore::RTCPeerConnection::getSenders):
 137 (WebCore::RTCPeerConnection::getReceivers):
 138 (WebCore::RTCPeerConnection::addTrack):
 139 (WebCore::RTCPeerConnection::removeTrack):
 140 (WebCore::RTCPeerConnection::internalCreateOffer):
 141 (WebCore::RTCPeerConnection::internalCreateAnswer):
 142 (WebCore::RTCPeerConnection::internalSetLocalDescription):
 143 (WebCore::RTCPeerConnection::localDescription):
 144 (WebCore::RTCPeerConnection::currentLocalDescription):
 145 (WebCore::RTCPeerConnection::pendingLocalDescription):
 146 (WebCore::RTCPeerConnection::internalSetRemoteDescription):
 147 (WebCore::RTCPeerConnection::remoteDescription):
 148 (WebCore::RTCPeerConnection::currentRemoteDescription):
 149 (WebCore::RTCPeerConnection::pendingRemoteDescription):
 150 (WebCore::RTCPeerConnection::internalAddIceCandidate):
 151 (WebCore::RTCPeerConnection::signalingState):
 152 (WebCore::RTCPeerConnection::iceGatheringState):
 153 (WebCore::RTCPeerConnection::iceConnectionState):
 154 (WebCore::RTCPeerConnection::setConfiguration):
 155 (WebCore::RTCPeerConnection::internalGetStats):
 156 (WebCore::RTCPeerConnection::createDataChannel):
 157 (WebCore::RTCPeerConnection::close):
 158 (WebCore::RTCPeerConnection::stop):
 159 (WebCore::RTCPeerConnection::setSignalingState):
 160 (WebCore::RTCPeerConnection::updateIceGatheringState):
 161 (WebCore::RTCPeerConnection::updateIceConnectionState):
 162 (WebCore::RTCPeerConnection::scheduleNegotiationNeededEvent):
 163 (WebCore::RTCPeerConnection::fireEvent):
 164 (WebCore::validateIceServerURL): Deleted.
 165 (WebCore::processIceServer): Deleted.
 166 (WebCore::RTCPeerConnection::parseConfiguration): Deleted.
 167 (WebCore::RTCPeerConnection::~RTCPeerConnection): Deleted.
 168 (WebCore::RTCPeerConnection::createOffer): Deleted.
 169 (WebCore::RTCPeerConnection::createAnswer): Deleted.
 170 (WebCore::RTCPeerConnection::checkStateForLocalDescription): Deleted.
 171 (WebCore::RTCPeerConnection::checkStateForRemoteDescription): Deleted.
 172 (WebCore::RTCPeerConnection::setLocalDescription): Deleted.
 173 (WebCore::RTCPeerConnection::setRemoteDescription): Deleted.
 174 (WebCore::RTCPeerConnection::updateIce): Deleted.
 175 (WebCore::RTCPeerConnection::addIceCandidate): Deleted.
 176 (WebCore::RTCPeerConnection::addStream): Deleted.
 177 (WebCore::RTCPeerConnection::removeStream): Deleted.
 178 (WebCore::RTCPeerConnection::getLocalStreams): Deleted.
 179 (WebCore::RTCPeerConnection::getRemoteStreams): Deleted.
 180 (WebCore::RTCPeerConnection::getStreamById): Deleted.
 181 (WebCore::RTCPeerConnection::getStats): Deleted.
 182 (WebCore::RTCPeerConnection::hasLocalStreamWithTrackId): Deleted.
 183 (WebCore::RTCPeerConnection::createDTMFSender): Deleted.
 184 (WebCore::RTCPeerConnection::negotiationNeeded): Deleted.
 185 (WebCore::RTCPeerConnection::didGenerateIceCandidate): Deleted.
 186 (WebCore::RTCPeerConnection::didChangeSignalingState): Deleted.
 187 (WebCore::RTCPeerConnection::didChangeIceGatheringState): Deleted.
 188 (WebCore::RTCPeerConnection::didChangeIceConnectionState): Deleted.
 189 (WebCore::RTCPeerConnection::didAddRemoteStream): Deleted.
 190 (WebCore::RTCPeerConnection::didRemoveRemoteStream): Deleted.
 191 (WebCore::RTCPeerConnection::didAddRemoteDataChannel): Deleted.
 192 (WebCore::RTCPeerConnection::didAddOrRemoveTrack): Deleted.
 193 (WebCore::RTCPeerConnection::changeSignalingState): Deleted.
 194 (WebCore::RTCPeerConnection::changeIceGatheringState): Deleted.
 195 (WebCore::RTCPeerConnection::changeIceConnectionState): Deleted.
 196 (WebCore::RTCPeerConnection::scheduleDispatchEvent): Deleted.
 197 (WebCore::RTCPeerConnection::scheduledEventTimerFired): Deleted.
 198 * Modules/mediastream/RTCPeerConnection.h:
 199 * Modules/mediastream/RTCPeerConnection.idl:
 200 * Modules/mediastream/RTCPeerConnection.js: Added.
 201 (createOffer):
 202 (createAnswer):
 203 (setLocalDescription):
 204 (setRemoteDescription):
 205 (addIceCandidate):
 206 (getStats):
 207 * Modules/mediastream/RTCPeerConnectionErrorCallback.h:
 208 (WebCore::RTCPeerConnectionErrorCallback::~RTCPeerConnectionErrorCallback): Deleted.
 209 * Modules/mediastream/RTCPeerConnectionInternals.js: Added.
 210 (runNext):
 211 (runQueuedOperation):
 212 * Modules/mediastream/RTCRtpReceiver.cpp: Added.
 213 (WebCore::RTCRtpReceiver::create):
 214 (WebCore::RTCRtpReceiver::RTCRtpReceiver):
 215 (WebCore::RTCRtpReceiver::~RTCRtpReceiver):
 216 * Modules/mediastream/RTCRtpReceiver.h: Added.
 217 * Modules/mediastream/RTCRtpReceiver.idl: Added.
 218 * Modules/mediastream/RTCRtpSender.cpp: Added.
 219 (WebCore::RTCRtpSender::create):
 220 (WebCore::RTCRtpSender::RTCRtpSender):
 221 (WebCore::RTCRtpSender::~RTCRtpSender):
 222 * Modules/mediastream/RTCRtpSender.h: Added.
 223 (WebCore::RTCRtpSender::mediaStreamId):
 224 * Modules/mediastream/RTCRtpSender.idl: Added.
 225 * Modules/mediastream/RTCRtpSenderReceiverBase.cpp: Added.
 226 (WebCore::RTCRtpSenderReceiverBase::RTCRtpSenderReceiverBase):
 227 (WebCore::RTCRtpSenderReceiverBase::~RTCRtpSenderReceiverBase):
 228 (WebCore::RTCRtpSenderReceiverBase::track):
 229 * Modules/mediastream/RTCRtpSenderReceiverBase.h: Added.
 230 * Modules/mediastream/RTCSessionDescription.cpp:
 231 (WebCore::RTCSessionDescription::create):
 232 (WebCore::RTCSessionDescription::RTCSessionDescription):
 233 (WebCore::RTCSessionDescription::type):
 234 (WebCore::RTCSessionDescription::setType):
 235 (WebCore::RTCSessionDescription::sdp):
 236 (WebCore::RTCSessionDescription::setSdp):
 237 (WebCore::RTCSessionDescription::descriptor): Deleted.
 238 * Modules/mediastream/RTCSessionDescription.h:
 239 * Modules/mediastream/RTCSessionDescriptionCallback.h:
 240 (WebCore::RTCSessionDescriptionCallback::~RTCSessionDescriptionCallback): Deleted.
 241 * Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp: Removed.
 242 (WebCore::RTCSessionDescriptionRequestImpl::create): Deleted.
 243 (WebCore::RTCSessionDescriptionRequestImpl::RTCSessionDescriptionRequestImpl): Deleted.
 244 (WebCore::RTCSessionDescriptionRequestImpl::~RTCSessionDescriptionRequestImpl): Deleted.
 245 (WebCore::RTCSessionDescriptionRequestImpl::requestSucceeded): Deleted.
 246 (WebCore::RTCSessionDescriptionRequestImpl::requestFailed): Deleted.
 247 (WebCore::RTCSessionDescriptionRequestImpl::stop): Deleted.
 248 (WebCore::RTCSessionDescriptionRequestImpl::activeDOMObjectName): Deleted.
 249 (WebCore::RTCSessionDescriptionRequestImpl::canSuspendForPageCache): Deleted.
 250 (WebCore::RTCSessionDescriptionRequestImpl::clear): Deleted.
 251 * Modules/mediastream/RTCSessionDescriptionRequestImpl.h: Removed.
 252 * Modules/mediastream/RTCStatsCallback.h: Removed.
 253 (WebCore::RTCStatsCallback::~RTCStatsCallback): Deleted.
 254 * Modules/mediastream/RTCStatsCallback.idl: Removed.
 255 * Modules/mediastream/RTCStatsRequestImpl.cpp: Removed.
 256 (WebCore::RTCStatsRequestImpl::create): Deleted.
 257 (WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl): Deleted.
 258 (WebCore::RTCStatsRequestImpl::~RTCStatsRequestImpl): Deleted.
 259 (WebCore::RTCStatsRequestImpl::createResponse): Deleted.
 260 (WebCore::RTCStatsRequestImpl::hasSelector): Deleted.
 261 (WebCore::RTCStatsRequestImpl::track): Deleted.
 262 (WebCore::RTCStatsRequestImpl::requestSucceeded): Deleted.
 263 (WebCore::RTCStatsRequestImpl::requestFailed): Deleted.
 264 (WebCore::RTCStatsRequestImpl::stop): Deleted.
 265 (WebCore::RTCStatsRequestImpl::activeDOMObjectName): Deleted.
 266 (WebCore::RTCStatsRequestImpl::canSuspendForPageCache): Deleted.
 267 (WebCore::RTCStatsRequestImpl::clear): Deleted.
 268 * Modules/mediastream/RTCStatsRequestImpl.h: Removed.
 269 * Modules/mediastream/RTCTrackEvent.cpp: Added.
 270 (WebCore::RTCTrackEventInit::RTCTrackEventInit):
 271 (WebCore::RTCTrackEvent::create):
 272 (WebCore::RTCTrackEvent::RTCTrackEvent):
 273 (WebCore::RTCTrackEvent::~RTCTrackEvent):
 274 * Modules/mediastream/RTCTrackEvent.h: Added.
 275 (WebCore::RTCTrackEvent::receiver):
 276 (WebCore::RTCTrackEvent::track):
 277 (WebCore::RTCTrackEvent::eventInterface):
 278 * Modules/mediastream/RTCTrackEvent.idl: Added.
 279 * Modules/mediastream/RTCVoidRequestImpl.cpp: Removed.
 280 (WebCore::RTCVoidRequestImpl::create): Deleted.
 281 (WebCore::RTCVoidRequestImpl::RTCVoidRequestImpl): Deleted.
 282 (WebCore::RTCVoidRequestImpl::~RTCVoidRequestImpl): Deleted.
 283 (WebCore::RTCVoidRequestImpl::requestSucceeded): Deleted.
 284 (WebCore::RTCVoidRequestImpl::requestFailed): Deleted.
 285 (WebCore::RTCVoidRequestImpl::stop): Deleted.
 286 (WebCore::RTCVoidRequestImpl::activeDOMObjectName): Deleted.
 287 (WebCore::RTCVoidRequestImpl::canSuspendForPageCache): Deleted.
 288 (WebCore::RTCVoidRequestImpl::clear): Deleted.
 289 * WebCore.xcodeproj/project.pbxproj:
 290 * bindings/js/JSDictionary.cpp:
 291 (WebCore::JSDictionary::convertValue):
 292 * bindings/js/JSDictionary.h:
 293 * bindings/js/WebCoreBuiltinNames.h:
 294 * bindings/js/WebCoreJSBuiltinInternals.h:
 295 (WebCore::JSBuiltinInternalFunctions::JSBuiltinInternalFunctions):
 296 (WebCore::JSBuiltinInternalFunctions::rTCPeerConnectionInternals):
 297 (WebCore::JSBuiltinInternalFunctions::visit):
 298 (WebCore::JSBuiltinInternalFunctions::init):
 299 * bindings/js/WebCoreJSBuiltins.cpp:
 300 * bindings/js/WebCoreJSBuiltins.h:
 301 (WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
 302 (WebCore::JSBuiltinFunctions::rTCPeerConnectionBuiltins):
 303 (WebCore::JSBuiltinFunctions::rTCPeerConnectionInternalsBuiltins):
 304 * dom/EventNames.in:
 305
13062015-10-28 Chris Dumez <cdumez@apple.com>
2307
3308 Assertion failure in WebCore::FrameLoader::stopLoading() running fast/events tests
191695

Source/WebCore/CMakeLists.txt

@@set(WebCore_NON_SVG_IDL_FILES
252252 Modules/mediastream/RTCIceCandidateEvent.idl
253253 Modules/mediastream/RTCIceServer.idl
254254 Modules/mediastream/RTCPeerConnection.idl
255  Modules/mediastream/RTCPeerConnectionErrorCallback.idl
 255 Modules/mediastream/RTCRtpReceiver.idl
 256 Modules/mediastream/RTCRtpSender.idl
256257 Modules/mediastream/RTCSessionDescription.idl
257  Modules/mediastream/RTCSessionDescriptionCallback.idl
258  Modules/mediastream/RTCStatsCallback.idl
259258 Modules/mediastream/RTCStatsReport.idl
260259 Modules/mediastream/RTCStatsResponse.idl
 260 Modules/mediastream/RTCTrackEvent.idl
261261 Modules/mediastream/SourceInfo.idl
262262
263263 Modules/navigatorcontentutils/NavigatorContentUtils.idl

@@set(WebCore_SOURCES
951951 Modules/mediastream/MediaTrackConstraints.cpp
952952 Modules/mediastream/NavigatorMediaDevices.cpp
953953 Modules/mediastream/NavigatorUserMediaError.cpp
 954 Modules/mediastream/PeerConnectionBackend.cpp
 955 Modules/mediastream/RTCConfiguration.cpp
954956 Modules/mediastream/RTCDTMFSender.cpp
955957 Modules/mediastream/RTCDTMFToneChangeEvent.cpp
956958 Modules/mediastream/RTCDataChannel.cpp

@@set(WebCore_SOURCES
959961 Modules/mediastream/RTCIceCandidateEvent.cpp
960962 Modules/mediastream/RTCOfferAnswerOptions.cpp
961963 Modules/mediastream/RTCPeerConnection.cpp
 964 Modules/mediastream/RTCRtpReceiver.cpp
 965 Modules/mediastream/RTCRtpSender.cpp
 966 Modules/mediastream/RTCRtpSenderReceiverBase.cpp
962967 Modules/mediastream/RTCSessionDescription.cpp
963  Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp
964968 Modules/mediastream/RTCStatsReport.cpp
965  Modules/mediastream/RTCStatsRequestImpl.cpp
966969 Modules/mediastream/RTCStatsResponse.cpp
967  Modules/mediastream/RTCVoidRequestImpl.cpp
 970 Modules/mediastream/RTCTrackEvent.cpp
968971 Modules/mediastream/SourceInfo.cpp
969972 Modules/mediastream/UserMediaController.cpp
970973 Modules/mediastream/UserMediaRequest.cpp

@@GENERATE_BINDINGS(WebCoreTestSupport_SOU
35883591
35893592set(WebCore_BUILTINS_SOURCES
35903593 ${WEBCORE_DIR}/Modules/mediastream/MediaDevices.js
 3594 ${WEBCORE_DIR}/Modules/mediastream/RTCPeerConnection.js
 3595 ${WEBCORE_DIR}/Modules/mediastream/RTCPeerConnectionInternals.js
35913596 ${WEBCORE_DIR}/Modules/streams/ByteLengthQueuingStrategy.js
35923597 ${WEBCORE_DIR}/Modules/streams/CountQueuingStrategy.js
35933598 ${WEBCORE_DIR}/Modules/streams/ReadableStream.js
191695

Source/WebCore/DerivedSources.make

@@NON_SVG_BINDING_IDLS = \
148148 $(WebCore)/Modules/mediastream/RTCIceCandidateEvent.idl \
149149 $(WebCore)/Modules/mediastream/RTCIceServer.idl \
150150 $(WebCore)/Modules/mediastream/RTCPeerConnection.idl \
151  $(WebCore)/Modules/mediastream/RTCPeerConnectionErrorCallback.idl \
 151 $(WebCore)/Modules/mediastream/RTCRtpReceiver.idl \
 152 $(WebCore)/Modules/mediastream/RTCRtpSender.idl \
152153 $(WebCore)/Modules/mediastream/RTCSessionDescription.idl \
153  $(WebCore)/Modules/mediastream/RTCSessionDescriptionCallback.idl \
154  $(WebCore)/Modules/mediastream/RTCStatsCallback.idl \
155154 $(WebCore)/Modules/mediastream/RTCStatsReport.idl \
156155 $(WebCore)/Modules/mediastream/RTCStatsResponse.idl \
 156 $(WebCore)/Modules/mediastream/RTCTrackEvent.idl \
157157 $(WebCore)/Modules/mediastream/SourceInfo.idl \
158158 $(WebCore)/Modules/notifications/DOMWindowNotifications.idl \
159159 $(WebCore)/Modules/notifications/Notification.idl \

@@WebReplayInputs.h : $(INPUT_GENERATOR_SP
12571257
12581258WebCore_BUILTINS_SOURCES = \
12591259 $(WebCore)/Modules/mediastream/MediaDevices.js \
 1260 $(WebCore)/Modules/mediastream/RTCPeerConnection.js \
 1261 $(WebCore)/Modules/mediastream/RTCPeerConnectionInternals.js \
12601262 $(WebCore)/Modules/streams/ByteLengthQueuingStrategy.js \
12611263 $(WebCore)/Modules/streams/CountQueuingStrategy.js \
12621264 $(WebCore)/Modules/streams/ReadableStream.js \
191695

Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp

 1/*
 2 * Copyright (C) 2015 Ericsson AB. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 *
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * 3. Neither the name of Ericsson nor the names of its contributors
 15 * may be used to endorse or promote products derived from this
 16 * software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#include "config.h"
 32
 33#if ENABLE(MEDIA_STREAM)
 34#include "PeerConnectionBackend.h"
 35
 36namespace WebCore {
 37
 38static std::unique_ptr<PeerConnectionBackend> createPeerConnectionBackend(PeerConnectionBackendClient*)
 39{
 40 return nullptr;
 41}
 42
 43CreatePeerConnectionBackend PeerConnectionBackend::create = createPeerConnectionBackend;
 44
 45} // namespace WebCore
 46
 47#endif // ENABLE(MEDIA_STREAM)
0

Source/WebCore/Modules/mediastream/PeerConnectionBackend.h

 1/*
 2 * Copyright (C) 2015 Ericsson AB. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 *
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * 3. Neither the name of Ericsson nor the names of its contributors
 15 * may be used to endorse or promote products derived from this
 16 * software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#ifndef PeerConnectionBackend_h
 32#define PeerConnectionBackend_h
 33
 34#if ENABLE(MEDIA_STREAM)
 35
 36#include "JSDOMPromise.h"
 37#include "PeerConnectionStates.h"
 38
 39namespace WebCore {
 40
 41class DOMError;
 42class Event;
 43class MediaStreamTrack;
 44class PeerConnectionBackend;
 45class RTCAnswerOptions;
 46class RTCConfiguration;
 47class RTCIceCandidate;
 48class RTCOfferOptions;
 49class RTCRtpSender;
 50class RTCSessionDescription;
 51class RTCStatsResponse;
 52class ScriptExecutionContext;
 53
 54namespace PeerConnection {
 55typedef DOMPromise<RefPtr<RTCSessionDescription>, RefPtr<DOMError>> SessionDescriptionPromise;
 56typedef DOMPromise<std::nullptr_t, RefPtr<DOMError>> VoidPromise;
 57typedef DOMPromise<RefPtr<RTCStatsResponse>, RefPtr<DOMError>> StatsPromise;
 58}
 59
 60class PeerConnectionBackendClient {
 61public:
 62 virtual Vector<RefPtr<RTCRtpSender>> getSenders() const = 0;
 63 virtual void fireEvent(RefPtr<Event>&&) = 0;
 64
 65 virtual void setSignalingState(PeerConnectionStates::SignalingState) = 0;
 66 virtual void updateIceGatheringState(PeerConnectionStates::IceGatheringState) = 0;
 67 virtual void updateIceConnectionState(PeerConnectionStates::IceConnectionState) = 0;
 68
 69 virtual void scheduleNegotiationNeededEvent() = 0;
 70
 71 virtual ScriptExecutionContext* context() const = 0;
 72 virtual PeerConnectionStates::SignalingState internalSignalingState() const = 0;
 73 virtual PeerConnectionStates::IceGatheringState internalIceGatheringState() const = 0;
 74 virtual PeerConnectionStates::IceConnectionState internalIceConnectionState() const = 0;
 75
 76 virtual ~PeerConnectionBackendClient() { }
 77};
 78
 79typedef std::unique_ptr<PeerConnectionBackend> (*CreatePeerConnectionBackend)(PeerConnectionBackendClient*);
 80
 81class PeerConnectionBackend {
 82public:
 83 WEBCORE_EXPORT static CreatePeerConnectionBackend create;
 84 virtual ~PeerConnectionBackend() { }
 85
 86 virtual void createOffer(RTCOfferOptions&, PeerConnection::SessionDescriptionPromise&&) = 0;
 87 virtual void createAnswer(RTCAnswerOptions&, PeerConnection::SessionDescriptionPromise&&) = 0;
 88
 89 virtual void setLocalDescription(RTCSessionDescription*, PeerConnection::VoidPromise&&) = 0;
 90 virtual RefPtr<RTCSessionDescription> localDescription() const = 0;
 91 virtual RefPtr<RTCSessionDescription> currentLocalDescription() const = 0;
 92 virtual RefPtr<RTCSessionDescription> pendingLocalDescription() const = 0;
 93
 94 virtual void setRemoteDescription(RTCSessionDescription*, PeerConnection::VoidPromise&&) = 0;
 95 virtual RefPtr<RTCSessionDescription> remoteDescription() const = 0;
 96 virtual RefPtr<RTCSessionDescription> currentRemoteDescription() const = 0;
 97 virtual RefPtr<RTCSessionDescription> pendingRemoteDescription() const = 0;
 98
 99 virtual void setConfiguration(RTCConfiguration&) = 0;
 100 virtual void addIceCandidate(RTCIceCandidate*, PeerConnection::VoidPromise&&) = 0;
 101
 102 virtual void getStats(MediaStreamTrack*, PeerConnection::StatsPromise&&) = 0;
 103
 104 virtual void stop() = 0;
 105
 106 virtual bool isNegotiationNeeded() const = 0;
 107 virtual void markAsNeedingNegotiation() = 0;
 108 virtual void clearNegotiationNeededState() = 0;
 109};
 110
 111} // namespace WebCore
 112
 113#endif // ENABLE(MEDIA_STREAM)
 114
 115#endif // PeerConnectionBackend_h
0

Source/WebCore/Modules/mediastream/PeerConnectionStates.h

 1/*
 2 * Copyright (C) 2015 Ericsson AB. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 *
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * 3. Neither the name of Ericsson nor the names of its contributors
 15 * may be used to endorse or promote products derived from this
 16 * software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#ifndef PeerConnectionStates_h
 32#define PeerConnectionStates_h
 33
 34#if ENABLE(MEDIA_STREAM)
 35
 36namespace WebCore {
 37
 38namespace PeerConnectionStates {
 39
 40enum class SignalingState {
 41 Stable = 1,
 42 HaveLocalOffer = 2,
 43 HaveRemoteOffer = 3,
 44 HaveLocalPrAnswer = 4,
 45 HaveRemotePrAnswer = 5,
 46 Closed = 6
 47};
 48
 49enum class IceConnectionState {
 50 New = 1,
 51 Checking = 2,
 52 Connected = 3,
 53 Completed = 4,
 54 Failed = 5,
 55 Disconnected = 6,
 56 Closed = 7
 57};
 58
 59enum class IceGatheringState {
 60 New = 1,
 61 Gathering = 2,
 62 Complete = 3
 63};
 64
 65}
 66
 67} // namespace WebCore
 68
 69#endif // ENABLE(MEDIA_STREAM)
 70
 71#endif // PeerConnectionStates_h
0

Source/WebCore/Modules/mediastream/RTCConfiguration.cpp

 1/*
 2 * Copyright (C) 2012 Google Inc. All rights reserved.
 3 * Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
 4 * Copyright (C) 2015 Ericsson AB. All rights reserved.
 5 *
 6 * Redistribution and use in source and binary forms, with or without
 7 * modification, are permitted provided that the following conditions
 8 * are met:
 9 *
 10 * 1. Redistributions of source code must retain the above copyright
 11 * notice, this list of conditions and the following disclaimer.
 12 * 2. Redistributions in binary form must reproduce the above copyright
 13 * notice, this list of conditions and the following disclaimer
 14 * in the documentation and/or other materials provided with the
 15 * distribution.
 16 * 3. Neither the name of Ericsson nor the names of its contributors
 17 * may be used to endorse or promote products derived from this
 18 * software without specific prior written permission.
 19 *
 20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 31 */
 32
 33#include "config.h"
 34#include "RTCConfiguration.h"
 35
 36#if ENABLE(MEDIA_STREAM)
 37
 38#include "ArrayValue.h"
 39#include "Dictionary.h"
 40#include "ExceptionCode.h"
 41#include "URL.h"
 42
 43namespace WebCore {
 44
 45static bool validateIceServerURL(const String& iceURL)
 46{
 47 URL url(URL(), iceURL);
 48 if (url.isEmpty() || !url.isValid() || !(url.protocolIs("turn") || url.protocolIs("stun")))
 49 return false;
 50
 51 return true;
 52}
 53
 54static RefPtr<RTCIceServer> parseIceServer(const Dictionary& iceServer, ExceptionCode& ec)
 55{
 56 String credential, username;
 57 iceServer.get("credential", credential);
 58 iceServer.get("username", username);
 59
 60 // Spec says that "urls" can be either a string or a sequence, so we must check for both.
 61 Vector<String> urlsList;
 62 String urlString;
 63 iceServer.get("urls", urlString);
 64 // This is the only way to check if "urls" is a sequence or a string. If we try to convert
 65 // to a sequence and it fails (in case it is a string), an exception will be set and the
 66 // RTCPeerConnection will fail.
 67 // So we convert to a string always, which converts a sequence to a string in the format: "foo, bar, ..",
 68 // then checking for a comma in the string assures that a string was a sequence and then we convert
 69 // it to a sequence safely.
 70 if (urlString.isEmpty()) {
 71 ec = INVALID_ACCESS_ERR;
 72 return nullptr;
 73 }
 74
 75 if (urlString.find(',') != notFound && iceServer.get("urls", urlsList) && urlsList.size()) {
 76 for (auto iter = urlsList.begin(); iter != urlsList.end(); ++iter) {
 77 if (!validateIceServerURL(*iter)) {
 78 ec = INVALID_ACCESS_ERR;
 79 return nullptr;
 80 }
 81 }
 82 } else {
 83 if (!validateIceServerURL(urlString)) {
 84 ec = INVALID_ACCESS_ERR;
 85 return nullptr;
 86 }
 87
 88 urlsList.append(urlString);
 89 }
 90
 91 return RTCIceServer::create(urlsList, credential, username);
 92}
 93
 94RefPtr<RTCConfiguration> RTCConfiguration::create(const Dictionary& configuration, ExceptionCode& ec)
 95{
 96 if (configuration.isUndefinedOrNull())
 97 return nullptr;
 98
 99 RefPtr<RTCConfiguration> rtcConfiguration = adoptRef(new RTCConfiguration());
 100 rtcConfiguration->initialize(configuration, ec);
 101 if (ec)
 102 return nullptr;
 103
 104 return rtcConfiguration;
 105}
 106
 107RTCConfiguration::RTCConfiguration()
 108 : m_iceTransportPolicy("all")
 109 , m_bundlePolicy("balanced")
 110{
 111}
 112
 113void RTCConfiguration::initialize(const Dictionary& configuration, ExceptionCode& ec)
 114{
 115 ArrayValue iceServers;
 116 bool ok = configuration.get("iceServers", iceServers);
 117 if (!ok || iceServers.isUndefinedOrNull()) {
 118 ec = TYPE_MISMATCH_ERR;
 119 return;
 120 }
 121
 122 size_t numberOfServers;
 123 ok = iceServers.length(numberOfServers);
 124 if (!ok || !numberOfServers) {
 125 ec = !ok ? TYPE_MISMATCH_ERR : INVALID_ACCESS_ERR;
 126 return;
 127 }
 128
 129 for (size_t i = 0; i < numberOfServers; ++i) {
 130 Dictionary iceServerDict;
 131 ok = iceServers.get(i, iceServerDict);
 132 if (!ok) {
 133 ec = TYPE_MISMATCH_ERR;
 134 return;
 135 }
 136
 137 RefPtr<RTCIceServer> iceServer = parseIceServer(iceServerDict, ec);
 138 if (!iceServer)
 139 return;
 140
 141 m_iceServers.append(WTF::move(iceServer));
 142 }
 143
 144 String iceTransportPolicy;
 145 if (configuration.get("iceTransportPolicy", iceTransportPolicy)) {
 146 if (iceTransportPolicy == "none" || iceTransportPolicy == "relay" || iceTransportPolicy == "all")
 147 m_iceTransportPolicy = iceTransportPolicy;
 148 else {
 149 ec = TypeError;
 150 return;
 151 }
 152 }
 153
 154 String bundlePolicy;
 155 if (configuration.get("bundlePolicy", bundlePolicy)) {
 156 if (bundlePolicy == "balanced" || bundlePolicy == "max-compat" || bundlePolicy == "max-bundle")
 157 m_bundlePolicy = bundlePolicy;
 158 else
 159 ec = TypeError;
 160 }
 161}
 162
 163} // namespace WebCore
 164
 165#endif // ENABLE(MEDIA_STREAM)
0

Source/WebCore/Modules/mediastream/RTCConfiguration.h

3333
3434#if ENABLE(MEDIA_STREAM)
3535
36 #include "RTCConfigurationPrivate.h"
3736#include "RTCIceServer.h"
38 #include <wtf/PassRefPtr.h>
3937#include <wtf/RefCounted.h>
 38#include <wtf/RefPtr.h>
4039#include <wtf/Vector.h>
4140#include <wtf/text/WTFString.h>
4241
4342namespace WebCore {
4443
 44class Dictionary;
 45
 46typedef int ExceptionCode;
 47
4548class RTCConfiguration : public RefCounted<RTCConfiguration> {
4649public:
47  static Ref<RTCConfiguration> create() { return adoptRef(*new RTCConfiguration()); }
 50 static RefPtr<RTCConfiguration> create(const Dictionary& configuration, ExceptionCode&);
4851 virtual ~RTCConfiguration() { }
4952
50  void appendServer(PassRefPtr<RTCIceServer> server) { m_private->appendServer(server->privateServer()); }
51  size_t numberOfServers() { return m_private->numberOfServers(); }
52  PassRefPtr<RTCIceServer> server(size_t index)
53  {
54  RTCIceServerPrivate* server = m_private->server(index);
55  if (!server)
56  return nullptr;
57 
58  return RTCIceServer::create(server);
59  }
60 
61  const String& iceTransports() const { return m_private->iceTransports(); }
62  void setIceTransports(const String& iceTransports) { m_private->setIceTransports(iceTransports); }
63 
64  const String& requestIdentity() const { return m_private->requestIdentity(); }
65  void setRequestIdentity(const String& requestIdentity) { m_private->setRequestIdentity(requestIdentity); }
66 
67  Vector<RefPtr<RTCIceServer>> iceServers() const
68  {
69  Vector<RefPtr<RTCIceServer>> servers;
70  for (auto& server : m_private->iceServers())
71  servers.append(RTCIceServer::create(server));
72 
73  return servers;
74  }
75 
76  RTCConfigurationPrivate* privateConfiguration() { return m_private.get(); }
 53 const String& iceTransportPolicy() const { return m_iceTransportPolicy; }
 54 const String& bundlePolicy() const { return m_bundlePolicy; }
 55 Vector<RefPtr<RTCIceServer>> iceServers() const { return m_iceServers; }
7756
7857private:
79  RTCConfiguration()
80  : m_private(RTCConfigurationPrivate::create())
81  {
82  }
 58 RTCConfiguration();
 59
 60 void initialize(const Dictionary& configuration, ExceptionCode&);
8361
84  RefPtr<RTCConfigurationPrivate> m_private;
 62 Vector<RefPtr<RTCIceServer>> m_iceServers;
 63 String m_iceTransportPolicy;
 64 String m_bundlePolicy;
8565};
8666
8767} // namespace WebCore
191695

Source/WebCore/Modules/mediastream/RTCConfiguration.idl

2323 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2424 */
2525
26 enum RTCIceTransportsEnum { "none", "relay", "all" };
27 enum RTCIdentityOptionEnum { "yes", "no", "ifconfigured" };
 26enum RTCIceTransportPolicyEnum { "none", "relay", "all" };
 27enum RTCBundlePolicyEnum { "balanced", "max-compat", "max-bundle" };
2828
2929[
3030 Conditional=MEDIA_STREAM,
3131 NoInterfaceObject,
3232] interface RTCConfiguration {
3333 readonly attribute RTCIceServer[] iceServers;
34  readonly attribute RTCIceTransportsEnum iceTransports;
35  readonly attribute RTCIdentityOptionEnum requestIdentity;
 34 readonly attribute RTCIceTransportPolicyEnum iceTransportPolicy;
 35 readonly attribute RTCBundlePolicyEnum bundlePolicy;
3636};
191695

Source/WebCore/Modules/mediastream/RTCIceCandidate.cpp

11/*
22 * Copyright (C) 2012 Google Inc. All rights reserved.
33 * Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
 4 * Copyright (C) 2015 Ericsson AB. All rights reserved.
45 *
56 * Redistribution and use in source and binary forms, with or without
67 * modification, are permitted provided that the following conditions

3738
3839#include "Dictionary.h"
3940#include "ExceptionCode.h"
40 #include "RTCIceCandidateDescriptor.h"
4141
4242namespace WebCore {
4343

@@RefPtr<RTCIceCandidate> RTCIceCandidate:
7171 }
7272 }
7373
74  return adoptRef(*new RTCIceCandidate(RTCIceCandidateDescriptor::create(candidate, sdpMid, sdpMLineIndex)));
 74 return adoptRef(new RTCIceCandidate(candidate, sdpMid, sdpMLineIndex));
7575}
7676
77 Ref<RTCIceCandidate> RTCIceCandidate::create(PassRefPtr<RTCIceCandidateDescriptor> descriptor)
 77Ref<RTCIceCandidate> RTCIceCandidate::create(const String& candidate, const String& sdpMid, unsigned short sdpMLineIndex)
7878{
79  return adoptRef(*new RTCIceCandidate(descriptor));
 79 return adoptRef(*new RTCIceCandidate(candidate, sdpMid, sdpMLineIndex));
8080}
8181
82 RTCIceCandidate::RTCIceCandidate(PassRefPtr<RTCIceCandidateDescriptor> descriptor)
83  : m_descriptor(descriptor)
 82RTCIceCandidate::RTCIceCandidate(const String& candidate, const String& sdpMid, unsigned short sdpMLineIndex)
 83 : m_candidate(candidate)
 84 , m_sdpMid(sdpMid)
 85 , m_sdpMLineIndex(sdpMLineIndex)
8486{
8587}
8688

@@RTCIceCandidate::~RTCIceCandidate()
9092
9193const String& RTCIceCandidate::candidate() const
9294{
93  return m_descriptor->candidate();
 95 return m_candidate;
9496}
9597
 98void RTCIceCandidate::setCandidate(const String& candidate)
 99{
 100 m_candidate = candidate;
 101}
 102
 103
96104const String& RTCIceCandidate::sdpMid() const
97105{
98  return m_descriptor->sdpMid();
 106 return m_sdpMid;
 107}
 108
 109void RTCIceCandidate::setSdpMid(const String& sdpMid)
 110{
 111 m_sdpMid = sdpMid;
99112}
100113
101114unsigned short RTCIceCandidate::sdpMLineIndex() const
102115{
103  return m_descriptor->sdpMLineIndex();
 116 return m_sdpMLineIndex;
104117}
105118
106 RTCIceCandidateDescriptor* RTCIceCandidate::descriptor()
 119void RTCIceCandidate::setSdpMLineIndex(unsigned short sdpMLineIndex)
107120{
108  return m_descriptor.get();
 121 m_sdpMLineIndex = sdpMLineIndex;
109122}
110123
111124} // namespace WebCore
191695

Source/WebCore/Modules/mediastream/RTCIceCandidate.h

3535
3636#include "ExceptionBase.h"
3737#include "ScriptWrappable.h"
38 #include <wtf/PassRefPtr.h>
3938#include <wtf/RefCounted.h>
4039#include <wtf/RefPtr.h>
4140#include <wtf/text/WTFString.h>

@@class RTCIceCandidateDescriptor;
4847class RTCIceCandidate : public RefCounted<RTCIceCandidate>, public ScriptWrappable {
4948public:
5049 static RefPtr<RTCIceCandidate> create(const Dictionary&, ExceptionCode&);
51  static Ref<RTCIceCandidate> create(PassRefPtr<RTCIceCandidateDescriptor>);
 50 static Ref<RTCIceCandidate> create(const String& candidate, const String& sdpMid, unsigned short sdpMLineIndex);
5251 virtual ~RTCIceCandidate();
5352
5453 const String& candidate() const;
 54 void setCandidate(const String&);
 55
5556 const String& sdpMid() const;
56  unsigned short sdpMLineIndex() const;
 57 void setSdpMid(const String&);
5758
58  RTCIceCandidateDescriptor* descriptor();
 59 unsigned short sdpMLineIndex() const;
 60 void setSdpMLineIndex(unsigned short);
5961
6062private:
61  explicit RTCIceCandidate(PassRefPtr<RTCIceCandidateDescriptor>);
 63 explicit RTCIceCandidate(const String& candidate, const String& sdpMid, unsigned short sdpMLineIndex);
6264
63  RefPtr<RTCIceCandidateDescriptor> m_descriptor;
 65 String m_candidate;
 66 String m_sdpMid;
 67 unsigned short m_sdpMLineIndex;
6468};
6569
6670} // namespace WebCore
191695

Source/WebCore/Modules/mediastream/RTCIceCandidate.idl

3434 CustomConstructor(optional Dictionary dictionary),
3535 ConstructorRaisesException
3636] interface RTCIceCandidate {
37  readonly attribute DOMString candidate;
38  readonly attribute DOMString sdpMid;
39  readonly attribute unsigned short sdpMLineIndex;
 37 attribute DOMString candidate;
 38 attribute DOMString sdpMid;
 39 attribute unsigned short sdpMLineIndex;
4040};
4141
191695

Source/WebCore/Modules/mediastream/RTCIceCandidateEvent.cpp

@@Ref<RTCIceCandidateEvent> RTCIceCandidat
3838 return adoptRef(*new RTCIceCandidateEvent);
3939}
4040
41 Ref<RTCIceCandidateEvent> RTCIceCandidateEvent::create(bool canBubble, bool cancelable, PassRefPtr<RTCIceCandidate> candidate)
 41Ref<RTCIceCandidateEvent> RTCIceCandidateEvent::create(bool canBubble, bool cancelable, RefPtr<RTCIceCandidate>&& candidate)
4242{
43  return adoptRef(*new RTCIceCandidateEvent(canBubble, cancelable, candidate));
 43 return adoptRef(*new RTCIceCandidateEvent(canBubble, cancelable, WTF::move(candidate)));
4444}
4545
4646RTCIceCandidateEvent::RTCIceCandidateEvent()
4747{
4848}
4949
50 RTCIceCandidateEvent::RTCIceCandidateEvent(bool canBubble, bool cancelable, PassRefPtr<RTCIceCandidate> candidate)
 50RTCIceCandidateEvent::RTCIceCandidateEvent(bool canBubble, bool cancelable, RefPtr<RTCIceCandidate>&& candidate)
5151 : Event(eventNames().icecandidateEvent, canBubble, cancelable)
52  , m_candidate(candidate)
 52 , m_candidate(WTF::move(candidate))
5353{
5454}
5555
191695

Source/WebCore/Modules/mediastream/RTCIceCandidateEvent.h

@@public:
3838 virtual ~RTCIceCandidateEvent();
3939
4040 static Ref<RTCIceCandidateEvent> create();
41  static Ref<RTCIceCandidateEvent> create(bool canBubble, bool cancelable, PassRefPtr<RTCIceCandidate>);
 41 static Ref<RTCIceCandidateEvent> create(bool canBubble, bool cancelable, RefPtr<RTCIceCandidate>&&);
4242
4343 RTCIceCandidate* candidate() const;
4444

@@public:
4646
4747private:
4848 RTCIceCandidateEvent();
49  RTCIceCandidateEvent(bool canBubble, bool cancelable, PassRefPtr<RTCIceCandidate>);
 49 RTCIceCandidateEvent(bool canBubble, bool cancelable, RefPtr<RTCIceCandidate>&&);
5050
5151 RefPtr<RTCIceCandidate> m_candidate;
5252};
191695

Source/WebCore/Modules/mediastream/RTCIceServer.h

2828
2929#if ENABLE(MEDIA_STREAM)
3030
31 #include "RTCIceServerPrivate.h"
3231#include <wtf/PassRefPtr.h>
3332#include <wtf/RefCounted.h>
3433#include <wtf/Vector.h>

@@public:
4241 {
4342 return adoptRef(*new RTCIceServer(urls, credential, username));
4443 }
45 
46  static Ref<RTCIceServer> create(PassRefPtr<RTCIceServerPrivate> server)
47  {
48  return adoptRef(*new RTCIceServer(server));
49  }
50 
5144 virtual ~RTCIceServer() { }
5245
53  const Vector<String>& urls() { return m_private->urls(); }
54  const String& credential() { return m_private->credential(); }
55  const String& username() { return m_private->username(); }
56  RTCIceServerPrivate* privateServer() { return m_private.get(); }
 46 const Vector<String>& urls() const { return m_urls; }
 47 const String& credential() const { return m_credential; }
 48 const String& username() const { return m_username; }
5749
5850private:
5951 RTCIceServer(const Vector<String>& urls, const String& credential, const String& username)
60  : m_private(RTCIceServerPrivate::create(urls, credential, username))
61  {
62  }
63 
64  RTCIceServer(PassRefPtr<RTCIceServerPrivate> server)
65  : m_private(server)
66  {
67  }
68 
69  RefPtr<RTCIceServerPrivate> m_private;
 52 : m_urls(urls)
 53 , m_credential(credential)
 54 , m_username(username)
 55 { }
 56
 57 Vector<String> m_urls;
 58 String m_credential;
 59 String m_username;
7060};
7161
7262} // namespace WebCore
191695

Source/WebCore/Modules/mediastream/RTCOfferAnswerOptions.cpp

11/*
22 * Copyright (C) 2014 Apple Inc. All rights reserved.
 3 * Copyright (C) 2015 Ericsson AB. All rights reserved.
34 *
45 * Redistribution and use in source and binary forms, with or without
56 * modification, are permitted provided that the following conditions

3233
3334namespace WebCore {
3435
35 RefPtr<RTCOfferAnswerOptions> RTCOfferAnswerOptions::create(const Dictionary& options, ExceptionCode& ec)
 36RTCOfferAnswerOptions::RTCOfferAnswerOptions()
 37 : m_voiceActivityDetection(true)
3638{
37  RefPtr<RTCOfferAnswerOptions> offerAnswerOptions = adoptRef(new RTCOfferAnswerOptions());
38  String requestIdentity;
39  if (!offerAnswerOptions->initialize(options)) {
40  // FIXME: https://webkit.org/b/129800
41  // According to the spec, the error is going to be defined yet, so let's use TYPE_MISMATCH_ERR for now.
42  ec = TYPE_MISMATCH_ERR;
43  return nullptr;
44  }
45 
46  return offerAnswerOptions;
4739}
4840
4941bool RTCOfferAnswerOptions::initialize(const Dictionary& options)
5042{
51  if (!m_private)
52  m_private = RTCOfferAnswerOptionsPrivate::create();
53 
54  String requestIdentity;
55  if (!options.isUndefinedOrNull() && (!options.get("requestIdentity", requestIdentity) || requestIdentity.isEmpty()))
56  return false;
 43 bool voiceActivityDetection;
 44 if (options.get("voiceActivityDetection", voiceActivityDetection))
 45 m_voiceActivityDetection = voiceActivityDetection;
5746
58  m_private->setRequestIdentity(requestIdentity);
5947 return true;
6048}
6149

@@RefPtr<RTCOfferOptions> RTCOfferOptions:
7260 return offerOptions;
7361}
7462
75 bool RTCOfferOptions::initialize(const Dictionary& options)
 63RTCOfferOptions::RTCOfferOptions()
 64 : m_offerToReceiveVideo(0)
 65 , m_offerToReceiveAudio(0)
 66 , m_iceRestart(false)
7667{
77  RefPtr<RTCOfferOptionsPrivate> optionsPrivate = RTCOfferOptionsPrivate::create();
78  m_private = optionsPrivate;
 68}
7969
 70bool RTCOfferOptions::initialize(const Dictionary& options)
 71{
8072 if (options.isUndefinedOrNull())
8173 return true;
8274
83  if (!RTCOfferAnswerOptions::initialize(options))
84  return false;
85 
86  String offerToReceiveVideoStr;
 75 String stringValue;
 76 int64_t intConversionResult;
8777 bool numberConversionSuccess;
88  if (!options.get("offerToReceiveVideo", offerToReceiveVideoStr))
89  return false;
90 
91  int64_t intConversionResult = offerToReceiveVideoStr.toInt64Strict(&numberConversionSuccess);
92  if (!numberConversionSuccess)
93  return false;
9478
95  optionsPrivate->setOfferToReceiveVideo(intConversionResult);
 79 if (options.get("offerToReceiveVideo", stringValue)) {
 80 intConversionResult = stringValue.toInt64Strict(&numberConversionSuccess);
 81 if (!numberConversionSuccess)
 82 return false;
9683
97  String offerToReceiveAudioStr;
98  if (!options.get("offerToReceiveAudio", offerToReceiveAudioStr))
99  return false;
100 
101  intConversionResult = offerToReceiveAudioStr.toInt64Strict(&numberConversionSuccess);
102  if (!numberConversionSuccess)
103  return false;
 84 m_offerToReceiveVideo = intConversionResult;
 85 }
10486
105  optionsPrivate->setOfferToReceiveAudio(intConversionResult);
 87 if (options.get("offerToReceiveAudio", stringValue)) {
 88 intConversionResult = stringValue.toInt64Strict(&numberConversionSuccess);
 89 if (!numberConversionSuccess)
 90 return false;
10691
107  bool voiceActivityDetection;
108  if (options.get("voiceActivityDetection", voiceActivityDetection))
109  optionsPrivate->setVoiceActivityDetection(voiceActivityDetection);
 92 m_offerToReceiveAudio = intConversionResult;
 93 }
11094
11195 bool iceRestart;
11296 if (options.get("iceRestart", iceRestart))
113  optionsPrivate->setIceRestart(iceRestart);
 97 m_iceRestart = iceRestart;
11498
115  return true;
 99 return RTCOfferAnswerOptions::initialize(options);
 100}
 101
 102RefPtr<RTCAnswerOptions> RTCAnswerOptions::create(const Dictionary& options, ExceptionCode& ec)
 103{
 104 RefPtr<RTCAnswerOptions> offerOptions = adoptRef(new RTCAnswerOptions());
 105 if (!offerOptions->initialize(options)) {
 106 // FIXME: https://webkit.org/b/129800
 107 // According to the spec, the error is going to be defined yet, so let's use TYPE_MISMATCH_ERR for now.
 108 ec = TYPE_MISMATCH_ERR;
 109 return nullptr;
 110 }
 111
 112 return offerOptions;
 113}
 114
 115bool RTCAnswerOptions::initialize(const Dictionary& options)
 116{
 117 if (options.isUndefinedOrNull())
 118 return true;
 119
 120 return RTCOfferAnswerOptions::initialize(options);
116121}
117122
118123} // namespace WebCore
191695

Source/WebCore/Modules/mediastream/RTCOfferAnswerOptions.h

11/*
22 * Copyright (C) 2014 Apple Inc. All rights reserved.
 3 * Copyright (C) 2015 Ericsson AB. All rights reserved.
34 *
45 * Redistribution and use in source and binary forms, with or without
56 * modification, are permitted provided that the following conditions

3031
3132#include "Dictionary.h"
3233#include "ExceptionCode.h"
33 #include "RTCOfferAnswerOptionsPrivate.h"
34 #include <wtf/PassRefPtr.h>
3534#include <wtf/RefCounted.h>
 35#include <wtf/RefPtr.h>
3636
3737namespace WebCore {
3838

@@class Dictionary;
4040
4141class RTCOfferAnswerOptions : public RefCounted<RTCOfferAnswerOptions> {
4242public:
43  static RefPtr<RTCOfferAnswerOptions> create(const Dictionary&, ExceptionCode&);
44 
45  const String& requestIdentity() const { return m_private->requestIdentity(); }
46  RTCOfferAnswerOptionsPrivate* privateOfferAnswerOptions() const { return m_private.get(); }
47 
4843 virtual ~RTCOfferAnswerOptions() { }
4944
 45 bool voiceActivityDetection() const { return m_voiceActivityDetection; }
 46
5047protected:
5148 virtual bool initialize(const Dictionary&);
52  RTCOfferAnswerOptions() { }
 49 RTCOfferAnswerOptions();
5350
54  RefPtr<RTCOfferAnswerOptionsPrivate> m_private;
 51 bool m_voiceActivityDetection;
5552};
5653
5754class RTCOfferOptions : public RTCOfferAnswerOptions {
5855public:
5956 static RefPtr<RTCOfferOptions> create(const Dictionary&, ExceptionCode&);
 57 virtual ~RTCOfferOptions() { }
6058
61  int64_t offerToReceiveVideo() const { return privateOfferOptions()->offerToReceiveVideo(); }
62  int64_t offerToReceiveAudio() const { return privateOfferOptions()->offerToReceiveAudio(); }
63  bool voiceActivityDetection() const { return privateOfferOptions()->voiceActivityDetection(); }
64  bool iceRestart() const { return privateOfferOptions()->iceRestart(); }
65  RTCOfferOptionsPrivate* privateOfferOptions() const { return static_cast<RTCOfferOptionsPrivate*>(m_private.get()); }
 59 int64_t offerToReceiveVideo() const { return m_offerToReceiveVideo; }
 60 int64_t offerToReceiveAudio() const { return m_offerToReceiveAudio; }
 61 bool iceRestart() const { return m_iceRestart; }
6662
67  virtual ~RTCOfferOptions() { }
 63private:
 64 virtual bool initialize(const Dictionary&) override;
 65 RTCOfferOptions();
 66
 67 int64_t m_offerToReceiveVideo;
 68 int64_t m_offerToReceiveAudio;
 69 bool m_iceRestart;
 70};
 71
 72class RTCAnswerOptions : public RTCOfferAnswerOptions {
 73public:
 74 static RefPtr<RTCAnswerOptions> create(const Dictionary&, ExceptionCode&);
 75 virtual ~RTCAnswerOptions() { }
6876
6977private:
7078 virtual bool initialize(const Dictionary&) override;
71  RTCOfferOptions() { }
 79 RTCAnswerOptions() { }
7280};
7381
7482} // namespace WebCore
191695

Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp

11/*
22 * Copyright (C) 2012 Google Inc. All rights reserved.
33 * Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
 4 * Copyright (C) 2015 Ericsson AB. All rights reserved.
45 *
56 * Redistribution and use in source and binary forms, with or without
67 * modification, are permitted provided that the following conditions

3536
3637#include "RTCPeerConnection.h"
3738
38 #include "ArrayValue.h"
 39#include "DOMError.h"
3940#include "Document.h"
4041#include "Event.h"
4142#include "ExceptionCode.h"
4243#include "Frame.h"
43 #include "FrameLoader.h"
44 #include "FrameLoaderClient.h"
45 #include "MediaStreamEvent.h"
 44#include "JSDOMError.h"
 45#include "MediaStream.h"
 46#include "MediaStreamTrack.h"
4647#include "RTCConfiguration.h"
47 #include "RTCDTMFSender.h"
4848#include "RTCDataChannel.h"
49 #include "RTCDataChannelEvent.h"
50 #include "RTCDataChannelHandler.h"
5149#include "RTCIceCandidate.h"
52 #include "RTCIceCandidateDescriptor.h"
5350#include "RTCIceCandidateEvent.h"
5451#include "RTCOfferAnswerOptions.h"
55 #include "RTCPeerConnectionErrorCallback.h"
 52#include "RTCRtpReceiver.h"
 53#include "RTCRtpSender.h"
5654#include "RTCSessionDescription.h"
57 #include "RTCSessionDescriptionCallback.h"
58 #include "RTCSessionDescriptionDescriptor.h"
59 #include "RTCSessionDescriptionRequestImpl.h"
60 #include "RTCStatsCallback.h"
61 #include "RTCStatsRequestImpl.h"
62 #include "RTCVoidRequestImpl.h"
63 #include "ScriptExecutionContext.h"
64 #include "VoidCallback.h"
 55#include "RTCTrackEvent.h"
6556#include <wtf/MainThread.h>
 57#include <wtf/text/Base64.h>
6658
6759namespace WebCore {
6860
69 static bool validateIceServerURL(const String& iceURL)
70 {
71  URL url(URL(), iceURL);
72  if (url.isEmpty() || !url.isValid() || !(url.protocolIs("turn") || url.protocolIs("stun")))
73  return false;
74 
75  return true;
76 }
77 
78 static ExceptionCode processIceServer(const Dictionary& iceServer, RTCConfiguration* rtcConfiguration)
79 {
80  String credential, username;
81  iceServer.get("credential", credential);
82  iceServer.get("username", username);
83 
84  // Spec says that "urls" can be either a string or a sequence, so we must check for both.
85  Vector<String> urlsList;
86  String urlString;
87  iceServer.get("urls", urlString);
88  // This is the only way to check if "urls" is a sequence or a string. If we try to convert
89  // to a sequence and it fails (in case it is a string), an exception will be set and the
90  // RTCPeerConnection will fail.
91  // So we convert to a string always, which converts a sequence to a string in the format: "foo, bar, ..",
92  // then checking for a comma in the string assures that a string was a sequence and then we convert
93  // it to a sequence safely.
94  if (urlString.isEmpty())
95  return INVALID_ACCESS_ERR;
96 
97  if (urlString.find(',') != notFound && iceServer.get("urls", urlsList) && urlsList.size()) {
98  for (auto& url : urlsList) {
99  if (!validateIceServerURL(url))
100  return INVALID_ACCESS_ERR;
101  }
102  } else {
103  if (!validateIceServerURL(urlString))
104  return INVALID_ACCESS_ERR;
105 
106  urlsList.append(urlString);
107  }
108 
109  rtcConfiguration->appendServer(RTCIceServer::create(urlsList, credential, username));
110  return 0;
111 }
112 
113 RefPtr<RTCConfiguration> RTCPeerConnection::parseConfiguration(const Dictionary& configuration, ExceptionCode& ec)
114 {
115  if (configuration.isUndefinedOrNull())
116  return nullptr;
117 
118  ArrayValue iceServers;
119  bool ok = configuration.get("iceServers", iceServers);
120  if (!ok || iceServers.isUndefinedOrNull()) {
121  ec = TYPE_MISMATCH_ERR;
122  return nullptr;
123  }
124 
125  size_t numberOfServers;
126  ok = iceServers.length(numberOfServers);
127  if (!ok || !numberOfServers) {
128  ec = !ok ? TYPE_MISMATCH_ERR : INVALID_ACCESS_ERR;
129  return nullptr;
130  }
131 
132  String iceTransports;
133  String requestIdentity;
134  configuration.get("iceTransports", iceTransports);
135  configuration.get("requestIdentity", requestIdentity);
136 
137  RefPtr<RTCConfiguration> rtcConfiguration = RTCConfiguration::create();
138 
139  rtcConfiguration->setIceTransports(iceTransports);
140  rtcConfiguration->setRequestIdentity(requestIdentity);
141 
142  for (size_t i = 0; i < numberOfServers; ++i) {
143  Dictionary iceServer;
144  ok = iceServers.get(i, iceServer);
145  if (!ok) {
146  ec = TYPE_MISMATCH_ERR;
147  return nullptr;
148  }
149 
150  ec = processIceServer(iceServer, rtcConfiguration.get());
151  if (ec)
152  return nullptr;
153  }
154 
155  return rtcConfiguration;
156 }
 61using namespace PeerConnection;
 62using namespace PeerConnectionStates;
15763
15864RefPtr<RTCPeerConnection> RTCPeerConnection::create(ScriptExecutionContext& context, const Dictionary& rtcConfiguration, ExceptionCode& ec)
15965{
160  RefPtr<RTCConfiguration> configuration = parseConfiguration(rtcConfiguration, ec);
 66 RefPtr<RTCConfiguration> configuration = RTCConfiguration::create(rtcConfiguration, ec);
16167 if (ec)
16268 return nullptr;
16369
164  RefPtr<RTCPeerConnection> peerConnection = adoptRef(new RTCPeerConnection(context, configuration.release(), ec));
 70 RefPtr<RTCPeerConnection> peerConnection = adoptRef(new RTCPeerConnection(context, WTF::move(configuration), ec));
16571 peerConnection->suspendIfNeeded();
16672 if (ec)
16773 return nullptr;
16874
169  return peerConnection.release();
 75 return peerConnection;
17076}
17177
172 RTCPeerConnection::RTCPeerConnection(ScriptExecutionContext& context, PassRefPtr<RTCConfiguration> configuration, ExceptionCode& ec)
 78RTCPeerConnection::RTCPeerConnection(ScriptExecutionContext& context, RefPtr<RTCConfiguration>&& configuration, ExceptionCode& ec)
17379 : ActiveDOMObject(&context)
174  , m_signalingState(SignalingStateStable)
175  , m_iceGatheringState(IceGatheringStateNew)
176  , m_iceConnectionState(IceConnectionStateNew)
177  , m_scheduledEventTimer(*this, &RTCPeerConnection::scheduledEventTimerFired)
178  , m_configuration(configuration)
 80 , m_signalingState(SignalingState::Stable)
 81 , m_iceGatheringState(IceGatheringState::New)
 82 , m_iceConnectionState(IceConnectionState::New)
 83 , m_configuration(WTF::move(configuration))
17984 , m_stopped(false)
18085{
18186 Document& document = downcast<Document>(context);

@@RTCPeerConnection::RTCPeerConnection(Scr
18590 return;
18691 }
18792
188  m_peerHandler = RTCPeerConnectionHandler::create(this);
189  if (!m_peerHandler) {
 93 m_backend = PeerConnectionBackend::create(this);
 94 if (!m_backend) {
19095 ec = NOT_SUPPORTED_ERR;
19196 return;
19297 }
19398
194  document.frame()->loader().client().dispatchWillStartUsingPeerConnectionHandler(m_peerHandler.get());
195 
196  if (!m_peerHandler->initialize(m_configuration->privateConfiguration())) {
197  ec = NOT_SUPPORTED_ERR;
198  return;
199  }
 99 m_backend->setConfiguration(*m_configuration);
200100}
201101
202102RTCPeerConnection::~RTCPeerConnection()
203103{
204104 stop();
205 
206  for (auto& localStream : m_localStreams)
207  localStream->removeObserver(this);
208105}
209106
210 void RTCPeerConnection::createOffer(PassRefPtr<RTCSessionDescriptionCallback> successCallback, PassRefPtr<RTCPeerConnectionErrorCallback> errorCallback, const Dictionary& offerOptions, ExceptionCode& ec)
 107Vector<RefPtr<RTCRtpSender>> RTCPeerConnection::getSenders() const
211108{
212  if (m_signalingState == SignalingStateClosed) {
213  ec = INVALID_STATE_ERR;
214  return;
215  }
 109 Vector<RefPtr<RTCRtpSender>> senders;
 110 senders.reserveCapacity(m_senderSet.size());
 111 copyValuesToVector(m_senderSet, senders);
216112
217  if (!successCallback) {
218  ec = TYPE_MISMATCH_ERR;
219  return;
220  }
 113 return senders;
 114}
221115
222  RefPtr<RTCOfferOptions> options = RTCOfferOptions::create(offerOptions, ec);
223  if (ec) {
224  callOnMainThread([=] {
225  RefPtr<DOMError> error = DOMError::create("Invalid createOffer argument.");
226  errorCallback->handleEvent(error.get());
227  });
228  return;
229  }
 116Vector<RefPtr<RTCRtpReceiver>> RTCPeerConnection::getReceivers() const
 117{
 118 Vector<RefPtr<RTCRtpReceiver>> receivers;
 119 receivers.reserveCapacity(m_receiverSet.size());
 120 copyValuesToVector(m_receiverSet, receivers);
230121
231  RefPtr<RTCSessionDescriptionRequestImpl> request = RTCSessionDescriptionRequestImpl::create(scriptExecutionContext(), successCallback, errorCallback);
232  m_peerHandler->createOffer(request.release(), options->privateOfferOptions());
 122 return receivers;
233123}
234124
235 void RTCPeerConnection::createAnswer(PassRefPtr<RTCSessionDescriptionCallback> successCallback, PassRefPtr<RTCPeerConnectionErrorCallback> errorCallback, const Dictionary& answerOptions, ExceptionCode& ec)
 125RefPtr<RTCRtpSender> RTCPeerConnection::addTrack(RefPtr<MediaStreamTrack>&& track, Vector<MediaStream*> streams, ExceptionCode& ec)
236126{
237  if (m_signalingState == SignalingStateClosed) {
 127 if (!track) {
 128 ec = TypeError;
 129 return nullptr;
 130 }
 131
 132 if (m_signalingState == SignalingState::Closed) {
238133 ec = INVALID_STATE_ERR;
239  return;
 134 return nullptr;
240135 }
241136
242  if (!successCallback) {
243  ec = TYPE_MISMATCH_ERR;
244  return;
 137 // Require at least one stream until https://github.com/w3c/webrtc-pc/issues/288 is resolved
 138 if (!streams.size()) {
 139 ec = NOT_SUPPORTED_ERR;
 140 return nullptr;
245141 }
246142
247  RefPtr<RTCOfferAnswerOptions> options = RTCOfferAnswerOptions::create(answerOptions, ec);
248  if (ec) {
249  callOnMainThread([=] {
250  RefPtr<DOMError> error = DOMError::create("Invalid createAnswer argument.");
251  errorCallback->handleEvent(error.get());
252  });
253  return;
 143 if (m_senderSet.contains(track->id())) {
 144 // FIXME: Spec says InvalidParameter
 145 ec = INVALID_MODIFICATION_ERR;
 146 return nullptr;
254147 }
255148
256  RefPtr<RTCSessionDescriptionRequestImpl> request = RTCSessionDescriptionRequestImpl::create(scriptExecutionContext(), successCallback, errorCallback);
257  m_peerHandler->createAnswer(request.release(), options->privateOfferAnswerOptions());
258 }
 149 const String& trackId = track->id();
 150 RefPtr<RTCRtpSender> sender = RTCRtpSender::create(WTF::move(track), streams[0]->id());
 151 m_senderSet.add(trackId, sender);
259152
260 bool RTCPeerConnection::checkStateForLocalDescription(RTCSessionDescription* localDescription)
261 {
262  if (localDescription->type() == "offer")
263  return m_signalingState == SignalingStateStable || m_signalingState == SignalingStateHaveLocalOffer;
264  if (localDescription->type() == "answer")
265  return m_signalingState == SignalingStateHaveRemoteOffer || m_signalingState == SignalingStateHaveLocalPrAnswer;
266  if (localDescription->type() == "pranswer")
267  return m_signalingState == SignalingStateHaveLocalPrAnswer || m_signalingState == SignalingStateHaveRemoteOffer;
 153 m_backend->markAsNeedingNegotiation();
268154
269  return false;
 155 return sender;
270156}
271157
272 bool RTCPeerConnection::checkStateForRemoteDescription(RTCSessionDescription* remoteDescription)
 158void RTCPeerConnection::removeTrack(RTCRtpSender* sender, ExceptionCode& ec)
273159{
274  if (remoteDescription->type() == "offer")
275  return m_signalingState == SignalingStateStable || m_signalingState == SignalingStateHaveRemoteOffer;
276  if (remoteDescription->type() == "answer")
277  return m_signalingState == SignalingStateHaveLocalOffer || m_signalingState == SignalingStateHaveRemotePrAnswer;
278  if (remoteDescription->type() == "pranswer")
279  return m_signalingState == SignalingStateHaveRemotePrAnswer || m_signalingState == SignalingStateHaveLocalOffer;
280 
281  return false;
282 }
283 
284 void RTCPeerConnection::setLocalDescription(PassRefPtr<RTCSessionDescription> prpSessionDescription, PassRefPtr<VoidCallback> successCallback, PassRefPtr<RTCPeerConnectionErrorCallback> errorCallback, ExceptionCode& ec)
285 {
286  if (m_signalingState == SignalingStateClosed) {
287  ec = INVALID_STATE_ERR;
 160 if (!sender) {
 161 ec = TypeError;
288162 return;
289163 }
290164
291  RefPtr<RTCSessionDescription> sessionDescription = prpSessionDescription;
292  if (!sessionDescription) {
293  ec = TYPE_MISMATCH_ERR;
 165 if (m_signalingState == SignalingState::Closed) {
 166 ec = INVALID_STATE_ERR;
294167 return;
295168 }
296169
297  if (!checkStateForLocalDescription(sessionDescription.get())) {
298  callOnMainThread([=] {
299  RefPtr<DOMError> error = DOMError::create(RTCPeerConnectionHandler::invalidSessionDescriptionErrorName());
300  errorCallback->handleEvent(error.get());
301  });
 170 if (!m_senderSet.remove(sender->track()->id()))
302171 return;
303  }
304172
305  RefPtr<RTCVoidRequestImpl> request = RTCVoidRequestImpl::create(scriptExecutionContext(), successCallback, errorCallback);
306  m_peerHandler->setLocalDescription(request.release(), sessionDescription->descriptor());
 173 m_backend->markAsNeedingNegotiation();
307174}
308175
309 PassRefPtr<RTCSessionDescription> RTCPeerConnection::localDescription(ExceptionCode& ec)
 176void RTCPeerConnection::internalCreateOffer(const Dictionary& offerOptions, SessionDescriptionPromise&& promise)
310177{
311  RefPtr<RTCSessionDescriptionDescriptor> descriptor = m_peerHandler->localDescription();
312  if (!descriptor) {
313  ec = INVALID_STATE_ERR;
314  return nullptr;
 178 if (m_signalingState == SignalingState::Closed) {
 179 promise.reject(DOMError::create("InvalidStateError"));
 180 return;
 181 }
 182
 183 ExceptionCode ec = 0;
 184 RefPtr<RTCOfferOptions> options = RTCOfferOptions::create(offerOptions, ec);
 185 if (ec) {
 186 promise.reject(DOMError::create("Invalid createOffer argument"));
 187 return;
315188 }
 189 ASSERT(options);
316190
317  RefPtr<RTCSessionDescription> sessionDescription = RTCSessionDescription::create(descriptor.release());
318  return sessionDescription.release();
 191 m_backend->createOffer(*options, WTF::move(promise));
319192}
320193
321 void RTCPeerConnection::setRemoteDescription(PassRefPtr<RTCSessionDescription> prpSessionDescription, PassRefPtr<VoidCallback> successCallback, PassRefPtr<RTCPeerConnectionErrorCallback> errorCallback, ExceptionCode& ec)
 194void RTCPeerConnection::internalCreateAnswer(const Dictionary& answerOptions, SessionDescriptionPromise&& promise)
322195{
323  if (m_signalingState == SignalingStateClosed) {
324  ec = INVALID_STATE_ERR;
 196 if (m_signalingState == SignalingState::Closed) {
 197 promise.reject(DOMError::create("InvalidStateError"));
325198 return;
326199 }
327200
328  RefPtr<RTCSessionDescription> sessionDescription = prpSessionDescription;
329  if (!sessionDescription) {
330  ec = TYPE_MISMATCH_ERR;
 201 ExceptionCode ec = 0;
 202 RefPtr<RTCAnswerOptions> options = RTCAnswerOptions::create(answerOptions, ec);
 203 if (ec) {
 204 promise.reject(DOMError::create("Invalid createAnswer argument"));
331205 return;
332206 }
333207
334  if (!checkStateForRemoteDescription(sessionDescription.get())) {
335  callOnMainThread([=] {
336  RefPtr<DOMError> error = DOMError::create(RTCPeerConnectionHandler::invalidSessionDescriptionErrorName());
337  errorCallback->handleEvent(error.get());
338  });
 208 m_backend->createAnswer(*options, WTF::move(promise));
 209}
 210
 211void RTCPeerConnection::internalSetLocalDescription(RTCSessionDescription* description, PeerConnection::VoidPromise&& promise)
 212{
 213 if (m_signalingState == SignalingState::Closed) {
 214 promise.reject(DOMError::create("InvalidStateError"));
339215 return;
340216 }
341217
342  RefPtr<RTCVoidRequestImpl> request = RTCVoidRequestImpl::create(scriptExecutionContext(), successCallback, errorCallback);
343  m_peerHandler->setRemoteDescription(request.release(), sessionDescription->descriptor());
 218 m_backend->setLocalDescription(description, WTF::move(promise));
344219}
345220
346 PassRefPtr<RTCSessionDescription> RTCPeerConnection::remoteDescription(ExceptionCode& ec)
 221RefPtr<RTCSessionDescription> RTCPeerConnection::localDescription() const
347222{
348  RefPtr<RTCSessionDescriptionDescriptor> descriptor = m_peerHandler->remoteDescription();
349  if (!descriptor) {
350  ec = INVALID_STATE_ERR;
351  return nullptr;
352  }
 223 return m_backend->localDescription();
 224}
 225
 226RefPtr<RTCSessionDescription> RTCPeerConnection::currentLocalDescription() const
 227{
 228 return m_backend->currentLocalDescription();
 229}
353230
354  RefPtr<RTCSessionDescription> desc = RTCSessionDescription::create(descriptor.release());
355  return desc.release();
 231RefPtr<RTCSessionDescription> RTCPeerConnection::pendingLocalDescription() const
 232{
 233 return m_backend->pendingLocalDescription();
356234}
357235
358 void RTCPeerConnection::updateIce(const Dictionary& rtcConfiguration, ExceptionCode& ec)
 236void RTCPeerConnection::internalSetRemoteDescription(RTCSessionDescription* description, PeerConnection::VoidPromise&& promise)
359237{
360  if (m_signalingState == SignalingStateClosed) {
361  ec = INVALID_STATE_ERR;
 238 if (m_signalingState == SignalingState::Closed) {
 239 promise.reject(DOMError::create("InvalidStateError"));
362240 return;
363241 }
364242
365  m_configuration = parseConfiguration(rtcConfiguration, ec);
366  if (ec)
367  return;
 243 m_backend->setRemoteDescription(description, WTF::move(promise));
 244}
368245
369  bool valid = m_peerHandler->updateIce(m_configuration->privateConfiguration());
370  if (!valid)
371  ec = SYNTAX_ERR;
 246RefPtr<RTCSessionDescription> RTCPeerConnection::remoteDescription() const
 247{
 248 return m_backend->remoteDescription();
372249}
373250
374 void RTCPeerConnection::addIceCandidate(RTCIceCandidate* iceCandidate, PassRefPtr<VoidCallback> successCallback, PassRefPtr<RTCPeerConnectionErrorCallback> errorCallback, ExceptionCode& ec)
 251RefPtr<RTCSessionDescription> RTCPeerConnection::currentRemoteDescription() const
375252{
376  if (m_signalingState == SignalingStateClosed) {
377  ec = INVALID_STATE_ERR;
378  return;
379  }
 253 return m_backend->currentRemoteDescription();
 254}
 255
 256RefPtr<RTCSessionDescription> RTCPeerConnection::pendingRemoteDescription() const
 257{
 258 return m_backend->pendingRemoteDescription();
 259}
380260
381  if (!iceCandidate || !successCallback || !errorCallback) {
382  ec = TYPE_MISMATCH_ERR;
 261void RTCPeerConnection::internalAddIceCandidate(RTCIceCandidate* rtcCandidate, VoidPromise&& promise)
 262{
 263 if (m_signalingState == SignalingState::Closed) {
 264 promise.reject(DOMError::create("InvalidStateError"));
383265 return;
384266 }
385267
386  RefPtr<RTCVoidRequestImpl> request = RTCVoidRequestImpl::create(scriptExecutionContext(), successCallback, errorCallback);
387 
388  bool implemented = m_peerHandler->addIceCandidate(request.release(), iceCandidate->descriptor());
389  if (!implemented)
390  ec = SYNTAX_ERR;
 268 m_backend->addIceCandidate(rtcCandidate, WTF::move(promise));
391269}
392270
393271String RTCPeerConnection::signalingState() const
394272{
395273 switch (m_signalingState) {
396  case SignalingStateStable:
 274 case SignalingState::Stable:
397275 return ASCIILiteral("stable");
398  case SignalingStateHaveLocalOffer:
 276 case SignalingState::HaveLocalOffer:
399277 return ASCIILiteral("have-local-offer");
400  case SignalingStateHaveRemoteOffer:
 278 case SignalingState::HaveRemoteOffer:
401279 return ASCIILiteral("have-remote-offer");
402  case SignalingStateHaveLocalPrAnswer:
 280 case SignalingState::HaveLocalPrAnswer:
403281 return ASCIILiteral("have-local-pranswer");
404  case SignalingStateHaveRemotePrAnswer:
 282 case SignalingState::HaveRemotePrAnswer:
405283 return ASCIILiteral("have-remote-pranswer");
406  case SignalingStateClosed:
 284 case SignalingState::Closed:
407285 return ASCIILiteral("closed");
408286 }
409287

@@String RTCPeerConnection::signalingState
414292String RTCPeerConnection::iceGatheringState() const
415293{
416294 switch (m_iceGatheringState) {
417  case IceGatheringStateNew:
 295 case IceGatheringState::New:
418296 return ASCIILiteral("new");
419  case IceGatheringStateGathering:
 297 case IceGatheringState::Gathering:
420298 return ASCIILiteral("gathering");
421  case IceGatheringStateComplete:
 299 case IceGatheringState::Complete:
422300 return ASCIILiteral("complete");
423301 }
424302

@@String RTCPeerConnection::iceGatheringSt
429307String RTCPeerConnection::iceConnectionState() const
430308{
431309 switch (m_iceConnectionState) {
432  case IceConnectionStateNew:
 310 case IceConnectionState::New:
433311 return ASCIILiteral("new");
434  case IceConnectionStateChecking:
 312 case IceConnectionState::Checking:
435313 return ASCIILiteral("checking");
436  case IceConnectionStateConnected:
 314 case IceConnectionState::Connected:
437315 return ASCIILiteral("connected");
438  case IceConnectionStateCompleted:
 316 case IceConnectionState::Completed:
439317 return ASCIILiteral("completed");
440  case IceConnectionStateFailed:
 318 case IceConnectionState::Failed:
441319 return ASCIILiteral("failed");
442  case IceConnectionStateDisconnected:
 320 case IceConnectionState::Disconnected:
443321 return ASCIILiteral("disconnected");
444  case IceConnectionStateClosed:
 322 case IceConnectionState::Closed:
445323 return ASCIILiteral("closed");
446324 }
447325

@@String RTCPeerConnection::iceConnectionS
449327 return String();
450328}
451329
452 void RTCPeerConnection::addStream(PassRefPtr<MediaStream> prpStream, ExceptionCode& ec)
453 {
454  if (m_signalingState == SignalingStateClosed) {
455  ec = INVALID_STATE_ERR;
456  return;
457  }
458 
459  RefPtr<MediaStream> stream = prpStream;
460  if (!stream) {
461  ec = TYPE_MISMATCH_ERR;
462  return;
463  }
464 
465  if (m_localStreams.contains(stream))
466  return;
467 
468  bool valid = m_peerHandler->addStream(stream->privateStream());
469  if (!valid)
470  ec = SYNTAX_ERR;
471  else {
472  m_localStreams.append(stream);
473  stream->addObserver(this);
474  }
475 }
476 
477 void RTCPeerConnection::removeStream(PassRefPtr<MediaStream> prpStream, ExceptionCode& ec)
478 {
479  if (m_signalingState == SignalingStateClosed) {
480  ec = INVALID_STATE_ERR;
481  return;
482  }
483 
484  if (!prpStream) {
485  ec = TYPE_MISMATCH_ERR;
486  return;
487  }
488 
489  RefPtr<MediaStream> stream = prpStream;
490 
491  size_t pos = m_localStreams.find(stream);
492  if (pos == notFound)
493  return;
494 
495  m_localStreams.remove(pos);
496  stream->removeObserver(this);
497  m_peerHandler->removeStream(stream->privateStream());
498 }
499 
500330RTCConfiguration* RTCPeerConnection::getConfiguration() const
501331{
502332 return m_configuration.get();
503333}
504334
505 Vector<RefPtr<MediaStream>> RTCPeerConnection::getLocalStreams() const
 335void RTCPeerConnection::setConfiguration(const Dictionary& configuration, ExceptionCode& ec)
506336{
507  return m_localStreams;
508 }
509 
510 Vector<RefPtr<MediaStream>> RTCPeerConnection::getRemoteStreams() const
511 {
512  return m_remoteStreams;
513 }
514 
515 MediaStream* RTCPeerConnection::getStreamById(const String& streamId)
516 {
517  for (auto& localStream : m_localStreams) {
518  if (localStream->id() == streamId)
519  return localStream.get();
520  }
521 
522  for (auto& remoteStream : m_remoteStreams) {
523  if (remoteStream->id() == streamId)
524  return remoteStream.get();
 337 if (configuration.isUndefinedOrNull()) {
 338 ec = TypeError;
 339 return;
525340 }
526341
527  return nullptr;
528 }
529 
530 void RTCPeerConnection::getStats(PassRefPtr<RTCStatsCallback> successCallback, PassRefPtr<RTCPeerConnectionErrorCallback> errorCallback, PassRefPtr<MediaStreamTrack> selector)
531 {
532  RefPtr<MediaStreamTrack> track = selector;
533  RefPtr<RTCStatsRequestImpl> statsRequest = RTCStatsRequestImpl::create(scriptExecutionContext(), successCallback, errorCallback, track ? &track->privateTrack() : nullptr);
534 
535  // FIXME: Add passing selector as part of the statsRequest.
536  m_peerHandler->getStats(statsRequest.release());
537 }
538 
539 PassRefPtr<RTCDataChannel> RTCPeerConnection::createDataChannel(String label, const Dictionary& options, ExceptionCode& ec)
540 {
541  if (m_signalingState == SignalingStateClosed) {
 342 if (m_signalingState == SignalingState::Closed) {
542343 ec = INVALID_STATE_ERR;
543  return nullptr;
 344 return;
544345 }
545346
546  RefPtr<RTCDataChannel> channel = RTCDataChannel::create(scriptExecutionContext(), m_peerHandler.get(), label, options, ec);
 347 RefPtr<RTCConfiguration> newConfiguration = RTCConfiguration::create(configuration, ec);
547348 if (ec)
548  return nullptr;
 349 return;
549350
550  m_dataChannels.append(channel);
551  return channel.release();
 351 m_configuration = WTF::move(newConfiguration);
 352 m_backend->setConfiguration(*m_configuration);
552353}
553354
554 bool RTCPeerConnection::hasLocalStreamWithTrackId(const String& trackId)
 355void RTCPeerConnection::internalGetStats(MediaStreamTrack* selector, PeerConnection::StatsPromise&& promise)
555356{
556  for (auto& localStream : m_localStreams) {
557  if (localStream->getTrackById(trackId))
558  return true;
559  }
560  return false;
 357 m_backend->getStats(selector, WTF::move(promise));
561358}
562359
563 PassRefPtr<RTCDTMFSender> RTCPeerConnection::createDTMFSender(PassRefPtr<MediaStreamTrack> prpTrack, ExceptionCode& ec)
 360void RTCPeerConnection::internalGetStats(PeerConnection::StatsPromise&& promise)
564361{
565  if (m_signalingState == SignalingStateClosed) {
566  ec = INVALID_STATE_ERR;
567  return nullptr;
568  }
569 
570  if (!prpTrack) {
571  ec = TypeError;
572  return nullptr;
573  }
574 
575  RefPtr<MediaStreamTrack> track = prpTrack;
576 
577  if (!hasLocalStreamWithTrackId(track->id())) {
578  ec = SYNTAX_ERR;
579  return nullptr;
580  }
581 
582  RefPtr<RTCDTMFSender> dtmfSender = RTCDTMFSender::create(scriptExecutionContext(), m_peerHandler.get(), track.release(), ec);
583  if (ec)
584  return nullptr;
585  return dtmfSender.release();
 362 internalGetStats(nullptr, WTF::move(promise));
586363}
587364
588 void RTCPeerConnection::close(ExceptionCode& ec)
 365RefPtr<RTCDataChannel> RTCPeerConnection::createDataChannel(String, const Dictionary&, ExceptionCode& ec)
589366{
590  if (m_signalingState == SignalingStateClosed) {
 367 if (m_signalingState == SignalingState::Closed) {
591368 ec = INVALID_STATE_ERR;
592  return;
593  }
594 
595  m_peerHandler->stop();
596 
597  changeIceConnectionState(IceConnectionStateClosed);
598  changeIceGatheringState(IceGatheringStateComplete);
599  changeSignalingState(SignalingStateClosed);
600 }
601 
602 void RTCPeerConnection::negotiationNeeded()
603 {
604  scheduleDispatchEvent(Event::create(eventNames().negotiationneededEvent, false, false));
605 }
606 
607 void RTCPeerConnection::didGenerateIceCandidate(PassRefPtr<RTCIceCandidateDescriptor> iceCandidateDescriptor)
608 {
609  ASSERT(scriptExecutionContext()->isContextThread());
610  if (!iceCandidateDescriptor)
611  scheduleDispatchEvent(RTCIceCandidateEvent::create(false, false, 0));
612  else {
613  RefPtr<RTCIceCandidate> iceCandidate = RTCIceCandidate::create(iceCandidateDescriptor);
614  scheduleDispatchEvent(RTCIceCandidateEvent::create(false, false, iceCandidate.release()));
 369 return nullptr;
615370 }
616 }
617 
618 void RTCPeerConnection::didChangeSignalingState(SignalingState newState)
619 {
620  ASSERT(scriptExecutionContext()->isContextThread());
621  changeSignalingState(newState);
622 }
623 
624 void RTCPeerConnection::didChangeIceGatheringState(IceGatheringState newState)
625 {
626  ASSERT(scriptExecutionContext()->isContextThread());
627  changeIceGatheringState(newState);
628 }
629 
630 void RTCPeerConnection::didChangeIceConnectionState(IceConnectionState newState)
631 {
632  ASSERT(scriptExecutionContext()->isContextThread());
633  changeIceConnectionState(newState);
634 }
635 
636 void RTCPeerConnection::didAddRemoteStream(PassRefPtr<MediaStreamPrivate> privateStream)
637 {
638  ASSERT(scriptExecutionContext()->isContextThread());
639 
640  if (m_signalingState == SignalingStateClosed)
641  return;
642 
643  RefPtr<MediaStream> stream = MediaStream::create(*scriptExecutionContext(), privateStream);
644  m_remoteStreams.append(stream);
645 
646  scheduleDispatchEvent(MediaStreamEvent::create(eventNames().addstreamEvent, false, false, stream.release()));
647 }
648 
649 void RTCPeerConnection::didRemoveRemoteStream(MediaStreamPrivate* privateStream)
650 {
651  ASSERT(scriptExecutionContext()->isContextThread());
652  ASSERT(privateStream->client());
653 
654  // FIXME: this class shouldn't know that the private stream client is a MediaStream!
655  RefPtr<MediaStream> stream = static_cast<MediaStream*>(privateStream->client());
656371
657  if (m_signalingState == SignalingStateClosed)
658  return;
659 
660  size_t pos = m_remoteStreams.find(stream);
661  ASSERT(pos != notFound);
662  m_remoteStreams.remove(pos);
663 
664  scheduleDispatchEvent(MediaStreamEvent::create(eventNames().removestreamEvent, false, false, stream.release()));
 372 return nullptr;
665373}
666374
667 void RTCPeerConnection::didAddRemoteDataChannel(std::unique_ptr<RTCDataChannelHandler> handler)
 375void RTCPeerConnection::close()
668376{
669  ASSERT(scriptExecutionContext()->isContextThread());
670 
671  if (m_signalingState == SignalingStateClosed)
 377 if (m_signalingState == SignalingState::Closed)
672378 return;
673379
674  RefPtr<RTCDataChannel> channel = RTCDataChannel::create(scriptExecutionContext(), WTF::move(handler));
675  m_dataChannels.append(channel);
676 
677  scheduleDispatchEvent(RTCDataChannelEvent::create(eventNames().datachannelEvent, false, false, channel.release()));
 380 m_signalingState = SignalingState::Closed;
678381}
679382
680383void RTCPeerConnection::stop()

@@void RTCPeerConnection::stop()
683386 return;
684387
685388 m_stopped = true;
686  m_iceConnectionState = IceConnectionStateClosed;
687  m_signalingState = SignalingStateClosed;
688 
689  for (auto& channel : m_dataChannels)
690  channel->stop();
 389 m_iceConnectionState = IceConnectionState::Closed;
 390 m_signalingState = SignalingState::Closed;
691391}
692392
693393const char* RTCPeerConnection::activeDOMObjectName() const

@@bool RTCPeerConnection::canSuspendForPag
701401 return false;
702402}
703403
704 void RTCPeerConnection::didAddOrRemoveTrack()
 404void RTCPeerConnection::setSignalingState(SignalingState newState)
705405{
706  negotiationNeeded();
 406 m_signalingState = newState;
707407}
708408
709 void RTCPeerConnection::changeSignalingState(SignalingState signalingState)
 409void RTCPeerConnection::updateIceGatheringState(IceGatheringState newState)
710410{
711  if (m_signalingState != SignalingStateClosed && m_signalingState != signalingState) {
712  m_signalingState = signalingState;
713  scheduleDispatchEvent(Event::create(eventNames().signalingstatechangeEvent, false, false));
714  }
715 }
 411 scriptExecutionContext()->postTask([=](ScriptExecutionContext&) {
 412 m_iceGatheringState = newState;
716413
717 void RTCPeerConnection::changeIceGatheringState(IceGatheringState iceGatheringState)
718 {
719  m_iceGatheringState = iceGatheringState;
 414 dispatchEvent(Event::create(eventNames().icegatheringstatechangeEvent, false, false));
 415 });
720416}
721417
722 void RTCPeerConnection::changeIceConnectionState(IceConnectionState iceConnectionState)
 418void RTCPeerConnection::updateIceConnectionState(IceConnectionState newState)
723419{
724  if (m_iceConnectionState != IceConnectionStateClosed && m_iceConnectionState != iceConnectionState) {
725  m_iceConnectionState = iceConnectionState;
726  scheduleDispatchEvent(Event::create(eventNames().iceconnectionstatechangeEvent, false, false));
727  }
 420 scriptExecutionContext()->postTask([=](ScriptExecutionContext&) {
 421 m_iceConnectionState = newState;
 422
 423 dispatchEvent(Event::create(eventNames().iceconnectionstatechangeEvent, false, false));
 424 });
728425}
729426
730 void RTCPeerConnection::scheduleDispatchEvent(PassRefPtr<Event> event)
 427void RTCPeerConnection::scheduleNegotiationNeededEvent()
731428{
732  m_scheduledEvents.append(event);
733 
734  if (!m_scheduledEventTimer.isActive())
735  m_scheduledEventTimer.startOneShot(0);
 429 scriptExecutionContext()->postTask([=](ScriptExecutionContext&) {
 430 if (m_backend->isNegotiationNeeded()) {
 431 dispatchEvent(Event::create(eventNames().negotiationneededEvent, false, false));
 432 m_backend->clearNegotiationNeededState();
 433 }
 434 });
736435}
737436
738 void RTCPeerConnection::scheduledEventTimerFired()
 437void RTCPeerConnection::fireEvent(RefPtr<Event>&& event)
739438{
740  if (m_stopped)
741  return;
742 
743  Vector<RefPtr<Event>> events;
744  events.swap(m_scheduledEvents);
745 
746  for (auto& event : events)
747  dispatchEvent(event.release());
748 
749  events.clear();
 439 dispatchEvent(event.release());
750440}
751441
752442} // namespace WebCore
191695

Source/WebCore/Modules/mediastream/RTCPeerConnection.h

11/*
22 * Copyright (C) 2012 Google Inc. All rights reserved.
33 * Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
 4 * Copyright (C) 2015 Ericsson AB. All rights reserved.
45 *
56 * Redistribution and use in source and binary forms, with or without
67 * modification, are permitted provided that the following conditions

3738#include "ActiveDOMObject.h"
3839#include "Dictionary.h"
3940#include "EventTarget.h"
40 #include "ExceptionBase.h"
41 #include "MediaStream.h"
42 #include "RTCIceCandidate.h"
43 #include "RTCPeerConnectionHandler.h"
44 #include "RTCPeerConnectionHandlerClient.h"
 41// FIXME: Workaround for bindings bug http://webkit.org/b/150121
 42#include "JSMediaStream.h"
 43#include "PeerConnectionBackend.h"
4544#include "ScriptWrappable.h"
46 #include "Timer.h"
 45#include <wtf/HashMap.h>
4746#include <wtf/RefCounted.h>
4847
4948namespace WebCore {
5049
 50class MediaStream;
5151class MediaStreamTrack;
 52class PeerConnectionBackend;
5253class RTCConfiguration;
53 class RTCDTMFSender;
5454class RTCDataChannel;
 55class RTCIceCandidate;
5556class RTCPeerConnectionErrorCallback;
 57class RTCRtpReceiver;
 58class RTCRtpSender;
5659class RTCSessionDescription;
57 class RTCSessionDescriptionCallback;
5860class RTCStatsCallback;
59 class VoidCallback;
6061
61 class RTCPeerConnection final : public RefCounted<RTCPeerConnection>, public ScriptWrappable, public RTCPeerConnectionHandlerClient, public EventTargetWithInlineData, public ActiveDOMObject, public MediaStream::Observer {
 62class RTCPeerConnection final : public RefCounted<RTCPeerConnection>, public ScriptWrappable, public PeerConnectionBackendClient, public EventTargetWithInlineData, public ActiveDOMObject {
6263public:
6364 static RefPtr<RTCPeerConnection> create(ScriptExecutionContext&, const Dictionary& rtcConfiguration, ExceptionCode&);
6465 ~RTCPeerConnection();
6566
66  void createOffer(PassRefPtr<RTCSessionDescriptionCallback>, PassRefPtr<RTCPeerConnectionErrorCallback>, const Dictionary& offerOptions, ExceptionCode&);
 67 Vector<RefPtr<RTCRtpSender>> getSenders() const override;
 68 Vector<RefPtr<RTCRtpReceiver>> getReceivers() const;
6769
68  void createAnswer(PassRefPtr<RTCSessionDescriptionCallback>, PassRefPtr<RTCPeerConnectionErrorCallback>, const Dictionary& answerOptions, ExceptionCode&);
 70 RefPtr<RTCRtpSender> addTrack(RefPtr<MediaStreamTrack>&&, Vector<MediaStream*>, ExceptionCode&);
 71 void removeTrack(RTCRtpSender*, ExceptionCode&);
6972
70  void setLocalDescription(PassRefPtr<RTCSessionDescription>, PassRefPtr<VoidCallback>, PassRefPtr<RTCPeerConnectionErrorCallback>, ExceptionCode&);
71  PassRefPtr<RTCSessionDescription> localDescription(ExceptionCode&);
 73 void internalCreateOffer(const Dictionary& offerOptions, PeerConnection::SessionDescriptionPromise&&);
 74 void internalCreateAnswer(const Dictionary& answerOptions, PeerConnection::SessionDescriptionPromise&&);
7275
73  void setRemoteDescription(PassRefPtr<RTCSessionDescription>, PassRefPtr<VoidCallback>, PassRefPtr<RTCPeerConnectionErrorCallback>, ExceptionCode&);
74  PassRefPtr<RTCSessionDescription> remoteDescription(ExceptionCode&);
 76 void internalSetLocalDescription(RTCSessionDescription*, PeerConnection::VoidPromise&&);
 77 RefPtr<RTCSessionDescription> localDescription() const;
 78 RefPtr<RTCSessionDescription> currentLocalDescription() const;
 79 RefPtr<RTCSessionDescription> pendingLocalDescription() const;
 80
 81 void internalSetRemoteDescription(RTCSessionDescription*, PeerConnection::VoidPromise&&);
 82 RefPtr<RTCSessionDescription> remoteDescription() const;
 83 RefPtr<RTCSessionDescription> currentRemoteDescription() const;
 84 RefPtr<RTCSessionDescription> pendingRemoteDescription() const;
7585
7686 String signalingState() const;
7787
78  void updateIce(const Dictionary& rtcConfiguration, ExceptionCode&);
79 
80  void addIceCandidate(RTCIceCandidate*, PassRefPtr<VoidCallback>, PassRefPtr<RTCPeerConnectionErrorCallback>, ExceptionCode&);
 88 void internalAddIceCandidate(RTCIceCandidate*, PeerConnection::VoidPromise&&);
8189
8290 String iceGatheringState() const;
83 
8491 String iceConnectionState() const;
8592
8693 RTCConfiguration* getConfiguration() const;
 94 void setConfiguration(const Dictionary& configuration, ExceptionCode&);
8795
88  Vector<RefPtr<MediaStream>> getLocalStreams() const;
89 
90  Vector<RefPtr<MediaStream>> getRemoteStreams() const;
91 
92  MediaStream* getStreamById(const String& streamId);
93 
94  void addStream(PassRefPtr<MediaStream>, ExceptionCode&);
95 
96  void removeStream(PassRefPtr<MediaStream>, ExceptionCode&);
 96 void internalGetStats(MediaStreamTrack*, PeerConnection::StatsPromise&&);
 97 void internalGetStats(PeerConnection::StatsPromise&&);
9798
98  void getStats(PassRefPtr<RTCStatsCallback> successCallback, PassRefPtr<RTCPeerConnectionErrorCallback>, PassRefPtr<MediaStreamTrack> selector);
 99 RefPtr<RTCDataChannel> createDataChannel(String label, const Dictionary& dataChannelDict, ExceptionCode&);
99100
100  PassRefPtr<RTCDataChannel> createDataChannel(String label, const Dictionary& dataChannelDict, ExceptionCode&);
101 
102  PassRefPtr<RTCDTMFSender> createDTMFSender(PassRefPtr<MediaStreamTrack>, ExceptionCode&);
103 
104  void close(ExceptionCode&);
105 
106  // RTCPeerConnectionHandlerClient
107  virtual void negotiationNeeded() override;
108  virtual void didGenerateIceCandidate(PassRefPtr<RTCIceCandidateDescriptor>) override;
109  virtual void didChangeSignalingState(SignalingState) override;
110  virtual void didChangeIceGatheringState(IceGatheringState) override;
111  virtual void didChangeIceConnectionState(IceConnectionState) override;
112  virtual void didAddRemoteStream(PassRefPtr<MediaStreamPrivate>) override;
113  virtual void didRemoveRemoteStream(MediaStreamPrivate*) override;
114  virtual void didAddRemoteDataChannel(std::unique_ptr<RTCDataChannelHandler>) override;
 101 void close();
115102
116103 // EventTarget
117104 virtual EventTargetInterface eventTargetInterface() const override { return RTCPeerConnectionEventTargetInterfaceType; }
118105 virtual ScriptExecutionContext* scriptExecutionContext() const override { return ActiveDOMObject::scriptExecutionContext(); }
119106
120  // MediaStream::Observer
121  virtual void didAddOrRemoveTrack() override;
122 
123107 using RefCounted<RTCPeerConnection>::ref;
124108 using RefCounted<RTCPeerConnection>::deref;
125109
126110private:
127  RTCPeerConnection(ScriptExecutionContext&, PassRefPtr<RTCConfiguration>, ExceptionCode&);
128 
129  static RefPtr<RTCConfiguration> parseConfiguration(const Dictionary& configuration, ExceptionCode&);
130  void scheduleDispatchEvent(PassRefPtr<Event>);
131  void scheduledEventTimerFired();
132  bool hasLocalStreamWithTrackId(const String& trackId);
 111 RTCPeerConnection(ScriptExecutionContext&, RefPtr<RTCConfiguration>&&, ExceptionCode&);
133112
134113 // EventTarget implementation.
135114 virtual void refEventTarget() override { ref(); }

@@private:
140119 const char* activeDOMObjectName() const override;
141120 bool canSuspendForPageCache() const override;
142121
143  void changeSignalingState(SignalingState);
144  void changeIceGatheringState(IceGatheringState);
145  void changeIceConnectionState(IceConnectionState);
146 
147  bool checkStateForLocalDescription(RTCSessionDescription*);
148  bool checkStateForRemoteDescription(RTCSessionDescription*);
149 
150  SignalingState m_signalingState;
151  IceGatheringState m_iceGatheringState;
152  IceConnectionState m_iceConnectionState;
 122 // PeerConnectionBackendClient
 123 void setSignalingState(PeerConnectionStates::SignalingState) override;
 124 void updateIceGatheringState(PeerConnectionStates::IceGatheringState) override;
 125 void updateIceConnectionState(PeerConnectionStates::IceConnectionState) override;
 126
 127 void scheduleNegotiationNeededEvent() override;
 128
 129 ScriptExecutionContext* context() const override { return scriptExecutionContext(); };
 130 void fireEvent(RefPtr<Event>&&) override;
 131 PeerConnectionStates::SignalingState internalSignalingState() const override { return m_signalingState; }
 132 PeerConnectionStates::IceGatheringState internalIceGatheringState() const override { return m_iceGatheringState; }
 133 PeerConnectionStates::IceConnectionState internalIceConnectionState() const override { return m_iceConnectionState; }
 134
 135 PeerConnectionStates::SignalingState m_signalingState;
 136 PeerConnectionStates::IceGatheringState m_iceGatheringState;
 137 PeerConnectionStates::IceConnectionState m_iceConnectionState;
153138
154  Vector<RefPtr<MediaStream>> m_localStreams;
155  Vector<RefPtr<MediaStream>> m_remoteStreams;
 139 HashMap<String, RefPtr<RTCRtpSender>> m_senderSet;
 140 HashMap<String, RefPtr<RTCRtpReceiver>> m_receiverSet;
156141
157142 Vector<RefPtr<RTCDataChannel>> m_dataChannels;
158143
159  std::unique_ptr<RTCPeerConnectionHandler> m_peerHandler;
160 
161  Timer m_scheduledEventTimer;
162  Vector<RefPtr<Event>> m_scheduledEvents;
 144 std::unique_ptr<PeerConnectionBackend> m_backend;
163145
164146 RefPtr<RTCConfiguration> m_configuration;
165147
191695

Source/WebCore/Modules/mediastream/RTCPeerConnection.idl

11/*
22 * Copyright (C) 2012 Google Inc. All rights reserved.
33 * Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
 4 * Copyright (C) 2015 Ericsson AB. All rights reserved.
45 *
56 * Redistribution and use in source and binary forms, with or without
67 * modification, are permitted provided that the following conditions

3536 CustomConstructor(Dictionary rtcConfiguration),
3637 ConstructorCallWith=ScriptExecutionContext,
3738 ConstructorRaisesException,
38  ConstructorCallWith=ScriptExecutionContext,
3939 EventTarget,
4040 InterfaceName=webkitRTCPeerConnection,
4141] interface RTCPeerConnection {
42  [RaisesException] void createOffer(RTCSessionDescriptionCallback successCallback, RTCPeerConnectionErrorCallback failureCallback, optional Dictionary offerOptions);
43 
44  [RaisesException] void createAnswer(RTCSessionDescriptionCallback successCallback, RTCPeerConnectionErrorCallback failureCallback, optional Dictionary answerOptions);
4542
46  [RaisesException] void setLocalDescription(RTCSessionDescription description, VoidCallback successCallback, RTCPeerConnectionErrorCallback failureCallback);
47  [GetterRaisesException] readonly attribute RTCSessionDescription localDescription;
48 
49  [RaisesException] void setRemoteDescription(RTCSessionDescription description, VoidCallback successCallback, RTCPeerConnectionErrorCallback failureCallback);
50  [GetterRaisesException] readonly attribute RTCSessionDescription remoteDescription;
 43 // FIXME: Don't expose these functions. Either write manual bindings and
 44 // associate them with private symbols or use approach with [Private] IDL
 45 // attribute mentioned in webkit.org/b/149499#c10
 46 Promise internalCreateOffer(optional Dictionary offerOptions);
 47 Promise internalCreateAnswer(optional Dictionary answerOptions);
 48 Promise internalSetLocalDescription(RTCSessionDescription description);
 49 Promise internalSetRemoteDescription(RTCSessionDescription description);
 50 Promise internalAddIceCandidate(RTCIceCandidate candidate);
 51 Promise internalGetStats(optional MediaStreamTrack selector);
 52
 53 [JSBuiltin] Promise createOffer(optional Dictionary offerOptions);
 54 // Legacy signature: void createOffer(RTCSessionDescriptionCallback successCallback
 55 // RTCPeerConnectionErrorCallback errorCallback,
 56 // optional Dictionary offerOptions);
 57
 58 [JSBuiltin] Promise createAnswer(optional Dictionary answerOptions);
 59 // Legacy signature: void createAnswer(RTCSessionDescriptionCallback successCallback
 60 // RTCPeerConnectionErrorCallback errorCallback,
 61 // optional Dictionary answerOptions);
 62
 63 sequence<RTCRtpSender> getSenders();
 64 sequence<RTCRtpReceiver> getReceivers();
 65
 66 [StrictTypeChecking, RaisesException] RTCRtpSender addTrack(MediaStreamTrack track, MediaStream... streams);
 67 [StrictTypeChecking, RaisesException] void removeTrack(RTCRtpSender sender);
 68
 69 [JSBuiltin] Promise setLocalDescription(RTCSessionDescription description);
 70 // Legacy signature: void setLocalDescription(RTCSessionDescription description
 71 // VoidCallback successCallback,
 72 // RTCPeerConnectionErrorCallback errorCallback);
 73
 74 readonly attribute RTCSessionDescription localDescription;
 75 readonly attribute RTCSessionDescription currentLocalDescription;
 76 readonly attribute RTCSessionDescription pendingLocalDescription;
 77
 78 [JSBuiltin] Promise setRemoteDescription(RTCSessionDescription description);
 79 // Legacy signature: void setRemoteDescription(RTCSessionDescription description
 80 // VoidCallback successCallback,
 81 // RTCPeerConnectionErrorCallback errorCallback);
 82
 83 readonly attribute RTCSessionDescription remoteDescription;
 84 readonly attribute RTCSessionDescription currentRemoteDescription;
 85 readonly attribute RTCSessionDescription pendingRemoteDescription;
5186
5287 readonly attribute DOMString signalingState;
5388
54  [RaisesException] void updateIce(Dictionary configuration);
55 
56  [RaisesException] void addIceCandidate(RTCIceCandidate candidate, VoidCallback successCallback, RTCPeerConnectionErrorCallback failureCallback);
 89 [JSBuiltin] Promise addIceCandidate(RTCIceCandidate candidate);
 90 // Legacy signature: void addIceCandidate(RTCIceCandidate candidate
 91 // VoidCallback successCallback,
 92 // RTCPeerConnectionErrorCallback errorCallback);
5793
5894 readonly attribute DOMString iceGatheringState;
5995 readonly attribute DOMString iceConnectionState;
6096
61  sequence<MediaStream> getLocalStreams();
62  sequence<MediaStream> getRemoteStreams();
63  MediaStream getStreamById(DOMString streamId);
64 
6597 RTCConfiguration getConfiguration();
 98 [RaisesException] void setConfiguration(Dictionary configuration);
6699
67  [StrictTypeChecking, RaisesException] void addStream(MediaStream stream);
68  [StrictTypeChecking, RaisesException] void removeStream(MediaStream stream);
69 
70  void getStats(RTCStatsCallback successCallback, RTCPeerConnectionErrorCallback failureCallback, [Default=Undefined] optional MediaStreamTrack selector);
 100 [JSBuiltin] Promise getStats(optional MediaStreamTrack selector);
 101 // Legacy signature: void getStats(MediaStreamTrack selector
 102 // RTCStatsCallback successCallback,
 103 // RTCPeerConnectionErrorCallback errorCallback);
71104
72105 [RaisesException] RTCDataChannel createDataChannel([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString label, optional Dictionary options);
73106
74  [RaisesException] RTCDTMFSender createDTMFSender(MediaStreamTrack track);
75 
76  [RaisesException] void close();
 107 void close();
77108
78109 attribute EventHandler onnegotiationneeded;
79110 attribute EventHandler onicecandidate;
80111 attribute EventHandler onsignalingstatechange;
81  attribute EventHandler onaddstream;
82  attribute EventHandler onremovestream;
 112 attribute EventHandler ontrack;
83113 attribute EventHandler oniceconnectionstatechange;
 114 attribute EventHandler onicegatheringstatechange;
84115 attribute EventHandler ondatachannel;
85116
86117 // EventTarget interface
191695

Source/WebCore/Modules/mediastream/RTCPeerConnection.js

 1/*
 2 * Copyright (C) 2015 Ericsson AB. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 *
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * 3. Neither the name of Ericsson nor the names of its contributors
 15 * may be used to endorse or promote products derived from this
 16 * software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31// @optional=MEDIA_STREAM
 32
 33function createOffer()
 34{
 35 "use strict";
 36
 37 var peerConnection = this;
 38 var options = {};
 39
 40 if (arguments.length > 1 && arguments[0] instanceof Function && arguments[1] instanceof Function) {
 41 // Legacy callbacks mode
 42 var successCallback = arguments[0];
 43 var errorCallback = arguments[1];
 44
 45 if (arguments.length > 2) {
 46 options = arguments[2];
 47 if (!@isDictionary(options))
 48 throw new @TypeError("Argument 3 ('options') to RTCPeerConnection.createOffer must be a Dictionary");
 49 }
 50
 51 @runQueuedOperation(peerConnection, function () {
 52 return peerConnection.internalCreateOffer(options).then(successCallback, errorCallback);
 53 });
 54 return;
 55 }
 56
 57 // Promise mode
 58 if (arguments.length) {
 59 options = arguments[0];
 60 if (!@isDictionary(options))
 61 throw new @TypeError("Argument 1 ('options') to RTCPeerConnection.createOffer must be a Dictionary");
 62 }
 63
 64 return @runQueuedOperation(peerConnection, function () {
 65 return peerConnection.internalCreateOffer(options);
 66 });
 67}
 68
 69function createAnswer()
 70{
 71 "use strict";
 72
 73 var peerConnection = this;
 74 var options = {};
 75
 76 if (arguments.length > 1 && arguments[0] instanceof Function && arguments[1] instanceof Function) {
 77 // Legacy callbacks mode
 78 var successCallback = arguments[0];
 79 var errorCallback = arguments[1];
 80
 81 if (arguments.length > 2) {
 82 options = arguments[2];
 83 if (!@isDictionary(options))
 84 throw new @TypeError("Argument 3 ('options') to RTCPeerConnection.createAnswer must be a Dictionary");
 85 }
 86
 87 @runQueuedOperation(peerConnection, function () {
 88 return peerConnection.internalCreateAnswer(options).then(successCallback, errorCallback);
 89 });
 90 return;
 91 }
 92
 93 // Promise mode
 94 if (arguments.length) {
 95 options = arguments[0];
 96 if (!@isDictionary(options))
 97 throw new @TypeError("Argument 1 ('options') to RTCPeerConnection.createAnswer must be a Dictionary");
 98 }
 99
 100 return @runQueuedOperation(peerConnection, function () {
 101 return peerConnection.internalCreateAnswer(options);
 102 });
 103}
 104
 105function setLocalDescription()
 106{
 107 "use strict";
 108
 109 var peerConnection = this;
 110
 111 if (arguments.length < 1)
 112 throw new @TypeError("Not enough arguments");
 113
 114 var description = arguments[0];
 115 if (!(description instanceof RTCSessionDescription))
 116 throw new @TypeError("Argument 1 ('description') to RTCPeerConnection.setLocalDescription must be an instance of RTCSessionDescription");
 117
 118 if (arguments.length > 2 && arguments[1] instanceof Function && arguments[2] instanceof Function) {
 119 // Legacy callbacks mode
 120 var successCallback = arguments[1];
 121 var errorCallback = arguments[2];
 122
 123 @runQueuedOperation(peerConnection, function () {
 124 return peerConnection.internalSetLocalDescription(description).then(successCallback, errorCallback);
 125 });
 126 return;
 127 }
 128
 129 // Promise mode
 130 return @runQueuedOperation(peerConnection, function () {
 131 return peerConnection.internalSetLocalDescription(description);
 132 });
 133}
 134
 135function setRemoteDescription()
 136{
 137 "use strict";
 138 var peerConnection = this;
 139
 140 if (arguments.length < 1)
 141 throw new @TypeError("Not enough arguments");
 142
 143 var description = arguments[0];
 144 if (!(description instanceof RTCSessionDescription))
 145 throw new @TypeError("Argument 1 ('description') to RTCPeerConnection.setRemoteDescription must be an instance of RTCSessionDescription");
 146
 147 if (arguments.length > 2 && arguments[1] instanceof Function && arguments[2] instanceof Function) {
 148 // Legacy callbacks mode
 149 var successCallback = arguments[1];
 150 var errorCallback = arguments[2];
 151
 152 @runQueuedOperation(peerConnection, function () {
 153 return peerConnection.internalSetRemoteDescription(description).then(successCallback, errorCallback);
 154 });
 155 return;
 156 }
 157
 158 // Promise mode
 159 return @runQueuedOperation(peerConnection, function () {
 160 return peerConnection.internalSetRemoteDescription(description);
 161 });
 162}
 163
 164function addIceCandidate()
 165{
 166 "use strict";
 167 var peerConnection = this;
 168
 169 if (arguments.length < 1)
 170 throw new @TypeError("Not enough arguments");
 171
 172 var candidate = arguments[0];
 173 if (!(candidate instanceof RTCIceCandidate))
 174 throw new @TypeError("Argument 1 ('candidate') to RTCPeerConnection.addIceCandidate must be an instance of RTCIceCandidate");
 175
 176 if (arguments.length > 2 && arguments[1] instanceof Function && arguments[2] instanceof Function) {
 177 // Legacy callbacks mode
 178 var successCallback = arguments[1];
 179 var errorCallback = arguments[2];
 180
 181 @runQueuedOperation(peerConnection, function () {
 182 return peerConnection.internalAddIceCandidate(candidate).then(successCallback, errorCallback);
 183 });
 184 return;
 185 }
 186
 187 // Promise mode
 188 return @runQueuedOperation(peerConnection, function () {
 189 return peerConnection.internalAddIceCandidate(candidate);
 190 });
 191}
 192
 193function getStats()
 194{
 195 "use strict";
 196
 197 var peerConnection = this;
 198 var selector = null;
 199
 200 if (arguments.length) {
 201 selector = arguments[0];
 202 if (selector != null && !(selector instanceof MediaStreamTrack))
 203 throw new @TypeError("Argument 1 ('selector') to RTCPeerConnection.getStats must be an instance of MediaStreamTrack");
 204 }
 205
 206 if (arguments.length > 2 && arguments[1] instanceof Function && arguments[2] instanceof Function) {
 207 // Legacy callbacks mode
 208 var successCallback = arguments[1];
 209 var errorCallback = arguments[2];
 210
 211 peerConnection.internalGetStats(selector).then(successCallback, errorCallback);
 212 return;
 213 }
 214
 215 // Promise mode
 216 return peerConnection.internalGetStats(selector);
 217}
0

Source/WebCore/Modules/mediastream/RTCPeerConnectionErrorCallback.h

1 /*
2  * Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
14  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
15  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
16  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
17  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
19  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24  */
25 
26 #ifndef RTCPeerConnectionErrorCallback_h
27 #define RTCPeerConnectionErrorCallback_h
28 
29 #if ENABLE(MEDIA_STREAM)
30 
31 #include "DOMError.h"
32 #include <wtf/RefCounted.h>
33 
34 namespace WebCore {
35 
36 class RTCPeerConnectionErrorCallback : public RefCounted<RTCPeerConnectionErrorCallback> {
37 public:
38  virtual ~RTCPeerConnectionErrorCallback() { }
39  virtual bool handleEvent(DOMError*) = 0;
40 };
41 
42 } // namespace WebCore
43 
44 #endif // ENABLE(MEDIA_STREAM)
45 
46 #endif // RTCPeerConnectionErrorCallback_h
191695

Source/WebCore/Modules/mediastream/RTCPeerConnectionErrorCallback.idl

1 /*
2  * Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
14  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
15  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
16  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
17  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
19  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24  */
25 
26 [
27  Conditional=MEDIA_STREAM,
28  Callback=FunctionOnly,
29 ] callback interface RTCPeerConnectionErrorCallback {
30  boolean handleEvent(DOMError error);
31 };
32 
191695

Source/WebCore/Modules/mediastream/RTCPeerConnectionInternals.js

 1/*
 2 * Copyright (C) 2015 Ericsson AB. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 *
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * 3. Neither the name of Ericsson nor the names of its contributors
 15 * may be used to endorse or promote products derived from this
 16 * software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31// @optional=MEDIA_STREAM
 32// @internals
 33
 34// Operation queue as specified in section 4.3.1 (WebRTC 1.0)
 35function runQueuedOperation(peerConnection, operation)
 36{
 37 "use strict";
 38
 39 if (!peerConnection.@operations)
 40 peerConnection.@operations = [];
 41
 42 var operations = peerConnection.@operations;
 43
 44 function runNext() {
 45 operations.shift();
 46 if (operations.length)
 47 operations[0]();
 48 };
 49
 50 return new Promise(function (resolve, reject) {
 51 operations.push(function() {
 52 operation().then(resolve, reject).then(runNext, runNext);
 53 });
 54
 55 if (operations.length == 1)
 56 operations[0]();
 57 });
 58}
 59
 60function isDictionary(object)
 61{
 62 return typeof object == "undefined" || object == null || @isObject(object);
 63}
0

Source/WebCore/Modules/mediastream/RTCRtpReceiver.cpp

 1/*
 2 * Copyright (C) 2015 Ericsson AB. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 *
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * 3. Neither the name of Ericsson nor the names of its contributors
 15 * may be used to endorse or promote products derived from this
 16 * software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#include "config.h"
 32#include "RTCRtpReceiver.h"
 33
 34#if ENABLE(MEDIA_STREAM)
 35
 36namespace WebCore {
 37
 38Ref<RTCRtpReceiver> RTCRtpReceiver::create(RefPtr<MediaStreamTrack>&& track)
 39{
 40 return adoptRef(*new RTCRtpReceiver(WTF::move(track)));
 41}
 42
 43RTCRtpReceiver::RTCRtpReceiver(RefPtr<MediaStreamTrack>&& track)
 44 : RTCRtpSenderReceiverBase(WTF::move(track))
 45{
 46}
 47
 48RTCRtpReceiver::~RTCRtpReceiver()
 49{
 50}
 51
 52} // namespace WebCore
 53
 54#endif // ENABLE(MEDIA_STREAM)
0

Source/WebCore/Modules/mediastream/RTCRtpReceiver.h

 1/*
 2 * Copyright (C) 2015 Ericsson AB. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 *
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * 3. Neither the name of Ericsson nor the names of its contributors
 15 * may be used to endorse or promote products derived from this
 16 * software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#ifndef RTCRtpReceiver_h
 32#define RTCRtpReceiver_h
 33
 34#if ENABLE(MEDIA_STREAM)
 35
 36#include "RTCRtpSenderReceiverBase.h"
 37
 38namespace WebCore {
 39
 40class RTCRtpReceiver : public RTCRtpSenderReceiverBase {
 41public:
 42 static Ref<RTCRtpReceiver> create(RefPtr<MediaStreamTrack>&&);
 43 virtual ~RTCRtpReceiver();
 44
 45private:
 46 RTCRtpReceiver(RefPtr<MediaStreamTrack>&&);
 47};
 48
 49} // namespace WebCore
 50
 51#endif // ENABLE(MEDIA_STREAM)
 52
 53#endif // RTCRtpReceiver_h
0

Source/WebCore/Modules/mediastream/RTCRtpReceiver.idl

 1/*
 2 * Copyright (C) 2015 Ericsson AB. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 *
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * 3. Neither the name of Ericsson nor the names of its contributors
 15 * may be used to endorse or promote products derived from this
 16 * software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31[
 32 Conditional=MEDIA_STREAM
 33] interface RTCRtpReceiver {
 34 readonly attribute MediaStreamTrack track;
 35};
0

Source/WebCore/Modules/mediastream/RTCRtpSender.cpp

 1/*
 2 * Copyright (C) 2015 Ericsson AB. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 *
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * 3. Neither the name of Ericsson nor the names of its contributors
 15 * may be used to endorse or promote products derived from this
 16 * software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#include "config.h"
 32#include "RTCRtpSender.h"
 33
 34#if ENABLE(MEDIA_STREAM)
 35
 36namespace WebCore {
 37
 38Ref<RTCRtpSender> RTCRtpSender::create(RefPtr<MediaStreamTrack>&& track, const String& mediaStreamId)
 39{
 40 return adoptRef(*new RTCRtpSender(WTF::move(track), mediaStreamId));
 41}
 42
 43RTCRtpSender::RTCRtpSender(RefPtr<MediaStreamTrack>&& track, const String& mediaStreamId)
 44 : RTCRtpSenderReceiverBase(WTF::move(track))
 45 , m_mediaStreamId(mediaStreamId)
 46{
 47}
 48
 49RTCRtpSender::~RTCRtpSender()
 50{
 51}
 52
 53} // namespace WebCore
 54
 55#endif // ENABLE(MEDIA_STREAM)
0

Source/WebCore/Modules/mediastream/RTCRtpSender.h

 1/*
 2 * Copyright (C) 2015 Ericsson AB. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 *
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * 3. Neither the name of Ericsson nor the names of its contributors
 15 * may be used to endorse or promote products derived from this
 16 * software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#ifndef RTCRtpSender_h
 32#define RTCRtpSender_h
 33
 34#if ENABLE(MEDIA_STREAM)
 35
 36#include "RTCRtpSenderReceiverBase.h"
 37#include <wtf/text/WTFString.h>
 38
 39namespace WebCore {
 40
 41class RTCRtpSender : public RTCRtpSenderReceiverBase {
 42public:
 43 static Ref<RTCRtpSender> create(RefPtr<MediaStreamTrack>&&, const String& mediaStreamId);
 44 virtual ~RTCRtpSender();
 45
 46 const String& mediaStreamId() const { return m_mediaStreamId; }
 47
 48private:
 49 RTCRtpSender(RefPtr<MediaStreamTrack>&&, const String& mediaStreamId);
 50
 51 String m_mediaStreamId;
 52};
 53
 54} // namespace WebCore
 55
 56#endif // ENABLE(MEDIA_STREAM)
 57
 58#endif // RTCRtpSender_h
0

Source/WebCore/Modules/mediastream/RTCRtpSender.idl

 1/*
 2 * Copyright (C) 2015 Ericsson AB. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 *
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * 3. Neither the name of Ericsson nor the names of its contributors
 15 * may be used to endorse or promote products derived from this
 16 * software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31[
 32 Conditional=MEDIA_STREAM
 33] interface RTCRtpSender {
 34 readonly attribute MediaStreamTrack track;
 35};
0

Source/WebCore/Modules/mediastream/RTCRtpSenderReceiverBase.cpp

 1/*
 2 * Copyright (C) 2015 Ericsson AB. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 *
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * 3. Neither the name of Ericsson nor the names of its contributors
 15 * may be used to endorse or promote products derived from this
 16 * software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#include "config.h"
 32#include "RTCRtpSenderReceiverBase.h"
 33
 34#if ENABLE(MEDIA_STREAM)
 35
 36#include "MediaStreamTrack.h"
 37
 38namespace WebCore {
 39
 40RTCRtpSenderReceiverBase::RTCRtpSenderReceiverBase(RefPtr<MediaStreamTrack>&& track)
 41 : m_track(track)
 42{
 43}
 44
 45RTCRtpSenderReceiverBase::~RTCRtpSenderReceiverBase()
 46{
 47}
 48
 49MediaStreamTrack* RTCRtpSenderReceiverBase::track() const
 50{
 51 return m_track.get();
 52}
 53
 54} // namespace WebCore
 55
 56#endif // ENABLE(MEDIA_STREAM)
0

Source/WebCore/Modules/mediastream/RTCRtpSenderReceiverBase.h

 1/*
 2 * Copyright (C) 2015 Ericsson AB. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 *
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * 3. Neither the name of Ericsson nor the names of its contributors
 15 * may be used to endorse or promote products derived from this
 16 * software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#ifndef RTCRtpSenderReceiverBase_h
 32#define RTCRtpSenderReceiverBase_h
 33
 34#if ENABLE(MEDIA_STREAM)
 35
 36#include "ScriptWrappable.h"
 37#include <wtf/RefCounted.h>
 38#include <wtf/RefPtr.h>
 39
 40namespace WebCore {
 41
 42class MediaStreamTrack;
 43
 44class RTCRtpSenderReceiverBase : public RefCounted<RTCRtpSenderReceiverBase>, public ScriptWrappable {
 45public:
 46 virtual ~RTCRtpSenderReceiverBase();
 47
 48 MediaStreamTrack* track() const;
 49
 50protected:
 51 RTCRtpSenderReceiverBase(RefPtr<MediaStreamTrack>&&);
 52
 53 RefPtr<MediaStreamTrack> m_track;
 54};
 55
 56} // namespace WebCore
 57
 58#endif // ENABLE(MEDIA_STREAM)
 59
 60#endif // RTCRtpSenderReceiverBase_h
0

Source/WebCore/Modules/mediastream/RTCSessionDescription.cpp

3232#include "config.h"
3333
3434#if ENABLE(MEDIA_STREAM)
35 
3635#include "RTCSessionDescription.h"
3736
3837#include "Dictionary.h"
3938#include "ExceptionCode.h"
40 #include "RTCSessionDescriptionDescriptor.h"
4139
4240namespace WebCore {
4341

@@RefPtr<RTCSessionDescription> RTCSession
6260 return nullptr;
6361 }
6462
65  return adoptRef(*new RTCSessionDescription(RTCSessionDescriptionDescriptor::create(type, sdp)));
 63 return adoptRef(new RTCSessionDescription(type, sdp));
 64}
 65
 66Ref<RTCSessionDescription> RTCSessionDescription::create(const RTCSessionDescription* description)
 67{
 68 return adoptRef(*new RTCSessionDescription(description->type(), description->sdp()));
6669}
6770
68 RefPtr<RTCSessionDescription> RTCSessionDescription::create(PassRefPtr<RTCSessionDescriptionDescriptor> descriptor)
 71Ref<RTCSessionDescription> RTCSessionDescription::create(const String& type, const String& sdp)
6972{
70  ASSERT(descriptor);
71  return adoptRef(*new RTCSessionDescription(descriptor));
 73 return adoptRef(*new RTCSessionDescription(type, sdp));
7274}
7375
74 RTCSessionDescription::RTCSessionDescription(PassRefPtr<RTCSessionDescriptionDescriptor> descriptor)
75  : m_descriptor(descriptor)
 76RTCSessionDescription::RTCSessionDescription(const String& type, const String& sdp)
 77 : m_type(type)
 78 , m_sdp(sdp)
7679{
7780}
7881

@@RTCSessionDescription::~RTCSessionDescri
8285
8386const String& RTCSessionDescription::type() const
8487{
85  return m_descriptor->type();
 88 return m_type;
8689}
8790
8891void RTCSessionDescription::setType(const String& type, ExceptionCode& ec)
8992{
9093 if (verifyType(type))
91  m_descriptor->setType(type);
 94 m_type = type;
9295 else
9396 ec = TYPE_MISMATCH_ERR;
9497}
9598
9699const String& RTCSessionDescription::sdp() const
97100{
98  return m_descriptor->sdp();
 101 return m_sdp;
99102}
100103
101104void RTCSessionDescription::setSdp(const String& sdp)
102105{
103  m_descriptor->setSdp(sdp);
104 }
105 
106 RTCSessionDescriptionDescriptor* RTCSessionDescription::descriptor()
107 {
108  return m_descriptor.get();
 106 m_sdp = sdp;
109107}
110108
111109} // namespace WebCore
191695

Source/WebCore/Modules/mediastream/RTCSessionDescription.h

3535
3636#include "ExceptionBase.h"
3737#include "ScriptWrappable.h"
38 #include <wtf/PassRefPtr.h>
3938#include <wtf/RefCounted.h>
 39#include <wtf/RefPtr.h>
4040#include <wtf/text/WTFString.h>
4141
4242namespace WebCore {
4343
4444class Dictionary;
45 class RTCSessionDescriptionDescriptor;
4645
4746class RTCSessionDescription : public RefCounted<RTCSessionDescription>, public ScriptWrappable {
4847public:
4948 static RefPtr<RTCSessionDescription> create(const Dictionary&, ExceptionCode&);
50  static RefPtr<RTCSessionDescription> create(PassRefPtr<RTCSessionDescriptionDescriptor>);
 49 static Ref<RTCSessionDescription> create(const RTCSessionDescription*);
 50 static Ref<RTCSessionDescription> create(const String& type, const String& sdp);
5151 virtual ~RTCSessionDescription();
5252
5353 const String& type() const;

@@public:
5656 const String& sdp() const;
5757 void setSdp(const String&);
5858
59  RTCSessionDescriptionDescriptor* descriptor();
60 
6159private:
62  explicit RTCSessionDescription(PassRefPtr<RTCSessionDescriptionDescriptor>);
 60 explicit RTCSessionDescription(const String& type, const String& sdp);
6361
64  RefPtr<RTCSessionDescriptionDescriptor> m_descriptor;
 62 String m_type;
 63 String m_sdp;
6564};
6665
6766} // namespace WebCore
191695

Source/WebCore/Modules/mediastream/RTCSessionDescriptionCallback.h

1 /*
2  * Copyright (C) 2012 Google Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer
12  * in the documentation and/or other materials provided with the
13  * distribution.
14  * 3. Neither the name of Google Inc. nor the names of its contributors
15  * may be used to endorse or promote products derived from this
16  * software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30 
31 #ifndef RTCSessionDescriptionCallback_h
32 #define RTCSessionDescriptionCallback_h
33 
34 #if ENABLE(MEDIA_STREAM)
35 
36 #include <wtf/RefCounted.h>
37 
38 namespace WebCore {
39 
40 class RTCSessionDescription;
41 
42 class RTCSessionDescriptionCallback : public RefCounted<RTCSessionDescriptionCallback> {
43 public:
44  virtual ~RTCSessionDescriptionCallback() { }
45  virtual bool handleEvent(RTCSessionDescription*) = 0;
46 };
47 
48 } // namespace WebCore
49 
50 #endif // ENABLE(MEDIA_STREAM)
51 
52 #endif // RTCSessionDescriptionCallback_h
191695

Source/WebCore/Modules/mediastream/RTCSessionDescriptionCallback.idl

1 /*
2  * Copyright (C) 2012 Google Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer
12  * in the documentation and/or other materials provided with the
13  * distribution.
14  * 3. Neither the name of Google Inc. nor the names of its contributors
15  * may be used to endorse or promote products derived from this
16  * software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30 
31 [
32  Conditional=MEDIA_STREAM,
33  Callback=FunctionOnly,
34 ] callback interface RTCSessionDescriptionCallback {
35  boolean handleEvent(RTCSessionDescription sdp);
36 };
37 
191695

Source/WebCore/Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp

1 /*
2  * Copyright (C) 2012 Google Inc. All rights reserved.
3  * Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * 1. Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer
13  * in the documentation and/or other materials provided with the
14  * distribution.
15  * 3. Neither the name of Google Inc. nor the names of its contributors
16  * may be used to endorse or promote products derived from this
17  * software without specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30  */
31 
32 #include "config.h"
33 
34 #if ENABLE(MEDIA_STREAM)
35 
36 #include "RTCSessionDescriptionRequestImpl.h"
37 
38 #include "RTCPeerConnection.h"
39 #include "RTCPeerConnectionErrorCallback.h"
40 #include "RTCSessionDescription.h"
41 #include "RTCSessionDescriptionCallback.h"
42 #include "RTCSessionDescriptionDescriptor.h"
43 
44 namespace WebCore {
45 
46 Ref<RTCSessionDescriptionRequestImpl> RTCSessionDescriptionRequestImpl::create(ScriptExecutionContext* context, PassRefPtr<RTCSessionDescriptionCallback> successCallback, PassRefPtr<RTCPeerConnectionErrorCallback> errorCallback)
47 {
48  Ref<RTCSessionDescriptionRequestImpl> request = adoptRef(*new RTCSessionDescriptionRequestImpl(context, successCallback, errorCallback));
49  request->suspendIfNeeded();
50  return request;
51 }
52 
53 RTCSessionDescriptionRequestImpl::RTCSessionDescriptionRequestImpl(ScriptExecutionContext* context, PassRefPtr<RTCSessionDescriptionCallback> successCallback, PassRefPtr<RTCPeerConnectionErrorCallback> errorCallback)
54  : ActiveDOMObject(context)
55  , m_successCallback(successCallback)
56  , m_errorCallback(errorCallback)
57 {
58 }
59 
60 RTCSessionDescriptionRequestImpl::~RTCSessionDescriptionRequestImpl()
61 {
62 }
63 
64 void RTCSessionDescriptionRequestImpl::requestSucceeded(PassRefPtr<RTCSessionDescriptionDescriptor> descriptor)
65 {
66  if (m_successCallback) {
67  RefPtr<RTCSessionDescription> sessionDescription = RTCSessionDescription::create(descriptor);
68  m_successCallback->handleEvent(sessionDescription.get());
69  }
70 
71  clear();
72 }
73 
74 void RTCSessionDescriptionRequestImpl::requestFailed(const String& error)
75 {
76  if (m_errorCallback)
77  m_errorCallback->handleEvent(DOMError::create(error).ptr());
78 
79  clear();
80 }
81 
82 void RTCSessionDescriptionRequestImpl::stop()
83 {
84  clear();
85 }
86 
87 const char* RTCSessionDescriptionRequestImpl::activeDOMObjectName() const
88 {
89  return "RTCSessionDescriptionRequestImpl";
90 }
91 
92 bool RTCSessionDescriptionRequestImpl::canSuspendForPageCache() const
93 {
94  // FIXME: We should try and do better here.
95  return false;
96 }
97 
98 void RTCSessionDescriptionRequestImpl::clear()
99 {
100  m_successCallback = nullptr;
101  m_errorCallback = nullptr;
102 }
103 
104 } // namespace WebCore
105 
106 #endif // ENABLE(MEDIA_STREAM)
191695

Source/WebCore/Modules/mediastream/RTCSessionDescriptionRequestImpl.h

1 /*
2  * Copyright (C) 2012 Google Inc. All rights reserved.
3  * Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * 1. Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer
13  * in the documentation and/or other materials provided with the
14  * distribution.
15  * 3. Neither the name of Google Inc. nor the names of its contributors
16  * may be used to endorse or promote products derived from this
17  * software without specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30  */
31 
32 #ifndef RTCSessionDescriptionRequestImpl_h
33 #define RTCSessionDescriptionRequestImpl_h
34 
35 #if ENABLE(MEDIA_STREAM)
36 
37 #include "ActiveDOMObject.h"
38 #include "RTCSessionDescriptionRequest.h"
39 
40 namespace WebCore {
41 
42 class RTCPeerConnectionErrorCallback;
43 class RTCPeerConnection;
44 class RTCSessionDescriptionCallback;
45 
46 class RTCSessionDescriptionRequestImpl : public RTCSessionDescriptionRequest, public ActiveDOMObject {
47 public:
48  static Ref<RTCSessionDescriptionRequestImpl> create(ScriptExecutionContext*, PassRefPtr<RTCSessionDescriptionCallback>, PassRefPtr<RTCPeerConnectionErrorCallback>);
49  virtual ~RTCSessionDescriptionRequestImpl();
50 
51  virtual void requestSucceeded(PassRefPtr<RTCSessionDescriptionDescriptor>) override;
52  virtual void requestFailed(const String& error) override;
53 
54 private:
55  RTCSessionDescriptionRequestImpl(ScriptExecutionContext*, PassRefPtr<RTCSessionDescriptionCallback>, PassRefPtr<RTCPeerConnectionErrorCallback>);
56 
57  // ActiveDOMObject API.
58  void stop() override;
59  const char* activeDOMObjectName() const override;
60  bool canSuspendForPageCache() const override;
61 
62  void clear();
63 
64  RefPtr<RTCSessionDescriptionCallback> m_successCallback;
65  RefPtr<RTCPeerConnectionErrorCallback> m_errorCallback;
66 };
67 
68 } // namespace WebCore
69 
70 #endif // ENABLE(MEDIA_STREAM)
71 
72 #endif // RTCSessionDescriptionRequestImpl_h
73 
74 
191695

Source/WebCore/Modules/mediastream/RTCStatsCallback.h

1 /*
2  * Copyright (C) 2012 Google Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
14  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16  * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
17  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20  * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23  */
24 
25 #ifndef RTCStatsCallback_h
26 #define RTCStatsCallback_h
27 
28 #if ENABLE(MEDIA_STREAM)
29 
30 #include <wtf/RefCounted.h>
31 
32 namespace WebCore {
33 
34 class RTCStatsResponse;
35 
36 class RTCStatsCallback : public RefCounted<RTCStatsCallback> {
37 public:
38  virtual ~RTCStatsCallback() { }
39  virtual bool handleEvent(RTCStatsResponse*) = 0;
40 };
41 
42 } // namespace WebCore
43 
44 #endif // ENABLE(MEDIA_STREAM)
45 
46 #endif // RTCStatsCallback_h
191695

Source/WebCore/Modules/mediastream/RTCStatsCallback.idl

1 /*
2  * Copyright (C) 2012 Google Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
14  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16  * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
17  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20  * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23  */
24 
25 [
26  Conditional=MEDIA_STREAM,
27  Callback=FunctionOnly,
28 ] callback interface RTCStatsCallback {
29  boolean handleEvent(RTCStatsResponse response);
30 };
31 
191695

Source/WebCore/Modules/mediastream/RTCStatsRequestImpl.cpp

1 /*
2  * Copyright (C) 2012 Google Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
14  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16  * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
17  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20  * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23  */
24 
25 #include "config.h"
26 
27 #if ENABLE(MEDIA_STREAM)
28 
29 #include "RTCStatsRequestImpl.h"
30 
31 #include "MediaStreamTrack.h"
32 #include "RTCPeerConnectionErrorCallback.h"
33 #include "RTCStatsCallback.h"
34 #include "RTCStatsRequest.h"
35 #include "RTCStatsResponse.h"
36 
37 namespace WebCore {
38 
39 Ref<RTCStatsRequestImpl> RTCStatsRequestImpl::create(ScriptExecutionContext* context, PassRefPtr<RTCStatsCallback> successCallback, PassRefPtr<RTCPeerConnectionErrorCallback> errorCallback, PassRefPtr<MediaStreamTrackPrivate> selector)
40 {
41  Ref<RTCStatsRequestImpl> request = adoptRef(*new RTCStatsRequestImpl(context, successCallback, errorCallback, selector));
42  request->suspendIfNeeded();
43  return request;
44 }
45 
46 RTCStatsRequestImpl::RTCStatsRequestImpl(ScriptExecutionContext* context, PassRefPtr<RTCStatsCallback> successCallback, PassRefPtr<RTCPeerConnectionErrorCallback> errorCallback, PassRefPtr<MediaStreamTrackPrivate> selector)
47  : ActiveDOMObject(context)
48  , m_successCallback(successCallback)
49  , m_errorCallback(errorCallback)
50  , m_track(selector)
51 {
52 }
53 
54 RTCStatsRequestImpl::~RTCStatsRequestImpl()
55 {
56 }
57 
58 PassRefPtr<RTCStatsResponseBase> RTCStatsRequestImpl::createResponse()
59 {
60  return RTCStatsResponse::create();
61 }
62 
63 bool RTCStatsRequestImpl::hasSelector()
64 {
65  return m_track;
66 }
67 
68 MediaStreamTrackPrivate* RTCStatsRequestImpl::track()
69 {
70  return m_track.get();
71 }
72 
73 void RTCStatsRequestImpl::requestSucceeded(PassRefPtr<RTCStatsResponseBase> response)
74 {
75  if (!m_successCallback)
76  return;
77  m_successCallback->handleEvent(static_cast<RTCStatsResponse*>(response.get()));
78  clear();
79 }
80 
81 void RTCStatsRequestImpl::requestFailed(const String& error)
82 {
83  if (m_errorCallback)
84  m_errorCallback->handleEvent(DOMError::create(error).ptr());
85 
86  clear();
87 }
88 
89 void RTCStatsRequestImpl::stop()
90 {
91  clear();
92 }
93 
94 const char* RTCStatsRequestImpl::activeDOMObjectName() const
95 {
96  return "RTCStatsRequestImpl";
97 }
98 
99 bool RTCStatsRequestImpl::canSuspendForPageCache() const
100 {
101  // FIXME: We should try and do better here.
102  return false;
103 }
104 
105 void RTCStatsRequestImpl::clear()
106 {
107  m_successCallback = nullptr;
108 }
109 
110 
111 } // namespace WebCore
112 
113 #endif // ENABLE(MEDIA_STREAM)
191695

Source/WebCore/Modules/mediastream/RTCStatsRequestImpl.h

1 /*
2  * Copyright (C) 2012 Google Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
14  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16  * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
17  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20  * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23  */
24 
25 #ifndef RTCStatsRequestImpl_h
26 #define RTCStatsRequestImpl_h
27 
28 #if ENABLE(MEDIA_STREAM)
29 
30 #include "ActiveDOMObject.h"
31 #include "RTCStatsRequest.h"
32 #include "RTCStatsResponse.h"
33 #include <wtf/PassRefPtr.h>
34 #include <wtf/RefCounted.h>
35 #include <wtf/text/WTFString.h>
36 
37 namespace WebCore {
38 
39 class RTCStatsCallback;
40 class RTCPeerConnectionErrorCallback;
41 
42 class RTCStatsRequestImpl : public RTCStatsRequest, public ActiveDOMObject {
43 public:
44  static Ref<RTCStatsRequestImpl> create(ScriptExecutionContext*, PassRefPtr<RTCStatsCallback>, PassRefPtr<RTCPeerConnectionErrorCallback>, PassRefPtr<MediaStreamTrackPrivate>);
45  virtual ~RTCStatsRequestImpl();
46 
47  virtual PassRefPtr<RTCStatsResponseBase> createResponse() override;
48  virtual bool hasSelector() override;
49  virtual MediaStreamTrackPrivate* track() override;
50 
51  virtual void requestSucceeded(PassRefPtr<RTCStatsResponseBase>) override;
52  virtual void requestFailed(const String&) override;
53 
54 private:
55  RTCStatsRequestImpl(ScriptExecutionContext*, PassRefPtr<RTCStatsCallback>, PassRefPtr<RTCPeerConnectionErrorCallback>, PassRefPtr<MediaStreamTrackPrivate>);
56 
57  // ActiveDOMObject API.
58  void stop() override;
59  const char* activeDOMObjectName() const override;
60  bool canSuspendForPageCache() const override;
61 
62  void clear();
63 
64  RefPtr<RTCStatsCallback> m_successCallback;
65  RefPtr<RTCPeerConnectionErrorCallback> m_errorCallback;
66  RefPtr<MediaStreamTrackPrivate> m_track;
67 };
68 
69 } // namespace WebCore
70 
71 #endif // ENABLE(MEDIA_STREAM)
72 
73 #endif // RTCStatsRequestImpl_h
191695

Source/WebCore/Modules/mediastream/RTCTrackEvent.cpp

 1/*
 2 * Copyright (C) 2015 Ericsson AB. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 *
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * 3. Neither the name of Ericsson nor the names of its contributors
 15 * may be used to endorse or promote products derived from this
 16 * software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#include "config.h"
 32#include "RTCTrackEvent.h"
 33
 34#if ENABLE(MEDIA_STREAM)
 35
 36#include "EventNames.h"
 37#include "MediaStreamTrack.h"
 38#include "RTCRtpReceiver.h"
 39
 40namespace WebCore {
 41
 42RTCTrackEventInit::RTCTrackEventInit()
 43 : receiver(nullptr)
 44 , track(nullptr)
 45{
 46}
 47
 48Ref<RTCTrackEvent> RTCTrackEvent::create()
 49{
 50 return adoptRef(*new RTCTrackEvent);
 51}
 52
 53Ref<RTCTrackEvent> RTCTrackEvent::create(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<RTCRtpReceiver>&& receiver, RefPtr<MediaStreamTrack>&& track)
 54{
 55 return adoptRef(*new RTCTrackEvent(type, canBubble, cancelable, WTF::move(receiver), WTF::move(track)));
 56}
 57
 58Ref<RTCTrackEvent> RTCTrackEvent::create(const AtomicString& type, const RTCTrackEventInit& initializer)
 59{
 60 return adoptRef(*new RTCTrackEvent(type, initializer));
 61}
 62
 63RTCTrackEvent::RTCTrackEvent()
 64{
 65}
 66
 67RTCTrackEvent::RTCTrackEvent(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<RTCRtpReceiver>&& receiver, RefPtr<MediaStreamTrack>&& track)
 68 : Event(type, canBubble, cancelable)
 69 , m_receiver(receiver)
 70 , m_track(track)
 71{
 72}
 73
 74RTCTrackEvent::RTCTrackEvent(const AtomicString& type, const RTCTrackEventInit& initializer)
 75 : Event(type, initializer)
 76 , m_receiver(initializer.receiver)
 77 , m_track(initializer.track)
 78{
 79}
 80
 81RTCTrackEvent::~RTCTrackEvent()
 82{
 83}
 84
 85} // namespace WebCore
 86
 87#endif // ENABLE(MEDIA_STREAM)
0

Source/WebCore/Modules/mediastream/RTCTrackEvent.h

 1/*
 2 * Copyright (C) 2015 Ericsson AB. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 *
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * 3. Neither the name of Ericsson nor the names of its contributors
 15 * may be used to endorse or promote products derived from this
 16 * software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#ifndef RTCTrackEvent_h
 32#define RTCTrackEvent_h
 33
 34#if ENABLE(MEDIA_STREAM)
 35
 36#include "Event.h"
 37// #include "MediaStreamTrack.h"
 38#include <wtf/text/AtomicString.h>
 39
 40namespace WebCore {
 41
 42class MediaStreamTrack;
 43class RTCRtpReceiver;
 44
 45struct RTCTrackEventInit : public EventInit {
 46 RTCTrackEventInit();
 47
 48 RefPtr<RTCRtpReceiver> receiver;
 49 RefPtr<MediaStreamTrack> track;
 50};
 51
 52class RTCTrackEvent : public Event {
 53public:
 54 virtual ~RTCTrackEvent();
 55
 56 static Ref<RTCTrackEvent> create();
 57 static Ref<RTCTrackEvent> create(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<RTCRtpReceiver>&&, RefPtr<MediaStreamTrack>&&);
 58 static Ref<RTCTrackEvent> create(const AtomicString& type, const RTCTrackEventInit&);
 59
 60 RTCRtpReceiver* receiver() const { return m_receiver.get(); }
 61 MediaStreamTrack* track() const { return m_track.get(); }
 62
 63 virtual EventInterface eventInterface() const { return RTCTrackEventInterfaceType; }
 64
 65private:
 66 RTCTrackEvent();
 67 RTCTrackEvent(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<RTCRtpReceiver>&&, RefPtr<MediaStreamTrack>&&);
 68 RTCTrackEvent(const AtomicString& type, const RTCTrackEventInit&);
 69
 70 RefPtr<RTCRtpReceiver> m_receiver;
 71 RefPtr<MediaStreamTrack> m_track;
 72};
 73
 74} // namespace WebCore
 75
 76#endif // ENABLE(MEDIA_STREAM)
 77
 78#endif // RTCTrackEvent_h
0

Source/WebCore/Modules/mediastream/RTCTrackEvent.idl

 1/*
 2 * Copyright (C) 2015 Ericsson AB. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 *
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * 3. Neither the name of Ericsson nor the names of its contributors
 15 * may be used to endorse or promote products derived from this
 16 * software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31[
 32 Conditional=MEDIA_STREAM,
 33 ConstructorTemplate=Event
 34] interface RTCTrackEvent : Event {
 35 [InitializedByEventConstructor] readonly attribute RTCRtpReceiver receiver;
 36 [InitializedByEventConstructor] readonly attribute MediaStreamTrack track;
 37};
0

Source/WebCore/Modules/mediastream/RTCVoidRequestImpl.cpp

1 /*
2  * Copyright (C) 2012 Google Inc. All rights reserved.
3  * Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * 1. Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer
13  * in the documentation and/or other materials provided with the
14  * distribution.
15  * 3. Neither the name of Google Inc. nor the names of its contributors
16  * may be used to endorse or promote products derived from this
17  * software without specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30  */
31 
32 #include "config.h"
33 
34 #if ENABLE(MEDIA_STREAM)
35 
36 #include "RTCVoidRequestImpl.h"
37 
38 #include "DOMError.h"
39 #include "RTCPeerConnection.h"
40 #include "RTCPeerConnectionErrorCallback.h"
41 #include "VoidCallback.h"
42 
43 namespace WebCore {
44 
45 Ref<RTCVoidRequestImpl> RTCVoidRequestImpl::create(ScriptExecutionContext* context, PassRefPtr<VoidCallback> successCallback, PassRefPtr<RTCPeerConnectionErrorCallback> errorCallback)
46 {
47  Ref<RTCVoidRequestImpl> request = adoptRef(*new RTCVoidRequestImpl(context, successCallback, errorCallback));
48  request->suspendIfNeeded();
49  return request;
50 }
51 
52 RTCVoidRequestImpl::RTCVoidRequestImpl(ScriptExecutionContext* context, PassRefPtr<VoidCallback> successCallback, PassRefPtr<RTCPeerConnectionErrorCallback> errorCallback)
53  : ActiveDOMObject(context)
54  , m_successCallback(successCallback)
55  , m_errorCallback(errorCallback)
56 {
57 }
58 
59 RTCVoidRequestImpl::~RTCVoidRequestImpl()
60 {
61 }
62 
63 void RTCVoidRequestImpl::requestSucceeded()
64 {
65  if (m_successCallback)
66  m_successCallback->handleEvent();
67 
68  clear();
69 }
70 
71 void RTCVoidRequestImpl::requestFailed(const String& error)
72 {
73  if (m_errorCallback.get())
74  m_errorCallback->handleEvent(DOMError::create(error).ptr());
75 
76  clear();
77 }
78 
79 void RTCVoidRequestImpl::stop()
80 {
81  clear();
82 }
83 
84 const char* RTCVoidRequestImpl::activeDOMObjectName() const
85 {
86  return "RTCVoidRequestImpl";
87 }
88 
89 bool RTCVoidRequestImpl::canSuspendForPageCache() const
90 {
91  // FIXME: We should try and do better here.
92  return false;
93 }
94 
95 void RTCVoidRequestImpl::clear()
96 {
97  m_successCallback = nullptr;
98  m_errorCallback = nullptr;
99 }
100 
101 } // namespace WebCore
102 
103 #endif // ENABLE(MEDIA_STREAM)
191695

Source/WebCore/Modules/mediastream/RTCVoidRequestImpl.h

1 /*
2  * Copyright (C) 2012 Google Inc. All rights reserved.
3  * Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * 1. Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer
13  * in the documentation and/or other materials provided with the
14  * distribution.
15  * 3. Neither the name of Google Inc. nor the names of its contributors
16  * may be used to endorse or promote products derived from this
17  * software without specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30  */
31 
32 #ifndef RTCVoidRequestImpl_h
33 #define RTCVoidRequestImpl_h
34 
35 #if ENABLE(MEDIA_STREAM)
36 
37 #include "ActiveDOMObject.h"
38 #include "RTCVoidRequest.h"
39 
40 namespace WebCore {
41 
42 class RTCPeerConnectionErrorCallback;
43 class VoidCallback;
44 
45 class RTCVoidRequestImpl : public RTCVoidRequest, public ActiveDOMObject {
46 public:
47  static Ref<RTCVoidRequestImpl> create(ScriptExecutionContext*, PassRefPtr<VoidCallback>, PassRefPtr<RTCPeerConnectionErrorCallback>);
48  virtual ~RTCVoidRequestImpl();
49 
50  virtual void requestSucceeded() override;
51  virtual void requestFailed(const String& error) override;
52 
53 private:
54  RTCVoidRequestImpl(ScriptExecutionContext*, PassRefPtr<VoidCallback>, PassRefPtr<RTCPeerConnectionErrorCallback>);
55 
56  void clear();
57 
58  // ActiveDOMObject
59  void stop() override;
60  const char* activeDOMObjectName() const override;
61  bool canSuspendForPageCache() const override;
62 
63  RefPtr<VoidCallback> m_successCallback;
64  RefPtr<RTCPeerConnectionErrorCallback> m_errorCallback;
65 };
66 
67 } // namespace WebCore
68 
69 #endif // ENABLE(MEDIA_STREAM)
70 
71 #endif // RTCVoidRequestImpl_h
72 
73 
191695

Source/WebCore/WebCore.xcodeproj/project.pbxproj

226226 078E090A17D14CEE00420AA1 /* RTCIceCandidateEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07221B7417CEC32700848E51 /* RTCIceCandidateEvent.cpp */; };
227227 078E090B17D14CEE00420AA1 /* RTCPeerConnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07221B7717CEC32700848E51 /* RTCPeerConnection.cpp */; };
228228 078E090C17D14CEE00420AA1 /* RTCSessionDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07221B7A17CEC32700848E51 /* RTCSessionDescription.cpp */; };
229  078E090D17D14CEE00420AA1 /* RTCSessionDescriptionRequestImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07221B7F17CEC32700848E51 /* RTCSessionDescriptionRequestImpl.cpp */; };
230229 078E090E17D14CEE00420AA1 /* RTCStatsReport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07221B8317CEC32700848E51 /* RTCStatsReport.cpp */; };
231  078E090F17D14CEE00420AA1 /* RTCStatsRequestImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07221B8617CEC32700848E51 /* RTCStatsRequestImpl.cpp */; };
232230 078E091017D14CEE00420AA1 /* RTCStatsResponse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07221B8817CEC32700848E51 /* RTCStatsResponse.cpp */; };
233  078E091117D14CEE00420AA1 /* RTCVoidRequestImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07221B8B17CEC32700848E51 /* RTCVoidRequestImpl.cpp */; };
234231 078E091217D14CEE00420AA1 /* UserMediaController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07221B8E17CEC32700848E51 /* UserMediaController.cpp */; };
235232 078E091317D14CEE00420AA1 /* UserMediaRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07221B9017CEC32700848E51 /* UserMediaRequest.cpp */; };
236233 078E091417D14D1C00420AA1 /* MediaConstraintsImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B4B17CEC32700848E51 /* MediaConstraintsImpl.h */; settings = {ATTRIBUTES = (Private, ); }; };

250247 078E092417D14D1C00420AA1 /* RTCIceCandidateEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B7517CEC32700848E51 /* RTCIceCandidateEvent.h */; settings = {ATTRIBUTES = (Private, ); }; };
251248 078E092517D14D1C00420AA1 /* RTCPeerConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B7817CEC32700848E51 /* RTCPeerConnection.h */; };
252249 078E092617D14D1C00420AA1 /* RTCSessionDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B7B17CEC32700848E51 /* RTCSessionDescription.h */; settings = {ATTRIBUTES = (Private, ); }; };
253  078E092717D14D1C00420AA1 /* RTCSessionDescriptionCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B7D17CEC32700848E51 /* RTCSessionDescriptionCallback.h */; settings = {ATTRIBUTES = (Private, ); }; };
254  078E092817D14D1C00420AA1 /* RTCSessionDescriptionRequestImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B8017CEC32700848E51 /* RTCSessionDescriptionRequestImpl.h */; settings = {ATTRIBUTES = (Private, ); }; };
255  078E092917D14D1C00420AA1 /* RTCStatsCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B8117CEC32700848E51 /* RTCStatsCallback.h */; settings = {ATTRIBUTES = (Private, ); }; };
256250 078E092A17D14D1C00420AA1 /* RTCStatsReport.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B8417CEC32700848E51 /* RTCStatsReport.h */; settings = {ATTRIBUTES = (Private, ); }; };
257  078E092B17D14D1C00420AA1 /* RTCStatsRequestImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B8717CEC32700848E51 /* RTCStatsRequestImpl.h */; };
258251 078E092C17D14D1C00420AA1 /* RTCStatsResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B8917CEC32700848E51 /* RTCStatsResponse.h */; };
259  078E092D17D14D1C00420AA1 /* RTCVoidRequestImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B8C17CEC32700848E51 /* RTCVoidRequestImpl.h */; settings = {ATTRIBUTES = (Private, ); }; };
260252 078E092E17D14D1C00420AA1 /* UserMediaClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B8D17CEC32700848E51 /* UserMediaClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
261253 078E092F17D14D1C00420AA1 /* UserMediaController.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B8F17CEC32700848E51 /* UserMediaController.h */; settings = {ATTRIBUTES = (Private, ); }; };
262254 078E093017D14D1C00420AA1 /* UserMediaRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B9117CEC32700848E51 /* UserMediaRequest.h */; settings = {ATTRIBUTES = (Private, ); }; };

293285 07969DB017D14151007FF842 /* JSRTCDTMFSender.h in Headers */ = {isa = PBXBuildFile; fileRef = 07969D9617D14151007FF842 /* JSRTCDTMFSender.h */; };
294286 07969DB117D14151007FF842 /* JSRTCDTMFToneChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07969D9717D14151007FF842 /* JSRTCDTMFToneChangeEvent.cpp */; };
295287 07969DB217D14151007FF842 /* JSRTCDTMFToneChangeEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 07969D9817D14151007FF842 /* JSRTCDTMFToneChangeEvent.h */; };
296  07969DB317D14151007FF842 /* JSRTCPeerConnectionErrorCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07969D9917D14151007FF842 /* JSRTCPeerConnectionErrorCallback.cpp */; };
297  07969DB417D14151007FF842 /* JSRTCPeerConnectionErrorCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 07969D9A17D14151007FF842 /* JSRTCPeerConnectionErrorCallback.h */; };
298288 07969DB517D14151007FF842 /* JSRTCIceCandidate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07969D9B17D14151007FF842 /* JSRTCIceCandidate.cpp */; };
299289 07969DB617D14151007FF842 /* JSRTCIceCandidate.h in Headers */ = {isa = PBXBuildFile; fileRef = 07969D9C17D14151007FF842 /* JSRTCIceCandidate.h */; };
300290 07969DB717D14151007FF842 /* JSRTCIceCandidateEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07969D9D17D14151007FF842 /* JSRTCIceCandidateEvent.cpp */; };

303293 07969DBA17D14151007FF842 /* JSRTCPeerConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 07969DA017D14151007FF842 /* JSRTCPeerConnection.h */; };
304294 07969DBB17D14151007FF842 /* JSRTCSessionDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07969DA117D14151007FF842 /* JSRTCSessionDescription.cpp */; };
305295 07969DBC17D14151007FF842 /* JSRTCSessionDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 07969DA217D14151007FF842 /* JSRTCSessionDescription.h */; };
306  07969DBD17D14151007FF842 /* JSRTCSessionDescriptionCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07969DA317D14151007FF842 /* JSRTCSessionDescriptionCallback.cpp */; };
307  07969DBE17D14151007FF842 /* JSRTCSessionDescriptionCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 07969DA417D14151007FF842 /* JSRTCSessionDescriptionCallback.h */; };
308  07969DBF17D14151007FF842 /* JSRTCStatsCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07969DA517D14151007FF842 /* JSRTCStatsCallback.cpp */; };
309  07969DC017D14151007FF842 /* JSRTCStatsCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 07969DA617D14151007FF842 /* JSRTCStatsCallback.h */; };
310296 07969DC117D14151007FF842 /* JSRTCStatsReport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07969DA717D14151007FF842 /* JSRTCStatsReport.cpp */; };
311297 07969DC217D14151007FF842 /* JSRTCStatsReport.h in Headers */ = {isa = PBXBuildFile; fileRef = 07969DA817D14151007FF842 /* JSRTCStatsReport.h */; };
312298 07969DC317D14151007FF842 /* JSRTCStatsResponse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07969DA917D14151007FF842 /* JSRTCStatsResponse.cpp */; };

23482334 5DFE8F560D16477B0076E937 /* ScheduledAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCA378BA0D15F64200B793D6 /* ScheduledAction.cpp */; };
23492335 5DFE8F570D16477C0076E937 /* ScheduledAction.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA378BB0D15F64200B793D6 /* ScheduledAction.h */; settings = {ATTRIBUTES = (Private, ); }; };
23502336 5DFEBAB718592B6D00C75BEB /* WebKitAvailability.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DFEBAB618592B6D00C75BEB /* WebKitAvailability.h */; settings = {ATTRIBUTES = (Private, ); }; };
 2337 5E2C43501BCEE2F60001E2BC /* PeerConnectionBackend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E2C434C1BCEE2E50001E2BC /* PeerConnectionBackend.cpp */; settings = {ASSET_TAGS = (); }; };
 2338 5E2C43511BCEE2F60001E2BC /* PeerConnectionBackend.h in Headers */ = {isa = PBXBuildFile; fileRef = 5E2C434D1BCEE2E50001E2BC /* PeerConnectionBackend.h */; settings = {ASSET_TAGS = (); }; };
 2339 5E2C43521BCEE2F60001E2BC /* PeerConnectionStates.h in Headers */ = {isa = PBXBuildFile; fileRef = 5E2C434E1BCEE2E50001E2BC /* PeerConnectionStates.h */; settings = {ASSET_TAGS = (); }; };
 2340 5E2C43531BCEE2F60001E2BC /* RTCConfiguration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E2C434F1BCEE2E50001E2BC /* RTCConfiguration.cpp */; settings = {ASSET_TAGS = (); }; };
 2341 5E2C435E1BCEE31E0001E2BC /* RTCRtpSenderReceiverBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E2C435C1BCEE30D0001E2BC /* RTCRtpSenderReceiverBase.cpp */; settings = {ASSET_TAGS = (); }; };
 2342 5E2C435F1BCEE31E0001E2BC /* RTCRtpSenderReceiverBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 5E2C435D1BCEE30D0001E2BC /* RTCRtpSenderReceiverBase.h */; settings = {ASSET_TAGS = (); }; };
 2343 5E2C43601BCEE3230001E2BC /* RTCRtpSender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E2C43591BCEE30D0001E2BC /* RTCRtpSender.cpp */; settings = {ASSET_TAGS = (); }; };
 2344 5E2C43611BCEE3230001E2BC /* RTCRtpSender.h in Headers */ = {isa = PBXBuildFile; fileRef = 5E2C435A1BCEE30D0001E2BC /* RTCRtpSender.h */; settings = {ASSET_TAGS = (); }; };
 2345 5E2C43621BCEE32B0001E2BC /* RTCRtpReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E2C43561BCEE30D0001E2BC /* RTCRtpReceiver.cpp */; settings = {ASSET_TAGS = (); }; };
 2346 5E2C43631BCEE32B0001E2BC /* RTCRtpReceiver.h in Headers */ = {isa = PBXBuildFile; fileRef = 5E2C43571BCEE30D0001E2BC /* RTCRtpReceiver.h */; settings = {ASSET_TAGS = (); }; };
 2347 5E2C43671BCEE3770001E2BC /* RTCTrackEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E2C43641BCEE3720001E2BC /* RTCTrackEvent.cpp */; settings = {ASSET_TAGS = (); }; };
 2348 5E2C43681BCEE3770001E2BC /* RTCTrackEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 5E2C43651BCEE3720001E2BC /* RTCTrackEvent.h */; settings = {ASSET_TAGS = (); }; };
 2349 5E2C436B1BCF071E0001E2BC /* JSRTCTrackEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E2C43691BCF05C80001E2BC /* JSRTCTrackEvent.cpp */; settings = {ASSET_TAGS = (); }; };
 2350 5E2C436C1BCF071E0001E2BC /* JSRTCTrackEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 5E2C436A1BCF05C80001E2BC /* JSRTCTrackEvent.h */; settings = {ASSET_TAGS = (); }; };
 2351 5E2C43711BCF0D750001E2BC /* JSRTCRtpReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E2C436D1BCF0D690001E2BC /* JSRTCRtpReceiver.cpp */; settings = {ASSET_TAGS = (); }; };
 2352 5E2C43721BCF0D750001E2BC /* JSRTCRtpReceiver.h in Headers */ = {isa = PBXBuildFile; fileRef = 5E2C436E1BCF0D690001E2BC /* JSRTCRtpReceiver.h */; settings = {ASSET_TAGS = (); }; };
 2353 5E2C43731BCF0D750001E2BC /* JSRTCRtpSender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E2C436F1BCF0D690001E2BC /* JSRTCRtpSender.cpp */; settings = {ASSET_TAGS = (); }; };
 2354 5E2C43741BCF0D750001E2BC /* JSRTCRtpSender.h in Headers */ = {isa = PBXBuildFile; fileRef = 5E2C43701BCF0D690001E2BC /* JSRTCRtpSender.h */; settings = {ASSET_TAGS = (); }; };
 2355 5E2C437B1BCF9A570001E2BC /* RTCPeerConnectionBuiltins.h in Headers */ = {isa = PBXBuildFile; fileRef = 5E2C43761BCF9A0B0001E2BC /* RTCPeerConnectionBuiltins.h */; settings = {ATTRIBUTES = (Private, ); }; };
 2356 5E2C437C1BCF9A840001E2BC /* RTCPeerConnectionInternalsBuiltins.h in Headers */ = {isa = PBXBuildFile; fileRef = 5E2C43791BCF9A0B0001E2BC /* RTCPeerConnectionInternalsBuiltins.h */; settings = {ATTRIBUTES = (Private, ); }; };
 2357 5E2C437D1BCF9A870001E2BC /* RTCPeerConnectionInternalsBuiltinsWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 5E2C437A1BCF9A0B0001E2BC /* RTCPeerConnectionInternalsBuiltinsWrapper.h */; settings = {ATTRIBUTES = (Private, ); }; };
23512358 5EA725D21ACABD4700EAD17B /* MediaDevices.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EA725CD1ACABCD900EAD17B /* MediaDevices.cpp */; };
23522359 5EA725D31ACABD4700EAD17B /* MediaDevices.h in Headers */ = {isa = PBXBuildFile; fileRef = 5EA725CE1ACABCD900EAD17B /* MediaDevices.h */; settings = {ATTRIBUTES = (Private, ); }; };
23532360 5EA725D51ACABD5700EAD17B /* NavigatorMediaDevices.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EA725CA1ACABCB500EAD17B /* NavigatorMediaDevices.cpp */; };

73867393 07221B7A17CEC32700848E51 /* RTCSessionDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RTCSessionDescription.cpp; sourceTree = "<group>"; };
73877394 07221B7B17CEC32700848E51 /* RTCSessionDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCSessionDescription.h; sourceTree = "<group>"; };
73887395 07221B7C17CEC32700848E51 /* RTCSessionDescription.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCSessionDescription.idl; sourceTree = "<group>"; };
7389  07221B7D17CEC32700848E51 /* RTCSessionDescriptionCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCSessionDescriptionCallback.h; sourceTree = "<group>"; };
7390  07221B7E17CEC32700848E51 /* RTCSessionDescriptionCallback.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCSessionDescriptionCallback.idl; sourceTree = "<group>"; };
7391  07221B7F17CEC32700848E51 /* RTCSessionDescriptionRequestImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RTCSessionDescriptionRequestImpl.cpp; sourceTree = "<group>"; };
7392  07221B8017CEC32700848E51 /* RTCSessionDescriptionRequestImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCSessionDescriptionRequestImpl.h; sourceTree = "<group>"; };
7393  07221B8117CEC32700848E51 /* RTCStatsCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCStatsCallback.h; sourceTree = "<group>"; };
7394  07221B8217CEC32700848E51 /* RTCStatsCallback.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCStatsCallback.idl; sourceTree = "<group>"; };
73957396 07221B8317CEC32700848E51 /* RTCStatsReport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RTCStatsReport.cpp; sourceTree = "<group>"; };
73967397 07221B8417CEC32700848E51 /* RTCStatsReport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCStatsReport.h; sourceTree = "<group>"; };
73977398 07221B8517CEC32700848E51 /* RTCStatsReport.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCStatsReport.idl; sourceTree = "<group>"; };
7398  07221B8617CEC32700848E51 /* RTCStatsRequestImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RTCStatsRequestImpl.cpp; sourceTree = "<group>"; };
7399  07221B8717CEC32700848E51 /* RTCStatsRequestImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCStatsRequestImpl.h; sourceTree = "<group>"; };
74007399 07221B8817CEC32700848E51 /* RTCStatsResponse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RTCStatsResponse.cpp; sourceTree = "<group>"; };
74017400 07221B8917CEC32700848E51 /* RTCStatsResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCStatsResponse.h; sourceTree = "<group>"; };
74027401 07221B8A17CEC32700848E51 /* RTCStatsResponse.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCStatsResponse.idl; sourceTree = "<group>"; };
7403  07221B8B17CEC32700848E51 /* RTCVoidRequestImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RTCVoidRequestImpl.cpp; sourceTree = "<group>"; };
7404  07221B8C17CEC32700848E51 /* RTCVoidRequestImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCVoidRequestImpl.h; sourceTree = "<group>"; };
74057402 07221B8D17CEC32700848E51 /* UserMediaClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserMediaClient.h; sourceTree = "<group>"; };
74067403 07221B8E17CEC32700848E51 /* UserMediaController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserMediaController.cpp; sourceTree = "<group>"; };
74077404 07221B8F17CEC32700848E51 /* UserMediaController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserMediaController.h; sourceTree = "<group>"; };

75327529 07969D9617D14151007FF842 /* JSRTCDTMFSender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRTCDTMFSender.h; sourceTree = "<group>"; };
75337530 07969D9717D14151007FF842 /* JSRTCDTMFToneChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCDTMFToneChangeEvent.cpp; sourceTree = "<group>"; };
75347531 07969D9817D14151007FF842 /* JSRTCDTMFToneChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRTCDTMFToneChangeEvent.h; sourceTree = "<group>"; };
7535  07969D9917D14151007FF842 /* JSRTCPeerConnectionErrorCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCPeerConnectionErrorCallback.cpp; sourceTree = "<group>"; };
7536  07969D9A17D14151007FF842 /* JSRTCPeerConnectionErrorCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRTCPeerConnectionErrorCallback.h; sourceTree = "<group>"; };
75377532 07969D9B17D14151007FF842 /* JSRTCIceCandidate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCIceCandidate.cpp; sourceTree = "<group>"; };
75387533 07969D9C17D14151007FF842 /* JSRTCIceCandidate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRTCIceCandidate.h; sourceTree = "<group>"; };
75397534 07969D9D17D14151007FF842 /* JSRTCIceCandidateEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCIceCandidateEvent.cpp; sourceTree = "<group>"; };

75427537 07969DA017D14151007FF842 /* JSRTCPeerConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRTCPeerConnection.h; sourceTree = "<group>"; };
75437538 07969DA117D14151007FF842 /* JSRTCSessionDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCSessionDescription.cpp; sourceTree = "<group>"; };
75447539 07969DA217D14151007FF842 /* JSRTCSessionDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRTCSessionDescription.h; sourceTree = "<group>"; };
7545  07969DA317D14151007FF842 /* JSRTCSessionDescriptionCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCSessionDescriptionCallback.cpp; sourceTree = "<group>"; };
7546  07969DA417D14151007FF842 /* JSRTCSessionDescriptionCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRTCSessionDescriptionCallback.h; sourceTree = "<group>"; };
7547  07969DA517D14151007FF842 /* JSRTCStatsCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCStatsCallback.cpp; sourceTree = "<group>"; };
7548  07969DA617D14151007FF842 /* JSRTCStatsCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRTCStatsCallback.h; sourceTree = "<group>"; };
75497540 07969DA717D14151007FF842 /* JSRTCStatsReport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCStatsReport.cpp; sourceTree = "<group>"; };
75507541 07969DA817D14151007FF842 /* JSRTCStatsReport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRTCStatsReport.h; sourceTree = "<group>"; };
75517542 07969DA917D14151007FF842 /* JSRTCStatsResponse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCStatsResponse.cpp; sourceTree = "<group>"; };

92449235 4A6E9FC513C17D570046A7F8 /* FontFeatureSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FontFeatureSettings.cpp; sourceTree = "<group>"; };
92459236 4A6E9FC613C17D570046A7F8 /* FontFeatureSettings.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; path = FontFeatureSettings.h; sourceTree = "<group>"; };
92469237 4A8C96EA0BE69032004EEFF0 /* FrameSelectionMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = FrameSelectionMac.mm; sourceTree = "<group>"; };
9247  4A9755351858ED9B00BD6D15 /* RTCPeerConnectionErrorCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCPeerConnectionErrorCallback.h; sourceTree = "<group>"; };
9248  4A9755361858ED9B00BD6D15 /* RTCPeerConnectionErrorCallback.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCPeerConnectionErrorCallback.idl; sourceTree = "<group>"; };
92499238 4A9CC81516BB9AC600EC645A /* CSSDefaultStyleSheets.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSDefaultStyleSheets.cpp; sourceTree = "<group>"; };
92509239 4A9CC81616BB9AC600EC645A /* CSSDefaultStyleSheets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSDefaultStyleSheets.h; sourceTree = "<group>"; };
92519240 4A9CC81E16BF9BB400EC645A /* InspectorCSSOMWrappers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorCSSOMWrappers.cpp; sourceTree = "<group>"; };

97669755 5DB1BC6810715A6400EFAA49 /* TransformSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TransformSource.h; sourceTree = "<group>"; };
97679756 5DB1BC6910715A6400EFAA49 /* TransformSourceLibxslt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TransformSourceLibxslt.cpp; sourceTree = "<group>"; };
97689757 5DFEBAB618592B6D00C75BEB /* WebKitAvailability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitAvailability.h; sourceTree = "<group>"; };
 9758 5E2C434C1BCEE2E50001E2BC /* PeerConnectionBackend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PeerConnectionBackend.cpp; sourceTree = "<group>"; };
 9759 5E2C434D1BCEE2E50001E2BC /* PeerConnectionBackend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PeerConnectionBackend.h; sourceTree = "<group>"; };
 9760 5E2C434E1BCEE2E50001E2BC /* PeerConnectionStates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PeerConnectionStates.h; sourceTree = "<group>"; };
 9761 5E2C434F1BCEE2E50001E2BC /* RTCConfiguration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RTCConfiguration.cpp; sourceTree = "<group>"; };
 9762 5E2C43541BCEE30D0001E2BC /* RTCPeerConnection.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = RTCPeerConnection.js; sourceTree = "<group>"; };
 9763 5E2C43551BCEE30D0001E2BC /* RTCPeerConnectionInternals.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = RTCPeerConnectionInternals.js; sourceTree = "<group>"; };
 9764 5E2C43561BCEE30D0001E2BC /* RTCRtpReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RTCRtpReceiver.cpp; sourceTree = "<group>"; };
 9765 5E2C43571BCEE30D0001E2BC /* RTCRtpReceiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCRtpReceiver.h; sourceTree = "<group>"; };
 9766 5E2C43581BCEE30D0001E2BC /* RTCRtpReceiver.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCRtpReceiver.idl; sourceTree = "<group>"; };
 9767 5E2C43591BCEE30D0001E2BC /* RTCRtpSender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RTCRtpSender.cpp; sourceTree = "<group>"; };
 9768 5E2C435A1BCEE30D0001E2BC /* RTCRtpSender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCRtpSender.h; sourceTree = "<group>"; };
 9769 5E2C435B1BCEE30D0001E2BC /* RTCRtpSender.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCRtpSender.idl; sourceTree = "<group>"; };
 9770 5E2C435C1BCEE30D0001E2BC /* RTCRtpSenderReceiverBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RTCRtpSenderReceiverBase.cpp; sourceTree = "<group>"; };
 9771 5E2C435D1BCEE30D0001E2BC /* RTCRtpSenderReceiverBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCRtpSenderReceiverBase.h; sourceTree = "<group>"; };
 9772 5E2C43641BCEE3720001E2BC /* RTCTrackEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RTCTrackEvent.cpp; sourceTree = "<group>"; };
 9773 5E2C43651BCEE3720001E2BC /* RTCTrackEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCTrackEvent.h; sourceTree = "<group>"; };
 9774 5E2C43661BCEE3720001E2BC /* RTCTrackEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCTrackEvent.idl; sourceTree = "<group>"; };
 9775 5E2C43691BCF05C80001E2BC /* JSRTCTrackEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCTrackEvent.cpp; sourceTree = "<group>"; };
 9776 5E2C436A1BCF05C80001E2BC /* JSRTCTrackEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRTCTrackEvent.h; sourceTree = "<group>"; };
 9777 5E2C436D1BCF0D690001E2BC /* JSRTCRtpReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCRtpReceiver.cpp; sourceTree = "<group>"; };
 9778 5E2C436E1BCF0D690001E2BC /* JSRTCRtpReceiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRTCRtpReceiver.h; sourceTree = "<group>"; };
 9779 5E2C436F1BCF0D690001E2BC /* JSRTCRtpSender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCRtpSender.cpp; sourceTree = "<group>"; };
 9780 5E2C43701BCF0D690001E2BC /* JSRTCRtpSender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRTCRtpSender.h; sourceTree = "<group>"; };
 9781 5E2C43751BCF9A0B0001E2BC /* RTCPeerConnectionBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RTCPeerConnectionBuiltins.cpp; sourceTree = "<group>"; };
 9782 5E2C43761BCF9A0B0001E2BC /* RTCPeerConnectionBuiltins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCPeerConnectionBuiltins.h; sourceTree = "<group>"; };
 9783 5E2C43771BCF9A0B0001E2BC /* RTCPeerConnectionBuiltinsWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCPeerConnectionBuiltinsWrapper.h; sourceTree = "<group>"; };
 9784 5E2C43781BCF9A0B0001E2BC /* RTCPeerConnectionInternalsBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RTCPeerConnectionInternalsBuiltins.cpp; sourceTree = "<group>"; };
 9785 5E2C43791BCF9A0B0001E2BC /* RTCPeerConnectionInternalsBuiltins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCPeerConnectionInternalsBuiltins.h; sourceTree = "<group>"; };
 9786 5E2C437A1BCF9A0B0001E2BC /* RTCPeerConnectionInternalsBuiltinsWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCPeerConnectionInternalsBuiltinsWrapper.h; sourceTree = "<group>"; };
97699787 5EA725CA1ACABCB500EAD17B /* NavigatorMediaDevices.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NavigatorMediaDevices.cpp; sourceTree = "<group>"; };
97709788 5EA725CB1ACABCB500EAD17B /* NavigatorMediaDevices.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NavigatorMediaDevices.h; sourceTree = "<group>"; };
97719789 5EA725CC1ACABCB500EAD17B /* NavigatorMediaDevices.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NavigatorMediaDevices.idl; sourceTree = "<group>"; };

1510215120 07221B6017CEC32700848E51 /* NavigatorUserMediaErrorCallback.idl */,
1510315121 07221B6117CEC32700848E51 /* NavigatorUserMediaSuccessCallback.h */,
1510415122 07221B6217CEC32700848E51 /* NavigatorUserMediaSuccessCallback.idl */,
 15123 5E2C434C1BCEE2E50001E2BC /* PeerConnectionBackend.cpp */,
 15124 5E2C434D1BCEE2E50001E2BC /* PeerConnectionBackend.h */,
 15125 5E2C434E1BCEE2E50001E2BC /* PeerConnectionStates.h */,
 15126 5E2C434F1BCEE2E50001E2BC /* RTCConfiguration.cpp */,
1510515127 07AB996518DA3C010018771E /* RTCConfiguration.h */,
1510615128 07AB996618DA3C010018771E /* RTCConfiguration.idl */,
1510715129 07221B6317CEC32700848E51 /* RTCDataChannel.cpp */,

1512915151 07221B7717CEC32700848E51 /* RTCPeerConnection.cpp */,
1513015152 07221B7817CEC32700848E51 /* RTCPeerConnection.h */,
1513115153 07221B7917CEC32700848E51 /* RTCPeerConnection.idl */,
15132  4A9755351858ED9B00BD6D15 /* RTCPeerConnectionErrorCallback.h */,
15133  4A9755361858ED9B00BD6D15 /* RTCPeerConnectionErrorCallback.idl */,
 15154 5E2C43541BCEE30D0001E2BC /* RTCPeerConnection.js */,
 15155 5E2C43551BCEE30D0001E2BC /* RTCPeerConnectionInternals.js */,
 15156 5E2C43561BCEE30D0001E2BC /* RTCRtpReceiver.cpp */,
 15157 5E2C43571BCEE30D0001E2BC /* RTCRtpReceiver.h */,
 15158 5E2C43581BCEE30D0001E2BC /* RTCRtpReceiver.idl */,
 15159 5E2C43591BCEE30D0001E2BC /* RTCRtpSender.cpp */,
 15160 5E2C435A1BCEE30D0001E2BC /* RTCRtpSender.h */,
 15161 5E2C435B1BCEE30D0001E2BC /* RTCRtpSender.idl */,
 15162 5E2C435C1BCEE30D0001E2BC /* RTCRtpSenderReceiverBase.cpp */,
 15163 5E2C435D1BCEE30D0001E2BC /* RTCRtpSenderReceiverBase.h */,
1513415164 07221B7A17CEC32700848E51 /* RTCSessionDescription.cpp */,
1513515165 07221B7B17CEC32700848E51 /* RTCSessionDescription.h */,
1513615166 07221B7C17CEC32700848E51 /* RTCSessionDescription.idl */,
15137  07221B7D17CEC32700848E51 /* RTCSessionDescriptionCallback.h */,
15138  07221B7E17CEC32700848E51 /* RTCSessionDescriptionCallback.idl */,
15139  07221B7F17CEC32700848E51 /* RTCSessionDescriptionRequestImpl.cpp */,
15140  07221B8017CEC32700848E51 /* RTCSessionDescriptionRequestImpl.h */,
15141  07221B8117CEC32700848E51 /* RTCStatsCallback.h */,
15142  07221B8217CEC32700848E51 /* RTCStatsCallback.idl */,
1514315167 07221B8317CEC32700848E51 /* RTCStatsReport.cpp */,
1514415168 07221B8417CEC32700848E51 /* RTCStatsReport.h */,
1514515169 07221B8517CEC32700848E51 /* RTCStatsReport.idl */,
15146  07221B8617CEC32700848E51 /* RTCStatsRequestImpl.cpp */,
15147  07221B8717CEC32700848E51 /* RTCStatsRequestImpl.h */,
1514815170 07221B8817CEC32700848E51 /* RTCStatsResponse.cpp */,
1514915171 07221B8917CEC32700848E51 /* RTCStatsResponse.h */,
1515015172 07221B8A17CEC32700848E51 /* RTCStatsResponse.idl */,
15151  07221B8B17CEC32700848E51 /* RTCVoidRequestImpl.cpp */,
15152  07221B8C17CEC32700848E51 /* RTCVoidRequestImpl.h */,
 15173 5E2C43641BCEE3720001E2BC /* RTCTrackEvent.cpp */,
 15174 5E2C43651BCEE3720001E2BC /* RTCTrackEvent.h */,
 15175 5E2C43661BCEE3720001E2BC /* RTCTrackEvent.idl */,
1515315176 076306D417E149CF005A7C4E /* SourceInfo.cpp */,
1515415177 076306D517E149CF005A7C4E /* SourceInfo.h */,
1515515178 076306D617E149CF005A7C4E /* SourceInfo.idl */,

1526915292 07CFD99317D01405001C4FFC /* MediaStream */ = {
1527015293 isa = PBXGroup;
1527115294 children = (
 15295 5E2C436D1BCF0D690001E2BC /* JSRTCRtpReceiver.cpp */,
 15296 5E2C436E1BCF0D690001E2BC /* JSRTCRtpReceiver.h */,
 15297 5E2C436F1BCF0D690001E2BC /* JSRTCRtpSender.cpp */,
 15298 5E2C43701BCF0D690001E2BC /* JSRTCRtpSender.h */,
 15299 5E2C43691BCF05C80001E2BC /* JSRTCTrackEvent.cpp */,
 15300 5E2C436A1BCF05C80001E2BC /* JSRTCTrackEvent.h */,
1527215301 157CC2611B7C1CA400D8D075 /* JSMediaDeviceInfo.cpp */,
1527315302 157CC2621B7C1CA400D8D075 /* JSMediaDeviceInfo.h */,
1527415303 15739BB81B42012200D258C1 /* JSMediaDevices.cpp */,

1532115350 073794EA19EE341E00E5A045 /* JSRTCIceServer.h */,
1532215351 07969D9F17D14151007FF842 /* JSRTCPeerConnection.cpp */,
1532315352 07969DA017D14151007FF842 /* JSRTCPeerConnection.h */,
15324  07969D9917D14151007FF842 /* JSRTCPeerConnectionErrorCallback.cpp */,
15325  07969D9A17D14151007FF842 /* JSRTCPeerConnectionErrorCallback.h */,
1532615353 07969DA117D14151007FF842 /* JSRTCSessionDescription.cpp */,
1532715354 07969DA217D14151007FF842 /* JSRTCSessionDescription.h */,
15328  07969DA317D14151007FF842 /* JSRTCSessionDescriptionCallback.cpp */,
15329  07969DA417D14151007FF842 /* JSRTCSessionDescriptionCallback.h */,
15330  07969DA517D14151007FF842 /* JSRTCStatsCallback.cpp */,
15331  07969DA617D14151007FF842 /* JSRTCStatsCallback.h */,
1533215355 07969DA717D14151007FF842 /* JSRTCStatsReport.cpp */,
1533315356 07969DA817D14151007FF842 /* JSRTCStatsReport.h */,
1533415357 07969DA917D14151007FF842 /* JSRTCStatsResponse.cpp */,

1726417287 9908B0FE1BCAD07D00ED0F65 /* ReadableStreamReaderBuiltins.cpp */,
1726517288 9908B0FF1BCAD07D00ED0F65 /* ReadableStreamReaderBuiltins.h */,
1726617289 9908B1001BCAD07D00ED0F65 /* ReadableStreamReaderBuiltinsWrapper.h */,
 17290 5E2C43751BCF9A0B0001E2BC /* RTCPeerConnectionBuiltins.cpp */,
 17291 5E2C43761BCF9A0B0001E2BC /* RTCPeerConnectionBuiltins.h */,
 17292 5E2C43771BCF9A0B0001E2BC /* RTCPeerConnectionBuiltinsWrapper.h */,
 17293 5E2C43781BCF9A0B0001E2BC /* RTCPeerConnectionInternalsBuiltins.cpp */,
 17294 5E2C43791BCF9A0B0001E2BC /* RTCPeerConnectionInternalsBuiltins.h */,
 17295 5E2C437A1BCF9A0B0001E2BC /* RTCPeerConnectionInternalsBuiltinsWrapper.h */,
1726717296 43B85ED218CBEC5200E31AF4 /* SelectorPseudoClassAndCompatibilityElementMap.cpp */,
1726817297 43B85ED318CBEC5200E31AF4 /* SelectorPseudoClassAndCompatibilityElementMap.gperf */,
1726917298 26AA0F9D18D2A18B00419381 /* SelectorPseudoElementTypeMap.cpp */,

2511225141 93D3C1590F97A9D70053C013 /* DOMHTMLCanvasElement.h in Headers */,
2511325142 93F9B6580BA0F35E00854064 /* DOMHTMLCanvasElementInternal.h in Headers */,
2511425143 85DF2F8E0AA3C88100AD64C5 /* DOMHTMLCollection.h in Headers */,
 25144 5E2C437C1BCF9A840001E2BC /* RTCPeerConnectionInternalsBuiltins.h in Headers */,
2511525145 85E711A20AC5D5350053270F /* DOMHTMLCollectionInternal.h in Headers */,
2511625146 F5C041E30FFCA96D00839D4A /* DOMHTMLDataListElement.h in Headers */,
2511725147 F5C041E50FFCA96D00839D4A /* DOMHTMLDataListElementInternal.h in Headers */,

2513125161 855247D00AD850B80012093B /* DOMHTMLEmbedElementInternal.h in Headers */,
2513225162 85BA4CDF0AA6861B0088052D /* DOMHTMLFieldSetElement.h in Headers */,
2513325163 85E711A80AC5D5350053270F /* DOMHTMLFieldSetElementInternal.h in Headers */,
 25164 5E2C43521BCEE2F60001E2BC /* PeerConnectionStates.h in Headers */,
2513425165 85ECBEEF0AA7626900544F0B /* DOMHTMLFontElement.h in Headers */,
2513525166 85E711A90AC5D5350053270F /* DOMHTMLFontElementInternal.h in Headers */,
2513625167 85DF2C5C0AA341F600AD64C5 /* DOMHTMLFormElement.h in Headers */,

2585325884 A593CF8B1840535200BFCE27 /* InspectorWebAgentBase.h in Headers */,
2585425885 F3810C1C1365A49600ED6E33 /* InspectorWorkerAgent.h in Headers */,
2585525886 F375CC071150D300008DDB81 /* InspectorWorkerResource.h in Headers */,
 25887 5E2C43721BCF0D750001E2BC /* JSRTCRtpReceiver.h in Headers */,
2585625888 F3ABFE0C130E9DA000E7F7D1 /* InstrumentingAgents.h in Headers */,
2585725889 B27535720B053814002CE64F /* IntPoint.h in Headers */,
2585825890 E462A4A1113E71BE004A4220 /* IntPointHash.h in Headers */,

2619826230 07969DB817D14151007FF842 /* JSRTCIceCandidateEvent.h in Headers */,
2619926231 073794EC19EE341E00E5A045 /* JSRTCIceServer.h in Headers */,
2620026232 07969DBA17D14151007FF842 /* JSRTCPeerConnection.h in Headers */,
26201  07969DB417D14151007FF842 /* JSRTCPeerConnectionErrorCallback.h in Headers */,
2620226233 07969DBC17D14151007FF842 /* JSRTCSessionDescription.h in Headers */,
26203  07969DBE17D14151007FF842 /* JSRTCSessionDescriptionCallback.h in Headers */,
26204  07969DC017D14151007FF842 /* JSRTCStatsCallback.h in Headers */,
2620526234 07969DC217D14151007FF842 /* JSRTCStatsReport.h in Headers */,
2620626235 07969DC417D14151007FF842 /* JSRTCStatsResponse.h in Headers */,
2620726236 BCEC01C30C274DDD009F4EC9 /* JSScreen.h in Headers */,

2636326392 B2FA3E010AB75A6F000E5AC4 /* JSSVGSymbolElement.h in Headers */,
2636426393 B2FA3E030AB75A6F000E5AC4 /* JSSVGTextContentElement.h in Headers */,
2636526394 B2FA3E050AB75A6F000E5AC4 /* JSSVGTextElement.h in Headers */,
 26395 5E2C437B1BCF9A570001E2BC /* RTCPeerConnectionBuiltins.h in Headers */,
2636626396 B22362290C3AF04A0008CA9B /* JSSVGTextPathElement.h in Headers */,
2636726397 B2FA3E070AB75A6F000E5AC4 /* JSSVGTextPositioningElement.h in Headers */,
2636826398 B2FA3E090AB75A6F000E5AC4 /* JSSVGTitleElement.h in Headers */,

2669726727 267726011A5B3AD9003C24DD /* NFAToDFA.h in Headers */,
2669826728 BCEF43DD0E674012001C1287 /* NinePieceImage.h in Headers */,
2669926729 14115B5209F84B7100CA4FC1 /* Node.h in Headers */,
 26730 5E2C43681BCEE3770001E2BC /* RTCTrackEvent.h in Headers */,
2670026731 854FE7310A2297BE0058D7AD /* NodeFilter.h in Headers */,
2670126732 854FE7330A2297BE0058D7AD /* NodeFilterCondition.h in Headers */,
2670226733 854FE7350A2297BE0058D7AD /* NodeIterator.h in Headers */,

2701927050 BC3BE9990E9C1E5D00835588 /* RenderScrollbarTheme.h in Headers */,
2702027051 458FE40A1589DF0B005609E6 /* RenderSearchField.h in Headers */,
2702127052 0F11A54F0F39233100C37884 /* RenderSelectionInfo.h in Headers */,
 27053 5E2C43511BCEE2F60001E2BC /* PeerConnectionBackend.h in Headers */,
2702227054 AB247A6D0AFD6383003FA5FD /* RenderSlider.h in Headers */,
2702327055 31955A88160D199200858025 /* RenderSnapshottedPlugIn.h in Headers */,
2702427056 BC8C8FAE0DDCD31B00B592F4 /* RenderStyle.h in Headers */,

2713927171 078E094217D16E1C00420AA1 /* RTCPeerConnectionHandlerClient.h in Headers */,
2714027172 073794F219EE37BB00E5A045 /* RTCPeerConnectionHandlerMock.h in Headers */,
2714127173 078E092617D14D1C00420AA1 /* RTCSessionDescription.h in Headers */,
27142  078E092717D14D1C00420AA1 /* RTCSessionDescriptionCallback.h in Headers */,
2714327174 078E094317D16E1C00420AA1 /* RTCSessionDescriptionDescriptor.h in Headers */,
2714427175 078E094417D16E1C00420AA1 /* RTCSessionDescriptionRequest.h in Headers */,
27145  078E092817D14D1C00420AA1 /* RTCSessionDescriptionRequestImpl.h in Headers */,
27146  078E092917D14D1C00420AA1 /* RTCStatsCallback.h in Headers */,
2714727176 078E092A17D14D1C00420AA1 /* RTCStatsReport.h in Headers */,
2714827177 078E094517D16E1C00420AA1 /* RTCStatsRequest.h in Headers */,
27149  078E092B17D14D1C00420AA1 /* RTCStatsRequestImpl.h in Headers */,
2715027178 078E092C17D14D1C00420AA1 /* RTCStatsResponse.h in Headers */,
2715127179 078E094617D16E1C00420AA1 /* RTCStatsResponseBase.h in Headers */,
2715227180 078E094717D16E1C00420AA1 /* RTCVoidRequest.h in Headers */,
27153  078E092D17D14D1C00420AA1 /* RTCVoidRequestImpl.h in Headers */,
2715427181 5824ABA31AE81116009074B7 /* RubyElement.h in Headers */,
2715527182 5824ABA71AE81384009074B7 /* RubyTextElement.h in Headers */,
2715627183 A79BADA2161E7F3F00C2E652 /* RuleFeature.h in Headers */,

2727927306 51327D6011A33A2B004F9D65 /* SinkDocument.h in Headers */,
2728027307 49E911CD0EF86D47009D0CAF /* SkewTransformOperation.h in Headers */,
2728127308 4150F9F112B6E0E70008C860 /* SliderThumbElement.h in Headers */,
 27309 5E2C435F1BCEE31E0001E2BC /* RTCRtpSenderReceiverBase.h in Headers */,
2728227310 9B532EA41BA928570038A827 /* SlotAssignment.h in Headers */,
2728327311 4B6FA6F40C39E48C00087011 /* SmartReplace.h in Headers */,
2728427312 E4AFD00C0DAF335400F5F55C /* SMILTime.h in Headers */,

2739127419 E4946EAF156E64DD00D3297F /* StyleRuleImport.h in Headers */,
2739227420 F47A5E3E195B8C8A00483100 /* StyleScrollSnapPoints.h in Headers */,
2739327421 9D6380101AF173220031A15C /* StyleSelfAlignmentData.h in Headers */,
 27422 5E2C436C1BCF071E0001E2BC /* JSRTCTrackEvent.h in Headers */,
2739427423 A8EA800C0A19516E00A8EF5F /* StyleSheet.h in Headers */,
2739527424 E4F9EEF3156DA00700D23E7E /* StyleSheetContents.h in Headers */,
2739627425 A8EA800A0A19516E00A8EF5F /* StyleSheetList.h in Headers */,

2742127450 08D46CE3127AD5FC0089694B /* SVGAnimatedEnumeration.h in Headers */,
2742227451 71FB967B1383D64600AC8A4C /* SVGAnimatedEnumerationPropertyTearOff.h in Headers */,
2742327452 0823D159127AD6AC000EBC95 /* SVGAnimatedInteger.h in Headers */,
 27453 5E2C43741BCF0D750001E2BC /* JSRTCRtpSender.h in Headers */,
2742427454 71E623D1151F72A60036E2F4 /* SVGAnimatedIntegerOptionalInteger.h in Headers */,
2742527455 089021A9126EF5DE0092D5EA /* SVGAnimatedLength.h in Headers */,
2742627456 089021AD126EF5E90092D5EA /* SVGAnimatedLengthList.h in Headers */,

2778227812 E4AFCFA50DAF29A300F5F55C /* UnitBezier.h in Headers */,
2778327813 D086FE9809D53AAB005BC74D /* UnlinkCommand.h in Headers */,
2778427814 FD1762E0176686D900D836A8 /* UpSampler.h in Headers */,
 27815 5E2C43611BCEE3230001E2BC /* RTCRtpSender.h in Headers */,
2778527816 6593923809AE4346002C531F /* URL.h in Headers */,
2778627817 267726051A5DF6F2003C24DD /* URLFilterParser.h in Headers */,
2778727818 BCBD21AB0E417AD400A070F2 /* URLHash.h in Headers */,

2806428095 93F199EC08245E59001E9ABC /* XSLStyleSheet.h in Headers */,
2806528096 E1F1E8300C3C2BB9006DB391 /* XSLTExtensions.h in Headers */,
2806628097 93F199ED08245E59001E9ABC /* XSLTProcessor.h in Headers */,
 28098 5E2C437D1BCF9A870001E2BC /* RTCPeerConnectionInternalsBuiltinsWrapper.h in Headers */,
2806728099 E1BE512E0CF6C512002EA959 /* XSLTUnicodeSort.h in Headers */,
2806828100 977E2E0F12F0FC9C00C13379 /* XSSAuditor.h in Headers */,
2806928101 977E2E0F12F0FC9C00C13380 /* XSSAuditorDelegate.h in Headers */,

2844628478 7C1E97271A9F9834007BF0FB /* AutoFillButtonElement.cpp in Sources */,
2844728479 45830D4D1679B4F800ACF8C3 /* AutoscrollController.cpp in Sources */,
2844828480 A8CFF0500A154F09000A4234 /* AutoTableLayout.cpp in Sources */,
 28481 5E2C436B1BCF071E0001E2BC /* JSRTCTrackEvent.cpp in Sources */,
2844928482 070363E1181A1CDC00C074A5 /* AVAudioCaptureSource.mm in Sources */,
2845028483 070363E3181A1CDC00C074A5 /* AVCaptureDeviceManager.mm in Sources */,
2845128484 070363E5181A1CDC00C074A5 /* AVMediaCaptureSource.mm in Sources */,

2956429597 1A494EDE0A123F4C00FDAFC1 /* JSDocumentFragment.cpp in Sources */,
2956529598 7C33F3621B4A050400502CAF /* JSDocumentFragmentCustom.cpp in Sources */,
2956629599 65DF31F509D1CC60000BE325 /* JSDocumentType.cpp in Sources */,
 29600 5E2C43671BCEE3770001E2BC /* RTCTrackEvent.cpp in Sources */,
2956729601 7C33F35E1B4A04CE00502CAF /* JSDocumentTypeCustom.cpp in Sources */,
2956829602 1AC2260C0DB69F190089B669 /* JSDOMApplicationCache.cpp in Sources */,
2956929603 93B70D6309EB0C7C009D8468 /* JSDOMBinding.cpp in Sources */,

2968329717 1AE2AA970A1CDD2D00B42B25 /* JSHTMLImageElement.cpp in Sources */,
2968429718 A80E7E980A1A83E3007FB8C5 /* JSHTMLInputElement.cpp in Sources */,
2968529719 BCC438780E886CC700533DD5 /* JSHTMLInputElementCustom.cpp in Sources */,
 29720 5E2C43501BCEE2F60001E2BC /* PeerConnectionBackend.cpp in Sources */,
2968629721 A6148A7812E41E3B0044A784 /* JSHTMLKeygenElement.cpp in Sources */,
2968729722 1AE2AB210A1CE63B00B42B25 /* JSHTMLLabelElement.cpp in Sources */,
2968829723 1AE2AB230A1CE63B00B42B25 /* JSHTMLLegendElement.cpp in Sources */,

2986629901 07969DAD17D14151007FF842 /* JSRTCDataChannelEvent.cpp in Sources */,
2986729902 07969DAF17D14151007FF842 /* JSRTCDTMFSender.cpp in Sources */,
2986829903 07969DB117D14151007FF842 /* JSRTCDTMFToneChangeEvent.cpp in Sources */,
 29904 5E2C435E1BCEE31E0001E2BC /* RTCRtpSenderReceiverBase.cpp in Sources */,
2986929905 07969DB517D14151007FF842 /* JSRTCIceCandidate.cpp in Sources */,
2987029906 4AE0BF891836084400F3852D /* JSRTCIceCandidateCustom.cpp in Sources */,
 29907 5E2C43731BCF0D750001E2BC /* JSRTCRtpSender.cpp in Sources */,
2987129908 07969DB717D14151007FF842 /* JSRTCIceCandidateEvent.cpp in Sources */,
2987229909 073794EB19EE341E00E5A045 /* JSRTCIceServer.cpp in Sources */,
2987329910 07969DB917D14151007FF842 /* JSRTCPeerConnection.cpp in Sources */,
2987429911 07CA120E182D67D800D12197 /* JSRTCPeerConnectionCustom.cpp in Sources */,
29875  07969DB317D14151007FF842 /* JSRTCPeerConnectionErrorCallback.cpp in Sources */,
2987629912 07969DBB17D14151007FF842 /* JSRTCSessionDescription.cpp in Sources */,
29877  07969DBD17D14151007FF842 /* JSRTCSessionDescriptionCallback.cpp in Sources */,
2987829913 07D07B141834158800ABDD3C /* JSRTCSessionDescriptionCustom.cpp in Sources */,
29879  07969DBF17D14151007FF842 /* JSRTCStatsCallback.cpp in Sources */,
2988029914 07969DC117D14151007FF842 /* JSRTCStatsReport.cpp in Sources */,
2988129915 07969DC317D14151007FF842 /* JSRTCStatsResponse.cpp in Sources */,
2988229916 07DC5FD417D3EEE90099F890 /* JSRTCStatsResponseCustom.cpp in Sources */,

3009630130 7AF9B20E18CFB5F400C64BEF /* JSVTTRegionList.cpp in Sources */,
3009730131 FD82D7F713D4C8BD004E4372 /* JSWaveShaperNode.cpp in Sources */,
3009830132 D3F3D3631A69B1900059FC2B /* JSWebGL2RenderingContext.cpp in Sources */,
 30133 5E2C43531BCEE2F60001E2BC /* RTCConfiguration.cpp in Sources */,
3009930134 D3F3D36C1A69B7D50059FC2B /* JSWebGL2RenderingContextCustom.cpp in Sources */,
3010030135 A7D20F62107F406900A80392 /* JSWebGLActiveInfo.cpp in Sources */,
3010130136 49C7B9931042D2D30009D447 /* JSWebGLBuffer.cpp in Sources */,

3038730422 1A569D1A0D7E2B82007C3983 /* objc_utility.mm in Sources */,
3038830423 1CF6BDFB0E9BB26A0025E1CD /* ObjCEventListener.mm in Sources */,
3038930424 1CF6BE140E9BB4670025E1CD /* ObjCNodeFilterCondition.mm in Sources */,
 30425 5E2C43711BCF0D750001E2BC /* JSRTCRtpReceiver.cpp in Sources */,
3039030426 E16982601134636A00894115 /* ObjCRuntimeObject.mm in Sources */,
3039130427 7E5D7A76161D3F8F00896C34 /* OESElementIndexUint.cpp in Sources */,
3039230428 9001774012E0347800648462 /* OESStandardDerivatives.cpp in Sources */,

3063530671 A89CCC520F44E98100B5DA10 /* ReplaceNodeWithSpanCommand.cpp in Sources */,
3063630672 93309E09099E64920056E581 /* ReplaceSelectionCommand.cpp in Sources */,
3063730673 99CC0B5318BE9849006CEBCC /* ReplayController.cpp in Sources */,
 30674 5E2C43621BCEE32B0001E2BC /* RTCRtpReceiver.cpp in Sources */,
3063830675 99CC0B5518BE9849006CEBCC /* ReplayingInputCursor.cpp in Sources */,
3063930676 99CC0B5718BE984A006CEBCC /* ReplayInputCreationMethods.cpp in Sources */,
3064030677 99CC0B5818BE984A006CEBCC /* ReplayInputDispatchMethods.cpp in Sources */,

3069030727 073794F119EE37BB00E5A045 /* RTCPeerConnectionHandlerMock.cpp in Sources */,
3069130728 078E090C17D14CEE00420AA1 /* RTCSessionDescription.cpp in Sources */,
3069230729 073BE34E17D180B2002BD431 /* RTCSessionDescriptionDescriptor.cpp in Sources */,
30693  078E090D17D14CEE00420AA1 /* RTCSessionDescriptionRequestImpl.cpp in Sources */,
3069430730 078E090E17D14CEE00420AA1 /* RTCStatsReport.cpp in Sources */,
30695  078E090F17D14CEE00420AA1 /* RTCStatsRequestImpl.cpp in Sources */,
3069630731 078E091017D14CEE00420AA1 /* RTCStatsResponse.cpp in Sources */,
30697  078E091117D14CEE00420AA1 /* RTCVoidRequestImpl.cpp in Sources */,
3069830732 5824ABA21AE81116009074B7 /* RubyElement.cpp in Sources */,
3069930733 5824ABA61AE81384009074B7 /* RubyTextElement.cpp in Sources */,
3070030734 A79BADA1161E7F3F00C2E652 /* RuleFeature.cpp in Sources */,

3071930753 A83E1C740E49042C00140B9C /* ScriptControllerMac.mm in Sources */,
3072030754 4998AED113FB224D0090B1AA /* ScriptedAnimationController.cpp in Sources */,
3072130755 08A484770E5272C500C3FE76 /* ScriptElement.cpp in Sources */,
 30756 5E2C43601BCEE3230001E2BC /* RTCRtpSender.cpp in Sources */,
3072230757 E11C9DB00EB3699500E409DB /* ScriptExecutionContext.cpp in Sources */,
3072330758 41F066E50F64BCF600A07EAC /* ScriptGlobalObject.cpp in Sources */,
3072430759 FD31603512B0267600C1A359 /* ScriptProcessorNode.cpp in Sources */,
191695

Source/WebCore/bindings/js/JSDictionary.cpp

5050#if ENABLE(MEDIA_STREAM)
5151#include "JSMediaStream.h"
5252#include "JSMediaStreamTrack.h"
 53#include "JSRTCRtpReceiver.h"
5354#endif
5455
5556#if ENABLE(GAMEPAD)

@@void JSDictionary::convertValue(JSC::Exe
236237{
237238 result = JSMediaStreamTrack::toWrapped(value);
238239}
 240
 241void JSDictionary::convertValue(JSC::ExecState*, JSC::JSValue value, RefPtr<RTCRtpReceiver>& result)
 242{
 243 result = JSRTCRtpReceiver::toWrapped(value);
 244}
239245#endif
240246
241247#if ENABLE(FONT_LOAD_EVENTS)
191695

Source/WebCore/bindings/js/JSDictionary.h

@@class Gamepad;
5050class MediaKeyError;
5151class MediaStream;
5252class MediaStreamTrack;
 53class RTCRtpReceiver;
5354class Node;
5455class SerializedScriptValue;
5556class Storage;

@@private:
128129#if ENABLE(MEDIA_STREAM)
129130 static void convertValue(JSC::ExecState*, JSC::JSValue, RefPtr<MediaStream>& result);
130131 static void convertValue(JSC::ExecState*, JSC::JSValue, RefPtr<MediaStreamTrack>& result);
 132 static void convertValue(JSC::ExecState*, JSC::JSValue, RefPtr<RTCRtpReceiver>& result);
131133#endif
132134#if ENABLE(FONT_LOAD_EVENTS)
133135 static void convertValue(JSC::ExecState*, JSC::JSValue, RefPtr<CSSFontFaceRule>& result);
191695

Source/WebCore/bindings/js/WebCoreBuiltinNames.h

3232namespace WebCore {
3333
3434#define WEBCORE_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(macro)\
 35 macro(operations) \
3536 macro(closeRequested) \
3637 macro(closedPromise) \
3738 macro(controlledReadableStream) \
191695

Source/WebCore/bindings/js/WebCoreJSBuiltinInternals.h

3333#include "WritableStreamInternalsBuiltinsWrapper.h"
3434#endif
3535
 36#if ENABLE(MEDIA_STREAM)
 37#include "RTCPeerConnectionInternalsBuiltinsWrapper.h"
 38#endif
 39
 40#if ENABLE(STREAMS_API) || ENABLE(MEDIA_STREAM)
 41#define SKIP_UNUSED_PARAM
 42#endif
 43
3644namespace WebCore {
3745
3846class JSBuiltinInternalFunctions {

@@explicit JSBuiltinInternalFunctions(JSC:
4452 , m_streamInternalsFunctions(vm)
4553 , m_writableStreamInternalsFunctions(vm)
4654#endif
 55#if ENABLE(MEDIA_STREAM)
 56 , m_rTCPeerConnectionInternalsFunctions(vm)
 57#endif
 58
4759 { }
4860
4961#if ENABLE(STREAMS_API)

@@explicit JSBuiltinInternalFunctions(JSC:
5163 StreamInternalsBuiltinFunctions streamInternals() { return m_streamInternalsFunctions; }
5264 WritableStreamInternalsBuiltinFunctions writableStreamInternals() { return m_writableStreamInternalsFunctions; }
5365#endif
 66#if ENABLE(MEDIA_STREAM)
 67 RTCPeerConnectionInternalsBuiltinFunctions rTCPeerConnectionInternals() { return m_rTCPeerConnectionInternalsFunctions; }
 68#endif
 69
5470 void visit(JSC::SlotVisitor& visitor) {
5571#if ENABLE(STREAMS_API)
5672 m_readableStreamInternalsFunctions.visit(visitor);
5773 m_streamInternalsFunctions.visit(visitor);
5874 m_writableStreamInternalsFunctions.visit(visitor);
59 #else
 75#endif
 76#if ENABLE(MEDIA_STREAM)
 77 m_rTCPeerConnectionInternalsFunctions.visit(visitor);
 78#endif
 79#ifndef SKIP_UNUSED_PARAM
6080 UNUSED_PARAM(visitor);
6181#endif
6282 }

@@explicit JSBuiltinInternalFunctions(JSC:
6585 m_readableStreamInternalsFunctions.init(globalObject);
6686 m_streamInternalsFunctions.init(globalObject);
6787 m_writableStreamInternalsFunctions.init(globalObject);
68 #else
 88#endif
 89#if ENABLE(MEDIA_STREAM)
 90 m_rTCPeerConnectionInternalsFunctions.init(globalObject);
 91#endif
 92#ifndef SKIP_UNUSED_PARAM
6993 UNUSED_PARAM(globalObject);
7094#endif
7195 }

@@private:
77101 StreamInternalsBuiltinFunctions m_streamInternalsFunctions;
78102 WritableStreamInternalsBuiltinFunctions m_writableStreamInternalsFunctions;
79103#endif
 104#if ENABLE(MEDIA_STREAM)
 105 RTCPeerConnectionInternalsBuiltinFunctions m_rTCPeerConnectionInternalsFunctions;
 106#endif
80107
81108};
82109
191695

Source/WebCore/bindings/js/WebCoreJSBuiltins.cpp

4141#include "WritableStreamBuiltins.cpp"
4242#include "WritableStreamInternalsBuiltins.cpp"
4343#endif
 44
 45#if ENABLE(MEDIA_STREAM)
 46#include "RTCPeerConnectionBuiltins.cpp"
 47#include "RTCPeerConnectionInternalsBuiltins.cpp"
 48#endif
191695

Source/WebCore/bindings/js/WebCoreJSBuiltins.h

4343#include "WritableStreamInternalsBuiltinsWrapper.h"
4444#endif
4545
 46#if ENABLE(MEDIA_STREAM)
 47#include "RTCPeerConnectionBuiltinsWrapper.h"
 48#include "RTCPeerConnectionInternalsBuiltinsWrapper.h"
 49#endif
 50
4651#include <runtime/VM.h>
4752
4853namespace WebCore {

@@public:
6469#endif
6570#if ENABLE(MEDIA_STREAM)
6671 , m_mediaDevicesBuiltins(&vm)
 72 , m_rTCPeerConnectionBuiltins(&vm)
 73 , m_rTCPeerConnectionInternalsBuiltins(&vm)
6774#endif
6875 {
6976#if ENABLE(STREAMS_API)

@@public:
7178 m_streamInternalsBuiltins.exportNames();
7279 m_writableStreamInternalsBuiltins.exportNames();
7380#endif
 81#if ENABLE(MEDIA_STREAM)
 82 m_rTCPeerConnectionInternalsBuiltins.exportNames();
 83#endif
7484 }
7585#if ENABLE(STREAMS_API)
7686 ByteLengthQueuingStrategyBuiltinsWrapper& byteLengthQueuingStrategyBuiltins() { return m_byteLengthQueuingStrategyBuiltins; }

@@public:
8696#if ENABLE(MEDIA_STREAM)
8797 MediaDevicesBuiltinsWrapper& mediaDevicesBuiltins() { return m_mediaDevicesBuiltins; }
8898#endif
 99#if ENABLE(MEDIA_STREAM)
 100 RTCPeerConnectionBuiltinsWrapper& rTCPeerConnectionBuiltins() { return m_rTCPeerConnectionBuiltins; }
 101 RTCPeerConnectionInternalsBuiltinsWrapper& rTCPeerConnectionInternalsBuiltins() { return m_rTCPeerConnectionInternalsBuiltins; }
 102#endif
89103
90104private:
91105 JSC::VM& vm;

@@private:
102116#endif
103117#if ENABLE(MEDIA_STREAM)
104118 MediaDevicesBuiltinsWrapper m_mediaDevicesBuiltins;
 119 RTCPeerConnectionBuiltinsWrapper m_rTCPeerConnectionBuiltins;
 120 RTCPeerConnectionInternalsBuiltinsWrapper m_rTCPeerConnectionInternalsBuiltins;
105121#endif
106122
107123};
191695

Source/WebCore/dom/EventNames.in

@@MediaStreamTrackEvent conditional=MEDIA_
3838RTCIceCandidateEvent conditional=MEDIA_STREAM
3939RTCDataChannelEvent conditional=MEDIA_STREAM
4040RTCDTMFToneChangeEvent conditional=MEDIA_STREAM
 41RTCTrackEvent conditional=MEDIA_STREAM
4142SpeechSynthesisEvent conditional=SPEECH_SYNTHESIS
4243WebGLContextEvent conditional=WEBGL
4344StorageEvent
191695

LayoutTests/ChangeLog

 12015-10-28 Adam Bergkvist <adam.bergkvist@ericsson.com>
 2
 3 WebRTC: Update RTCPeerConnection API and introduce PeerConnectionBackend
 4 https://bugs.webkit.org/show_bug.cgi?id=150166
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Updated expected results (listed below) with the new types added by
 9 this change (RTCRtpSender, RTCRtpReceiver and RTCTrackEvent).
 10
 11 * platform/efl/js/dom/global-constructors-attributes-expected.txt:
 12 * platform/gtk/js/dom/global-constructors-attributes-expected.txt:
 13 * platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
 14 * platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
 15 * platform/mac/js/dom/global-constructors-attributes-expected.txt:
 16
1172015-10-28 Mark Lam <mark.lam@apple.com>
218
319 Update FTL to support UntypedUse operands for op_sub.
191695

LayoutTests/platform/efl/js/dom/global-constructors-attributes-expected.txt

@@PASS Object.getOwnPropertyDescriptor(glo
993993PASS Object.getOwnPropertyDescriptor(global, 'RTCIceCandidate').hasOwnProperty('set') is false
994994PASS Object.getOwnPropertyDescriptor(global, 'RTCIceCandidate').enumerable is false
995995PASS Object.getOwnPropertyDescriptor(global, 'RTCIceCandidate').configurable is true
 996PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpReceiver').value is RTCRtpReceiver
 997PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpReceiver').hasOwnProperty('get') is false
 998PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpReceiver').hasOwnProperty('set') is false
 999PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpReceiver').enumerable is false
 1000PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpReceiver').configurable is true
 1001PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpSender').value is RTCRtpSender
 1002PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpSender').hasOwnProperty('get') is false
 1003PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpSender').hasOwnProperty('set') is false
 1004PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpSender').enumerable is false
 1005PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpSender').configurable is true
9961006PASS Object.getOwnPropertyDescriptor(global, 'RTCSessionDescription').value is RTCSessionDescription
9971007PASS Object.getOwnPropertyDescriptor(global, 'RTCSessionDescription').hasOwnProperty('get') is false
9981008PASS Object.getOwnPropertyDescriptor(global, 'RTCSessionDescription').hasOwnProperty('set') is false
9991009PASS Object.getOwnPropertyDescriptor(global, 'RTCSessionDescription').enumerable is false
10001010PASS Object.getOwnPropertyDescriptor(global, 'RTCSessionDescription').configurable is true
 1011PASS Object.getOwnPropertyDescriptor(global, 'RTCTrackEvent').value is RTCTrackEvent
 1012PASS Object.getOwnPropertyDescriptor(global, 'RTCTrackEvent').hasOwnProperty('get') is false
 1013PASS Object.getOwnPropertyDescriptor(global, 'RTCTrackEvent').hasOwnProperty('set') is false
 1014PASS Object.getOwnPropertyDescriptor(global, 'RTCTrackEvent').enumerable is false
 1015PASS Object.getOwnPropertyDescriptor(global, 'RTCTrackEvent').configurable is true
10011016PASS Object.getOwnPropertyDescriptor(global, 'RadioNodeList').value is RadioNodeList
10021017PASS Object.getOwnPropertyDescriptor(global, 'RadioNodeList').hasOwnProperty('get') is false
10031018PASS Object.getOwnPropertyDescriptor(global, 'RadioNodeList').hasOwnProperty('set') is false
191695

LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt

@@PASS Object.getOwnPropertyDescriptor(glo
10131013PASS Object.getOwnPropertyDescriptor(global, 'RTCIceCandidate').hasOwnProperty('set') is false
10141014PASS Object.getOwnPropertyDescriptor(global, 'RTCIceCandidate').enumerable is false
10151015PASS Object.getOwnPropertyDescriptor(global, 'RTCIceCandidate').configurable is true
 1016PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpReceiver').value is RTCRtpReceiver
 1017PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpReceiver').hasOwnProperty('get') is false
 1018PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpReceiver').hasOwnProperty('set') is false
 1019PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpReceiver').enumerable is false
 1020PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpReceiver').configurable is true
 1021PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpSender').value is RTCRtpSender
 1022PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpSender').hasOwnProperty('get') is false
 1023PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpSender').hasOwnProperty('set') is false
 1024PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpSender').enumerable is false
 1025PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpSender').configurable is true
10161026PASS Object.getOwnPropertyDescriptor(global, 'RTCSessionDescription').value is RTCSessionDescription
10171027PASS Object.getOwnPropertyDescriptor(global, 'RTCSessionDescription').hasOwnProperty('get') is false
10181028PASS Object.getOwnPropertyDescriptor(global, 'RTCSessionDescription').hasOwnProperty('set') is false
10191029PASS Object.getOwnPropertyDescriptor(global, 'RTCSessionDescription').enumerable is false
10201030PASS Object.getOwnPropertyDescriptor(global, 'RTCSessionDescription').configurable is true
 1031PASS Object.getOwnPropertyDescriptor(global, 'RTCTrackEvent').value is RTCTrackEvent
 1032PASS Object.getOwnPropertyDescriptor(global, 'RTCTrackEvent').hasOwnProperty('get') is false
 1033PASS Object.getOwnPropertyDescriptor(global, 'RTCTrackEvent').hasOwnProperty('set') is false
 1034PASS Object.getOwnPropertyDescriptor(global, 'RTCTrackEvent').enumerable is false
 1035PASS Object.getOwnPropertyDescriptor(global, 'RTCTrackEvent').configurable is true
10211036PASS Object.getOwnPropertyDescriptor(global, 'RadioNodeList').value is RadioNodeList
10221037PASS Object.getOwnPropertyDescriptor(global, 'RadioNodeList').hasOwnProperty('get') is false
10231038PASS Object.getOwnPropertyDescriptor(global, 'RadioNodeList').hasOwnProperty('set') is false
191695

LayoutTests/platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt

@@PASS Object.getOwnPropertyDescriptor(glo
993993PASS Object.getOwnPropertyDescriptor(global, 'RTCIceCandidate').hasOwnProperty('set') is false
994994PASS Object.getOwnPropertyDescriptor(global, 'RTCIceCandidate').enumerable is false
995995PASS Object.getOwnPropertyDescriptor(global, 'RTCIceCandidate').configurable is true
 996PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpReceiver').value is RTCRtpReceiver
 997PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpReceiver').hasOwnProperty('get') is false
 998PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpReceiver').hasOwnProperty('set') is false
 999PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpReceiver').enumerable is false
 1000PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpReceiver').configurable is true
 1001PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpSender').value is RTCRtpSender
 1002PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpSender').hasOwnProperty('get') is false
 1003PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpSender').hasOwnProperty('set') is false
 1004PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpSender').enumerable is false
 1005PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpSender').configurable is true
9961006PASS Object.getOwnPropertyDescriptor(global, 'RTCSessionDescription').value is RTCSessionDescription
9971007PASS Object.getOwnPropertyDescriptor(global, 'RTCSessionDescription').hasOwnProperty('get') is false
9981008PASS Object.getOwnPropertyDescriptor(global, 'RTCSessionDescription').hasOwnProperty('set') is false
9991009PASS Object.getOwnPropertyDescriptor(global, 'RTCSessionDescription').enumerable is false
10001010PASS Object.getOwnPropertyDescriptor(global, 'RTCSessionDescription').configurable is true
 1011PASS Object.getOwnPropertyDescriptor(global, 'RTCTrackEvent').value is RTCTrackEvent
 1012PASS Object.getOwnPropertyDescriptor(global, 'RTCTrackEvent').hasOwnProperty('get') is false
 1013PASS Object.getOwnPropertyDescriptor(global, 'RTCTrackEvent').hasOwnProperty('set') is false
 1014PASS Object.getOwnPropertyDescriptor(global, 'RTCTrackEvent').enumerable is false
 1015PASS Object.getOwnPropertyDescriptor(global, 'RTCTrackEvent').configurable is true
10011016PASS Object.getOwnPropertyDescriptor(global, 'RadioNodeList').value is RadioNodeList
10021017PASS Object.getOwnPropertyDescriptor(global, 'RadioNodeList').hasOwnProperty('get') is false
10031018PASS Object.getOwnPropertyDescriptor(global, 'RadioNodeList').hasOwnProperty('set') is false
191695

LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt

@@PASS Object.getOwnPropertyDescriptor(glo
10131013PASS Object.getOwnPropertyDescriptor(global, 'RTCIceCandidate').hasOwnProperty('set') is false
10141014PASS Object.getOwnPropertyDescriptor(global, 'RTCIceCandidate').enumerable is false
10151015PASS Object.getOwnPropertyDescriptor(global, 'RTCIceCandidate').configurable is true
 1016PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpReceiver').value is RTCRtpReceiver
 1017PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpReceiver').hasOwnProperty('get') is false
 1018PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpReceiver').hasOwnProperty('set') is false
 1019PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpReceiver').enumerable is false
 1020PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpReceiver').configurable is true
 1021PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpSender').value is RTCRtpSender
 1022PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpSender').hasOwnProperty('get') is false
 1023PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpSender').hasOwnProperty('set') is false
 1024PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpSender').enumerable is false
 1025PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpSender').configurable is true
10161026PASS Object.getOwnPropertyDescriptor(global, 'RTCSessionDescription').value is RTCSessionDescription
10171027PASS Object.getOwnPropertyDescriptor(global, 'RTCSessionDescription').hasOwnProperty('get') is false
10181028PASS Object.getOwnPropertyDescriptor(global, 'RTCSessionDescription').hasOwnProperty('set') is false
10191029PASS Object.getOwnPropertyDescriptor(global, 'RTCSessionDescription').enumerable is false
10201030PASS Object.getOwnPropertyDescriptor(global, 'RTCSessionDescription').configurable is true
 1031PASS Object.getOwnPropertyDescriptor(global, 'RTCTrackEvent').value is RTCTrackEvent
 1032PASS Object.getOwnPropertyDescriptor(global, 'RTCTrackEvent').hasOwnProperty('get') is false
 1033PASS Object.getOwnPropertyDescriptor(global, 'RTCTrackEvent').hasOwnProperty('set') is false
 1034PASS Object.getOwnPropertyDescriptor(global, 'RTCTrackEvent').enumerable is false
 1035PASS Object.getOwnPropertyDescriptor(global, 'RTCTrackEvent').configurable is true
10211036PASS Object.getOwnPropertyDescriptor(global, 'RadioNodeList').value is RadioNodeList
10221037PASS Object.getOwnPropertyDescriptor(global, 'RadioNodeList').hasOwnProperty('get') is false
10231038PASS Object.getOwnPropertyDescriptor(global, 'RadioNodeList').hasOwnProperty('set') is false
191695

LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt

@@PASS Object.getOwnPropertyDescriptor(glo
10131013PASS Object.getOwnPropertyDescriptor(global, 'RTCIceCandidate').hasOwnProperty('set') is false
10141014PASS Object.getOwnPropertyDescriptor(global, 'RTCIceCandidate').enumerable is false
10151015PASS Object.getOwnPropertyDescriptor(global, 'RTCIceCandidate').configurable is true
 1016PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpReceiver').value is RTCRtpReceiver
 1017PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpReceiver').hasOwnProperty('get') is false
 1018PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpReceiver').hasOwnProperty('set') is false
 1019PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpReceiver').enumerable is false
 1020PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpReceiver').configurable is true
 1021PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpSender').value is RTCRtpSender
 1022PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpSender').hasOwnProperty('get') is false
 1023PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpSender').hasOwnProperty('set') is false
 1024PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpSender').enumerable is false
 1025PASS Object.getOwnPropertyDescriptor(global, 'RTCRtpSender').configurable is true
10161026PASS Object.getOwnPropertyDescriptor(global, 'RTCSessionDescription').value is RTCSessionDescription
10171027PASS Object.getOwnPropertyDescriptor(global, 'RTCSessionDescription').hasOwnProperty('get') is false
10181028PASS Object.getOwnPropertyDescriptor(global, 'RTCSessionDescription').hasOwnProperty('set') is false
10191029PASS Object.getOwnPropertyDescriptor(global, 'RTCSessionDescription').enumerable is false
10201030PASS Object.getOwnPropertyDescriptor(global, 'RTCSessionDescription').configurable is true
 1031PASS Object.getOwnPropertyDescriptor(global, 'RTCTrackEvent').value is RTCTrackEvent
 1032PASS Object.getOwnPropertyDescriptor(global, 'RTCTrackEvent').hasOwnProperty('get') is false
 1033PASS Object.getOwnPropertyDescriptor(global, 'RTCTrackEvent').hasOwnProperty('set') is false
 1034PASS Object.getOwnPropertyDescriptor(global, 'RTCTrackEvent').enumerable is false
 1035PASS Object.getOwnPropertyDescriptor(global, 'RTCTrackEvent').configurable is true
10211036PASS Object.getOwnPropertyDescriptor(global, 'RadioNodeList').value is RadioNodeList
10221037PASS Object.getOwnPropertyDescriptor(global, 'RadioNodeList').hasOwnProperty('get') is false
10231038PASS Object.getOwnPropertyDescriptor(global, 'RadioNodeList').hasOwnProperty('set') is false
191695