| 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 15 matching lines...) Expand all Loading... |
| 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 #ifndef RTCPeerConnection_h | 31 #ifndef RTCPeerConnection_h |
| 32 #define RTCPeerConnection_h | 32 #define RTCPeerConnection_h |
| 33 | 33 |
| 34 #include "bindings/core/v8/Dictionary.h" | 34 #include "bindings/core/v8/Dictionary.h" |
| 35 #include "bindings/core/v8/ScriptPromise.h" | 35 #include "bindings/core/v8/ScriptPromise.h" |
| 36 #include "bindings/core/v8/V8GCRoot.h" |
| 36 #include "core/dom/ActiveDOMObject.h" | 37 #include "core/dom/ActiveDOMObject.h" |
| 37 #include "modules/EventTargetModules.h" | 38 #include "modules/EventTargetModules.h" |
| 38 #include "modules/crypto/NormalizeAlgorithm.h" | 39 #include "modules/crypto/NormalizeAlgorithm.h" |
| 39 #include "modules/mediastream/MediaStream.h" | 40 #include "modules/mediastream/MediaStream.h" |
| 40 #include "modules/mediastream/RTCIceCandidate.h" | 41 #include "modules/mediastream/RTCIceCandidate.h" |
| 41 #include "platform/AsyncMethodRunner.h" | 42 #include "platform/AsyncMethodRunner.h" |
| 42 #include "public/platform/WebMediaConstraints.h" | 43 #include "public/platform/WebMediaConstraints.h" |
| 43 #include "public/platform/WebRTCPeerConnectionHandler.h" | 44 #include "public/platform/WebRTCPeerConnectionHandler.h" |
| 44 #include "public/platform/WebRTCPeerConnectionHandlerClient.h" | 45 #include "public/platform/WebRTCPeerConnectionHandlerClient.h" |
| 45 | 46 |
| 46 namespace blink { | 47 namespace blink { |
| 47 class ExceptionState; | 48 class ExceptionState; |
| 48 class MediaStreamTrack; | 49 class MediaStreamTrack; |
| 49 class RTCConfiguration; | 50 class RTCConfiguration; |
| 50 class RTCDTMFSender; | 51 class RTCDTMFSender; |
| 51 class RTCDataChannel; | 52 class RTCDataChannel; |
| 52 class RTCIceCandidateInitOrRTCIceCandidate; | 53 class RTCIceCandidateInitOrRTCIceCandidate; |
| 53 class RTCOfferOptions; | 54 class RTCOfferOptions; |
| 54 class RTCPeerConnectionErrorCallback; | 55 class RTCPeerConnectionErrorCallback; |
| 55 class RTCSessionDescription; | 56 class RTCSessionDescription; |
| 56 class RTCSessionDescriptionCallback; | 57 class RTCSessionDescriptionCallback; |
| 57 class RTCSessionDescriptionInit; | 58 class RTCSessionDescriptionInit; |
| 58 class RTCStatsCallback; | 59 class RTCStatsCallback; |
| 59 class ScriptState; | 60 class ScriptState; |
| 60 class VoidCallback; | 61 class VoidCallback; |
| 61 | 62 |
| 62 class RTCPeerConnection final | 63 class RTCPeerConnection final |
| 63 : public RefCountedGarbageCollectedEventTargetWithInlineData<RTCPeerConnecti
on> | 64 : public RefCountedGarbageCollectedEventTargetWithInlineData<RTCPeerConnecti
on> |
| 64 , public WebRTCPeerConnectionHandlerClient | 65 , public WebRTCPeerConnectionHandlerClient |
| 65 , public ActiveDOMObject { | 66 , public ActiveDOMObject |
| 67 , public V8GCRoot { |
| 66 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(RTCPeerConnection); | 68 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(RTCPeerConnection); |
| 67 DEFINE_WRAPPERTYPEINFO(); | 69 DEFINE_WRAPPERTYPEINFO(); |
| 68 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RTCPeerConnection); | 70 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RTCPeerConnection); |
| 69 public: | 71 public: |
| 70 // TODO(hbos): Create with expired RTCCertificate should fail, see crbug.com
/565278. | 72 // TODO(hbos): Create with expired RTCCertificate should fail, see crbug.com
/565278. |
| 71 static RTCPeerConnection* create(ExecutionContext*, const Dictionary&, const
Dictionary&, ExceptionState&); | 73 static RTCPeerConnection* create(ExecutionContext*, const Dictionary&, const
Dictionary&, ExceptionState&); |
| 72 ~RTCPeerConnection() override; | 74 ~RTCPeerConnection() override; |
| 73 | 75 |
| 74 void createOffer(ExecutionContext*, RTCSessionDescriptionCallback*, RTCPeerC
onnectionErrorCallback*, const Dictionary&); | 76 void createOffer(ExecutionContext*, RTCSessionDescriptionCallback*, RTCPeerC
onnectionErrorCallback*, const Dictionary&); |
| 75 void createAnswer(ExecutionContext*, RTCSessionDescriptionCallback*, RTCPeer
ConnectionErrorCallback*, const Dictionary&); | 77 void createAnswer(ExecutionContext*, RTCSessionDescriptionCallback*, RTCPeer
ConnectionErrorCallback*, const Dictionary&); |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 Member<AsyncMethodRunner<RTCPeerConnection>> m_dispatchScheduledEventRunner; | 208 Member<AsyncMethodRunner<RTCPeerConnection>> m_dispatchScheduledEventRunner; |
| 207 HeapVector<Member<EventWrapper>> m_scheduledEvents; | 209 HeapVector<Member<EventWrapper>> m_scheduledEvents; |
| 208 | 210 |
| 209 bool m_stopped; | 211 bool m_stopped; |
| 210 bool m_closed; | 212 bool m_closed; |
| 211 }; | 213 }; |
| 212 | 214 |
| 213 } // namespace blink | 215 } // namespace blink |
| 214 | 216 |
| 215 #endif // RTCPeerConnection_h | 217 #endif // RTCPeerConnection_h |
| OLD | NEW |