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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
42 #include "public/platform/WebMediaConstraints.h" | 42 #include "public/platform/WebMediaConstraints.h" |
43 #include "public/platform/WebRTCPeerConnectionHandler.h" | 43 #include "public/platform/WebRTCPeerConnectionHandler.h" |
44 #include "public/platform/WebRTCPeerConnectionHandlerClient.h" | 44 #include "public/platform/WebRTCPeerConnectionHandlerClient.h" |
45 | 45 |
46 namespace blink { | 46 namespace blink { |
47 class ExceptionState; | 47 class ExceptionState; |
48 class MediaStreamTrack; | 48 class MediaStreamTrack; |
49 class RTCConfiguration; | 49 class RTCConfiguration; |
50 class RTCDTMFSender; | 50 class RTCDTMFSender; |
51 class RTCDataChannel; | 51 class RTCDataChannel; |
52 class RTCErrorCallback; | 52 class RTCErrorCallback; |
philipj_slow
2016/02/24 08:14:03
Remove this forward declaration, grep source for a
Guido Urdaneta
2016/02/24 12:42:10
Done.
| |
53 class RTCIceCandidateInitOrRTCIceCandidate; | 53 class RTCIceCandidateInitOrRTCIceCandidate; |
54 class RTCOfferOptions; | 54 class RTCOfferOptions; |
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 { |
66 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(RTCPeerConnection); | 67 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(RTCPeerConnection); |
67 DEFINE_WRAPPERTYPEINFO(); | 68 DEFINE_WRAPPERTYPEINFO(); |
68 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RTCPeerConnection); | 69 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RTCPeerConnection); |
69 public: | 70 public: |
70 // TODO(hbos): Create with expired RTCCertificate should fail, see crbug.com /565278. | 71 // TODO(hbos): Create with expired RTCCertificate should fail, see crbug.com /565278. |
71 static RTCPeerConnection* create(ExecutionContext*, const Dictionary&, const Dictionary&, ExceptionState&); | 72 static RTCPeerConnection* create(ExecutionContext*, const Dictionary&, const Dictionary&, ExceptionState&); |
72 ~RTCPeerConnection() override; | 73 ~RTCPeerConnection() override; |
73 | 74 |
74 void createOffer(ExecutionContext*, RTCSessionDescriptionCallback*, RTCError Callback*, const Dictionary&, ExceptionState&); | 75 void createOffer(ExecutionContext*, RTCSessionDescriptionCallback*, RTCPeerC onnectionErrorCallback*, const Dictionary&, ExceptionState&); |
75 | 76 void createAnswer(ExecutionContext*, RTCSessionDescriptionCallback*, RTCPeer ConnectionErrorCallback*, const Dictionary&, ExceptionState&); |
76 void createAnswer(ExecutionContext*, RTCSessionDescriptionCallback*, RTCErro rCallback*, const Dictionary&, ExceptionState&); | |
77 | 77 |
78 ScriptPromise setLocalDescription(ScriptState*, const RTCSessionDescriptionI nit&); | 78 ScriptPromise setLocalDescription(ScriptState*, const RTCSessionDescriptionI nit&); |
79 ScriptPromise setLocalDescription(ScriptState*, RTCSessionDescription*, Void Callback*, RTCErrorCallback*); | 79 ScriptPromise setLocalDescription(ScriptState*, RTCSessionDescription*, Void Callback*, RTCPeerConnectionErrorCallback*); |
80 RTCSessionDescription* localDescription(); | 80 RTCSessionDescription* localDescription(); |
81 | 81 |
82 ScriptPromise setRemoteDescription(ScriptState*, const RTCSessionDescription Init&); | 82 ScriptPromise setRemoteDescription(ScriptState*, const RTCSessionDescription Init&); |
83 ScriptPromise setRemoteDescription(ScriptState*, RTCSessionDescription*, Voi dCallback*, RTCErrorCallback*); | 83 ScriptPromise setRemoteDescription(ScriptState*, RTCSessionDescription*, Voi dCallback*, RTCPeerConnectionErrorCallback*); |
84 RTCSessionDescription* remoteDescription(); | 84 RTCSessionDescription* remoteDescription(); |
85 | 85 |
86 String signalingState() const; | 86 String signalingState() const; |
87 | 87 |
88 void updateIce(ExecutionContext*, const Dictionary& rtcConfiguration, const Dictionary& mediaConstraints, ExceptionState&); | 88 void updateIce(ExecutionContext*, const Dictionary& rtcConfiguration, const Dictionary& mediaConstraints, ExceptionState&); |
89 | 89 |
90 // Certificate management | 90 // Certificate management |
91 // http://w3c.github.io/webrtc-pc/#sec.cert-mgmt | 91 // http://w3c.github.io/webrtc-pc/#sec.cert-mgmt |
92 static ScriptPromise generateCertificate(ScriptState*, const AlgorithmIdenti fier& keygenAlgorithm, ExceptionState&); | 92 static ScriptPromise generateCertificate(ScriptState*, const AlgorithmIdenti fier& keygenAlgorithm, ExceptionState&); |
93 | 93 |
94 ScriptPromise addIceCandidate(ScriptState*, const RTCIceCandidateInitOrRTCIc eCandidate&); | 94 ScriptPromise addIceCandidate(ScriptState*, const RTCIceCandidateInitOrRTCIc eCandidate&); |
95 ScriptPromise addIceCandidate(ScriptState*, RTCIceCandidate*, VoidCallback*, RTCErrorCallback*); | 95 ScriptPromise addIceCandidate(ScriptState*, RTCIceCandidate*, VoidCallback*, RTCPeerConnectionErrorCallback*); |
96 | 96 |
97 String iceGatheringState() const; | 97 String iceGatheringState() const; |
98 | 98 |
99 String iceConnectionState() const; | 99 String iceConnectionState() const; |
100 | 100 |
101 MediaStreamVector getLocalStreams() const; | 101 MediaStreamVector getLocalStreams() const; |
102 | 102 |
103 MediaStreamVector getRemoteStreams() const; | 103 MediaStreamVector getRemoteStreams() const; |
104 | 104 |
105 MediaStream* getStreamById(const String& streamId); | 105 MediaStream* getStreamById(const String& streamId); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
207 Member<AsyncMethodRunner<RTCPeerConnection>> m_dispatchScheduledEventRunner; | 207 Member<AsyncMethodRunner<RTCPeerConnection>> m_dispatchScheduledEventRunner; |
208 HeapVector<Member<EventWrapper>> m_scheduledEvents; | 208 HeapVector<Member<EventWrapper>> m_scheduledEvents; |
209 | 209 |
210 bool m_stopped; | 210 bool m_stopped; |
211 bool m_closed; | 211 bool m_closed; |
212 }; | 212 }; |
213 | 213 |
214 } // namespace blink | 214 } // namespace blink |
215 | 215 |
216 #endif // RTCPeerConnection_h | 216 #endif // RTCPeerConnection_h |
OLD | NEW |