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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 , public WebRTCPeerConnectionHandlerClient | 64 , public WebRTCPeerConnectionHandlerClient |
65 , public ActiveDOMObject { | 65 , public ActiveDOMObject { |
66 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(RTCPeerConnection); | 66 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(RTCPeerConnection); |
67 DEFINE_WRAPPERTYPEINFO(); | 67 DEFINE_WRAPPERTYPEINFO(); |
68 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RTCPeerConnection); | 68 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RTCPeerConnection); |
69 public: | 69 public: |
70 // TODO(hbos): Create with expired RTCCertificate should fail, see crbug.com
/565278. | 70 // TODO(hbos): Create with expired RTCCertificate should fail, see crbug.com
/565278. |
71 static RTCPeerConnection* create(ExecutionContext*, const Dictionary&, const
Dictionary&, ExceptionState&); | 71 static RTCPeerConnection* create(ExecutionContext*, const Dictionary&, const
Dictionary&, ExceptionState&); |
72 ~RTCPeerConnection() override; | 72 ~RTCPeerConnection() override; |
73 | 73 |
74 void createOffer(ExecutionContext*, RTCSessionDescriptionCallback*, RTCPeerC
onnectionErrorCallback*, const Dictionary&, ExceptionState&); | 74 void createOffer(ExecutionContext*, RTCSessionDescriptionCallback*, RTCPeerC
onnectionErrorCallback*, const Dictionary&); |
75 void createAnswer(ExecutionContext*, RTCSessionDescriptionCallback*, RTCPeer
ConnectionErrorCallback*, const Dictionary&, ExceptionState&); | 75 void createAnswer(ExecutionContext*, RTCSessionDescriptionCallback*, RTCPeer
ConnectionErrorCallback*, const Dictionary&); |
76 | 76 |
77 ScriptPromise setLocalDescription(ScriptState*, const RTCSessionDescriptionI
nit&); | 77 ScriptPromise setLocalDescription(ScriptState*, const RTCSessionDescriptionI
nit&); |
78 ScriptPromise setLocalDescription(ScriptState*, RTCSessionDescription*, Void
Callback*, RTCPeerConnectionErrorCallback*); | 78 ScriptPromise setLocalDescription(ScriptState*, RTCSessionDescription*, Void
Callback*, RTCPeerConnectionErrorCallback*); |
79 RTCSessionDescription* localDescription(); | 79 RTCSessionDescription* localDescription(); |
80 | 80 |
81 ScriptPromise setRemoteDescription(ScriptState*, const RTCSessionDescription
Init&); | 81 ScriptPromise setRemoteDescription(ScriptState*, const RTCSessionDescription
Init&); |
82 ScriptPromise setRemoteDescription(ScriptState*, RTCSessionDescription*, Voi
dCallback*, RTCPeerConnectionErrorCallback*); | 82 ScriptPromise setRemoteDescription(ScriptState*, RTCSessionDescription*, Voi
dCallback*, RTCPeerConnectionErrorCallback*); |
83 RTCSessionDescription* remoteDescription(); | 83 RTCSessionDescription* remoteDescription(); |
84 | 84 |
85 String signalingState() const; | 85 String signalingState() const; |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 | 170 |
171 RefPtrWillBeMember<Event> m_event; | 171 RefPtrWillBeMember<Event> m_event; |
172 | 172 |
173 private: | 173 private: |
174 OwnPtr<BoolFunction> m_setupFunction; | 174 OwnPtr<BoolFunction> m_setupFunction; |
175 }; | 175 }; |
176 | 176 |
177 RTCPeerConnection(ExecutionContext*, RTCConfiguration*, WebMediaConstraints,
ExceptionState&); | 177 RTCPeerConnection(ExecutionContext*, RTCConfiguration*, WebMediaConstraints,
ExceptionState&); |
178 | 178 |
179 static RTCConfiguration* parseConfiguration(const Dictionary&, ExceptionStat
e&); | 179 static RTCConfiguration* parseConfiguration(const Dictionary&, ExceptionStat
e&); |
180 static RTCOfferOptions* parseOfferOptions(const Dictionary&, ExceptionState&
); | 180 static RTCOfferOptions* parseOfferOptions(const Dictionary&); |
181 | 181 |
182 void scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event>); | 182 void scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event>); |
183 void scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event>, PassOwnPtr<BoolFun
ction>); | 183 void scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event>, PassOwnPtr<BoolFun
ction>); |
184 void dispatchScheduledEvent(); | 184 void dispatchScheduledEvent(); |
185 bool hasLocalStreamWithTrackId(const String& trackId); | 185 bool hasLocalStreamWithTrackId(const String& trackId); |
186 | 186 |
187 void changeSignalingState(WebRTCPeerConnectionHandlerClient::SignalingState)
; | 187 void changeSignalingState(WebRTCPeerConnectionHandlerClient::SignalingState)
; |
188 void changeIceGatheringState(WebRTCPeerConnectionHandlerClient::ICEGathering
State); | 188 void changeIceGatheringState(WebRTCPeerConnectionHandlerClient::ICEGathering
State); |
189 // Changes the state immediately; does not fire an event. | 189 // Changes the state immediately; does not fire an event. |
190 // Returns true if the state was changed. | 190 // Returns true if the state was changed. |
(...skipping 15 matching lines...) Expand all Loading... |
206 Member<AsyncMethodRunner<RTCPeerConnection>> m_dispatchScheduledEventRunner; | 206 Member<AsyncMethodRunner<RTCPeerConnection>> m_dispatchScheduledEventRunner; |
207 HeapVector<Member<EventWrapper>> m_scheduledEvents; | 207 HeapVector<Member<EventWrapper>> m_scheduledEvents; |
208 | 208 |
209 bool m_stopped; | 209 bool m_stopped; |
210 bool m_closed; | 210 bool m_closed; |
211 }; | 211 }; |
212 | 212 |
213 } // namespace blink | 213 } // namespace blink |
214 | 214 |
215 #endif // RTCPeerConnection_h | 215 #endif // RTCPeerConnection_h |
OLD | NEW |