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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 , public WebRTCPeerConnectionHandlerClient | 60 , public WebRTCPeerConnectionHandlerClient |
61 , public EventTargetWithInlineData | 61 , public EventTargetWithInlineData |
62 , public ActiveDOMObject { | 62 , public ActiveDOMObject { |
63 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollectedWi
llBeGarbageCollectedFinalized<RTCPeerConnection>); | 63 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollectedWi
llBeGarbageCollectedFinalized<RTCPeerConnection>); |
64 DEFINE_WRAPPERTYPEINFO(); | 64 DEFINE_WRAPPERTYPEINFO(); |
65 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RTCPeerConnection); | 65 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RTCPeerConnection); |
66 public: | 66 public: |
67 static RTCPeerConnection* create(ExecutionContext*, const Dictionary&, const
Dictionary&, ExceptionState&); | 67 static RTCPeerConnection* create(ExecutionContext*, const Dictionary&, const
Dictionary&, ExceptionState&); |
68 virtual ~RTCPeerConnection(); | 68 virtual ~RTCPeerConnection(); |
69 | 69 |
70 void createOffer(PassOwnPtrWillBeRawPtr<RTCSessionDescriptionCallback>, Pass
OwnPtrWillBeRawPtr<RTCErrorCallback>, const Dictionary&, ExceptionState&); | 70 void createOffer(RTCSessionDescriptionCallback*, RTCErrorCallback*, const Di
ctionary&, ExceptionState&); |
71 | 71 |
72 void createAnswer(PassOwnPtrWillBeRawPtr<RTCSessionDescriptionCallback>, Pas
sOwnPtrWillBeRawPtr<RTCErrorCallback>, const Dictionary&, ExceptionState&); | 72 void createAnswer(RTCSessionDescriptionCallback*, RTCErrorCallback*, const D
ictionary&, ExceptionState&); |
73 | 73 |
74 void setLocalDescription(RTCSessionDescription*, PassOwnPtrWillBeRawPtr<Void
Callback>, PassOwnPtrWillBeRawPtr<RTCErrorCallback>, ExceptionState&); | 74 void setLocalDescription(RTCSessionDescription*, VoidCallback*, RTCErrorCall
back*, ExceptionState&); |
75 RTCSessionDescription* localDescription(ExceptionState&); | 75 RTCSessionDescription* localDescription(ExceptionState&); |
76 | 76 |
77 void setRemoteDescription(RTCSessionDescription*, PassOwnPtrWillBeRawPtr<Voi
dCallback>, PassOwnPtrWillBeRawPtr<RTCErrorCallback>, ExceptionState&); | 77 void setRemoteDescription(RTCSessionDescription*, VoidCallback*, RTCErrorCal
lback*, ExceptionState&); |
78 RTCSessionDescription* remoteDescription(ExceptionState&); | 78 RTCSessionDescription* remoteDescription(ExceptionState&); |
79 | 79 |
80 String signalingState() const; | 80 String signalingState() const; |
81 | 81 |
82 void updateIce(const Dictionary& rtcConfiguration, const Dictionary& mediaCo
nstraints, ExceptionState&); | 82 void updateIce(const Dictionary& rtcConfiguration, const Dictionary& mediaCo
nstraints, ExceptionState&); |
83 | 83 |
84 // DEPRECATED | 84 // DEPRECATED |
85 void addIceCandidate(RTCIceCandidate*, ExceptionState&); | 85 void addIceCandidate(RTCIceCandidate*, ExceptionState&); |
86 | 86 |
87 void addIceCandidate(RTCIceCandidate*, PassOwnPtrWillBeRawPtr<VoidCallback>,
PassOwnPtrWillBeRawPtr<RTCErrorCallback>, ExceptionState&); | 87 void addIceCandidate(RTCIceCandidate*, VoidCallback*, RTCErrorCallback*, Exc
eptionState&); |
88 | 88 |
89 String iceGatheringState() const; | 89 String iceGatheringState() const; |
90 | 90 |
91 String iceConnectionState() const; | 91 String iceConnectionState() const; |
92 | 92 |
93 MediaStreamVector getLocalStreams() const; | 93 MediaStreamVector getLocalStreams() const; |
94 | 94 |
95 MediaStreamVector getRemoteStreams() const; | 95 MediaStreamVector getRemoteStreams() const; |
96 | 96 |
97 MediaStream* getStreamById(const String& streamId); | 97 MediaStream* getStreamById(const String& streamId); |
98 | 98 |
99 void addStream(MediaStream*, const Dictionary& mediaConstraints, ExceptionSt
ate&); | 99 void addStream(MediaStream*, const Dictionary& mediaConstraints, ExceptionSt
ate&); |
100 | 100 |
101 void removeStream(MediaStream*, ExceptionState&); | 101 void removeStream(MediaStream*, ExceptionState&); |
102 | 102 |
103 void getStats(PassOwnPtrWillBeRawPtr<RTCStatsCallback> successCallback, Medi
aStreamTrack* selector); | 103 void getStats(RTCStatsCallback* successCallback, MediaStreamTrack* selector)
; |
104 | 104 |
105 RTCDataChannel* createDataChannel(String label, const Dictionary& dataChanne
lDict, ExceptionState&); | 105 RTCDataChannel* createDataChannel(String label, const Dictionary& dataChanne
lDict, ExceptionState&); |
106 | 106 |
107 RTCDTMFSender* createDTMFSender(MediaStreamTrack*, ExceptionState&); | 107 RTCDTMFSender* createDTMFSender(MediaStreamTrack*, ExceptionState&); |
108 | 108 |
109 void close(ExceptionState&); | 109 void close(ExceptionState&); |
110 | 110 |
111 // We allow getStats after close, but not other calls or callbacks. | 111 // We allow getStats after close, but not other calls or callbacks. |
112 bool shouldFireDefaultCallbacks() { return !m_closed && !m_stopped; } | 112 bool shouldFireDefaultCallbacks() { return !m_closed && !m_stopped; } |
113 bool shouldFireGetStatsCallback() { return !m_stopped; } | 113 bool shouldFireGetStatsCallback() { return !m_stopped; } |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 AsyncMethodRunner<RTCPeerConnection> m_dispatchScheduledEventRunner; | 179 AsyncMethodRunner<RTCPeerConnection> m_dispatchScheduledEventRunner; |
180 WillBeHeapVector<RefPtrWillBeMember<Event> > m_scheduledEvents; | 180 WillBeHeapVector<RefPtrWillBeMember<Event> > m_scheduledEvents; |
181 | 181 |
182 bool m_stopped; | 182 bool m_stopped; |
183 bool m_closed; | 183 bool m_closed; |
184 }; | 184 }; |
185 | 185 |
186 } // namespace blink | 186 } // namespace blink |
187 | 187 |
188 #endif // RTCPeerConnection_h | 188 #endif // RTCPeerConnection_h |
OLD | NEW |