OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 10 matching lines...) Expand all Loading... |
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 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. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #include "modules/mediastream/RTCPeerConnection.h" | 31 #include "modules/peerconnection/RTCPeerConnection.h" |
32 | 32 |
33 #include "bindings/core/v8/ArrayValue.h" | 33 #include "bindings/core/v8/ArrayValue.h" |
34 #include "bindings/core/v8/ExceptionMessages.h" | 34 #include "bindings/core/v8/ExceptionMessages.h" |
35 #include "bindings/core/v8/ExceptionState.h" | 35 #include "bindings/core/v8/ExceptionState.h" |
36 #include "bindings/core/v8/Microtask.h" | 36 #include "bindings/core/v8/Microtask.h" |
37 #include "bindings/core/v8/Nullable.h" | 37 #include "bindings/core/v8/Nullable.h" |
38 #include "bindings/core/v8/ScriptPromiseResolver.h" | 38 #include "bindings/core/v8/ScriptPromiseResolver.h" |
39 #include "bindings/core/v8/ScriptState.h" | 39 #include "bindings/core/v8/ScriptState.h" |
40 #include "bindings/core/v8/ScriptValue.h" | 40 #include "bindings/core/v8/ScriptValue.h" |
41 #include "bindings/core/v8/V8ThrowException.h" | 41 #include "bindings/core/v8/V8ThrowException.h" |
42 #include "bindings/modules/v8/RTCIceCandidateInitOrRTCIceCandidate.h" | 42 #include "bindings/modules/v8/RTCIceCandidateInitOrRTCIceCandidate.h" |
43 #include "bindings/modules/v8/V8RTCCertificate.h" | 43 #include "bindings/modules/v8/V8RTCCertificate.h" |
44 #include "core/dom/DOMException.h" | 44 #include "core/dom/DOMException.h" |
45 #include "core/dom/DOMTimeStamp.h" | 45 #include "core/dom/DOMTimeStamp.h" |
46 #include "core/dom/Document.h" | 46 #include "core/dom/Document.h" |
47 #include "core/dom/ExceptionCode.h" | 47 #include "core/dom/ExceptionCode.h" |
48 #include "core/dom/ExecutionContext.h" | 48 #include "core/dom/ExecutionContext.h" |
49 #include "core/frame/LocalFrame.h" | 49 #include "core/frame/LocalFrame.h" |
50 #include "core/frame/UseCounter.h" | 50 #include "core/frame/UseCounter.h" |
51 #include "core/html/VoidCallback.h" | 51 #include "core/html/VoidCallback.h" |
52 #include "core/loader/FrameLoader.h" | 52 #include "core/loader/FrameLoader.h" |
53 #include "core/loader/FrameLoaderClient.h" | 53 #include "core/loader/FrameLoaderClient.h" |
54 #include "modules/crypto/CryptoResultImpl.h" | 54 #include "modules/crypto/CryptoResultImpl.h" |
55 #include "modules/mediastream/MediaConstraintsImpl.h" | 55 #include "modules/mediastream/MediaConstraintsImpl.h" |
56 #include "modules/mediastream/MediaStreamEvent.h" | 56 #include "modules/mediastream/MediaStreamEvent.h" |
57 #include "modules/mediastream/RTCAnswerOptions.h" | 57 #include "modules/peerconnection/RTCAnswerOptions.h" |
58 #include "modules/mediastream/RTCDTMFSender.h" | 58 #include "modules/peerconnection/RTCDTMFSender.h" |
59 #include "modules/mediastream/RTCDataChannel.h" | 59 #include "modules/peerconnection/RTCDataChannel.h" |
60 #include "modules/mediastream/RTCDataChannelEvent.h" | 60 #include "modules/peerconnection/RTCDataChannelEvent.h" |
61 #include "modules/mediastream/RTCIceCandidateEvent.h" | 61 #include "modules/peerconnection/RTCIceCandidateEvent.h" |
62 #include "modules/mediastream/RTCOfferOptions.h" | 62 #include "modules/peerconnection/RTCOfferOptions.h" |
63 #include "modules/mediastream/RTCPeerConnectionErrorCallback.h" | 63 #include "modules/peerconnection/RTCPeerConnectionErrorCallback.h" |
64 #include "modules/mediastream/RTCSessionDescription.h" | 64 #include "modules/peerconnection/RTCSessionDescription.h" |
65 #include "modules/mediastream/RTCSessionDescriptionCallback.h" | 65 #include "modules/peerconnection/RTCSessionDescriptionCallback.h" |
66 #include "modules/mediastream/RTCSessionDescriptionInit.h" | 66 #include "modules/peerconnection/RTCSessionDescriptionInit.h" |
67 #include "modules/mediastream/RTCSessionDescriptionRequestImpl.h" | 67 #include "modules/peerconnection/RTCSessionDescriptionRequestImpl.h" |
68 #include "modules/mediastream/RTCSessionDescriptionRequestPromiseImpl.h" | 68 #include "modules/peerconnection/RTCSessionDescriptionRequestPromiseImpl.h" |
69 #include "modules/mediastream/RTCStatsCallback.h" | 69 #include "modules/peerconnection/RTCStatsCallback.h" |
70 #include "modules/mediastream/RTCStatsRequestImpl.h" | 70 #include "modules/peerconnection/RTCStatsRequestImpl.h" |
71 #include "modules/mediastream/RTCVoidRequestImpl.h" | 71 #include "modules/peerconnection/RTCVoidRequestImpl.h" |
72 #include "modules/mediastream/RTCVoidRequestPromiseImpl.h" | 72 #include "modules/peerconnection/RTCVoidRequestPromiseImpl.h" |
73 #include "platform/mediastream/RTCAnswerOptionsPlatform.h" | 73 #include "platform/peerconnection/RTCAnswerOptionsPlatform.h" |
74 #include "platform/mediastream/RTCConfiguration.h" | 74 #include "platform/peerconnection/RTCConfiguration.h" |
75 #include "platform/mediastream/RTCOfferOptionsPlatform.h" | 75 #include "platform/peerconnection/RTCOfferOptionsPlatform.h" |
76 #include "public/platform/Platform.h" | 76 #include "public/platform/Platform.h" |
77 #include "public/platform/WebCryptoAlgorithmParams.h" | 77 #include "public/platform/WebCryptoAlgorithmParams.h" |
78 #include "public/platform/WebMediaStream.h" | 78 #include "public/platform/WebMediaStream.h" |
79 #include "public/platform/WebRTCAnswerOptions.h" | 79 #include "public/platform/WebRTCAnswerOptions.h" |
80 #include "public/platform/WebRTCCertificate.h" | 80 #include "public/platform/WebRTCCertificate.h" |
81 #include "public/platform/WebRTCCertificateGenerator.h" | 81 #include "public/platform/WebRTCCertificateGenerator.h" |
82 #include "public/platform/WebRTCConfiguration.h" | 82 #include "public/platform/WebRTCConfiguration.h" |
83 #include "public/platform/WebRTCDataChannelHandler.h" | 83 #include "public/platform/WebRTCDataChannelHandler.h" |
84 #include "public/platform/WebRTCDataChannelInit.h" | 84 #include "public/platform/WebRTCDataChannelInit.h" |
85 #include "public/platform/WebRTCICECandidate.h" | 85 #include "public/platform/WebRTCICECandidate.h" |
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1025 void RTCPeerConnection::negotiationNeeded() | 1025 void RTCPeerConnection::negotiationNeeded() |
1026 { | 1026 { |
1027 DCHECK(!m_closed); | 1027 DCHECK(!m_closed); |
1028 scheduleDispatchEvent(Event::create(EventTypeNames::negotiationneeded)); | 1028 scheduleDispatchEvent(Event::create(EventTypeNames::negotiationneeded)); |
1029 } | 1029 } |
1030 | 1030 |
1031 void RTCPeerConnection::didGenerateICECandidate(const WebRTCICECandidate& webCan
didate) | 1031 void RTCPeerConnection::didGenerateICECandidate(const WebRTCICECandidate& webCan
didate) |
1032 { | 1032 { |
1033 DCHECK(!m_closed); | 1033 DCHECK(!m_closed); |
1034 DCHECK(getExecutionContext()->isContextThread()); | 1034 DCHECK(getExecutionContext()->isContextThread()); |
1035 if (webCandidate.isNull()) | 1035 if (webCandidate.isNull()) { |
1036 scheduleDispatchEvent(RTCIceCandidateEvent::create(false, false, nullptr
)); | 1036 scheduleDispatchEvent(RTCIceCandidateEvent::create(false, false, nullptr
)); |
1037 else { | 1037 } else { |
1038 RTCIceCandidate* iceCandidate = RTCIceCandidate::create(webCandidate); | 1038 RTCIceCandidate* iceCandidate = RTCIceCandidate::create(webCandidate); |
1039 scheduleDispatchEvent(RTCIceCandidateEvent::create(false, false, iceCand
idate)); | 1039 scheduleDispatchEvent(RTCIceCandidateEvent::create(false, false, iceCand
idate)); |
1040 } | 1040 } |
1041 } | 1041 } |
1042 | 1042 |
1043 void RTCPeerConnection::didChangeSignalingState(SignalingState newState) | 1043 void RTCPeerConnection::didChangeSignalingState(SignalingState newState) |
1044 { | 1044 { |
1045 DCHECK(!m_closed); | 1045 DCHECK(!m_closed); |
1046 DCHECK(getExecutionContext()->isContextThread()); | 1046 DCHECK(getExecutionContext()->isContextThread()); |
1047 changeSignalingState(newState); | 1047 changeSignalingState(newState); |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1229 { | 1229 { |
1230 visitor->trace(m_localStreams); | 1230 visitor->trace(m_localStreams); |
1231 visitor->trace(m_remoteStreams); | 1231 visitor->trace(m_remoteStreams); |
1232 visitor->trace(m_dispatchScheduledEventRunner); | 1232 visitor->trace(m_dispatchScheduledEventRunner); |
1233 visitor->trace(m_scheduledEvents); | 1233 visitor->trace(m_scheduledEvents); |
1234 EventTargetWithInlineData::trace(visitor); | 1234 EventTargetWithInlineData::trace(visitor); |
1235 ActiveDOMObject::trace(visitor); | 1235 ActiveDOMObject::trace(visitor); |
1236 } | 1236 } |
1237 | 1237 |
1238 } // namespace blink | 1238 } // namespace blink |
OLD | NEW |