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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 57 |
58 class RTCPeerConnection final | 58 class RTCPeerConnection final |
59 : public RefCountedGarbageCollectedEventTargetWithInlineData<RTCPeerConnecti
on> | 59 : public RefCountedGarbageCollectedEventTargetWithInlineData<RTCPeerConnecti
on> |
60 , public WebRTCPeerConnectionHandlerClient | 60 , public WebRTCPeerConnectionHandlerClient |
61 , public ActiveDOMObject { | 61 , public ActiveDOMObject { |
62 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(RTCPeerConnection); | 62 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(RTCPeerConnection); |
63 DEFINE_WRAPPERTYPEINFO(); | 63 DEFINE_WRAPPERTYPEINFO(); |
64 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RTCPeerConnection); | 64 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RTCPeerConnection); |
65 public: | 65 public: |
66 static RTCPeerConnection* create(ExecutionContext*, const Dictionary&, const
Dictionary&, ExceptionState&); | 66 static RTCPeerConnection* create(ExecutionContext*, const Dictionary&, const
Dictionary&, ExceptionState&); |
67 virtual ~RTCPeerConnection(); | 67 ~RTCPeerConnection() override; |
68 | 68 |
69 void createOffer(RTCSessionDescriptionCallback*, RTCErrorCallback*, const Di
ctionary&, ExceptionState&); | 69 void createOffer(RTCSessionDescriptionCallback*, RTCErrorCallback*, const Di
ctionary&, ExceptionState&); |
70 | 70 |
71 void createAnswer(RTCSessionDescriptionCallback*, RTCErrorCallback*, const D
ictionary&, ExceptionState&); | 71 void createAnswer(RTCSessionDescriptionCallback*, RTCErrorCallback*, const D
ictionary&, ExceptionState&); |
72 | 72 |
73 void setLocalDescription(RTCSessionDescription*, VoidCallback*, RTCErrorCall
back*, ExceptionState&); | 73 void setLocalDescription(RTCSessionDescription*, VoidCallback*, RTCErrorCall
back*, ExceptionState&); |
74 RTCSessionDescription* localDescription(ExceptionState&); | 74 RTCSessionDescription* localDescription(ExceptionState&); |
75 | 75 |
76 void setRemoteDescription(RTCSessionDescription*, VoidCallback*, RTCErrorCal
lback*, ExceptionState&); | 76 void setRemoteDescription(RTCSessionDescription*, VoidCallback*, RTCErrorCal
lback*, ExceptionState&); |
77 RTCSessionDescription* remoteDescription(ExceptionState&); | 77 RTCSessionDescription* remoteDescription(ExceptionState&); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 113 |
114 DEFINE_ATTRIBUTE_EVENT_LISTENER(negotiationneeded); | 114 DEFINE_ATTRIBUTE_EVENT_LISTENER(negotiationneeded); |
115 DEFINE_ATTRIBUTE_EVENT_LISTENER(icecandidate); | 115 DEFINE_ATTRIBUTE_EVENT_LISTENER(icecandidate); |
116 DEFINE_ATTRIBUTE_EVENT_LISTENER(signalingstatechange); | 116 DEFINE_ATTRIBUTE_EVENT_LISTENER(signalingstatechange); |
117 DEFINE_ATTRIBUTE_EVENT_LISTENER(addstream); | 117 DEFINE_ATTRIBUTE_EVENT_LISTENER(addstream); |
118 DEFINE_ATTRIBUTE_EVENT_LISTENER(removestream); | 118 DEFINE_ATTRIBUTE_EVENT_LISTENER(removestream); |
119 DEFINE_ATTRIBUTE_EVENT_LISTENER(iceconnectionstatechange); | 119 DEFINE_ATTRIBUTE_EVENT_LISTENER(iceconnectionstatechange); |
120 DEFINE_ATTRIBUTE_EVENT_LISTENER(datachannel); | 120 DEFINE_ATTRIBUTE_EVENT_LISTENER(datachannel); |
121 | 121 |
122 // WebRTCPeerConnectionHandlerClient | 122 // WebRTCPeerConnectionHandlerClient |
123 virtual void negotiationNeeded() override; | 123 void negotiationNeeded() override; |
124 virtual void didGenerateICECandidate(const WebRTCICECandidate&) override; | 124 void didGenerateICECandidate(const WebRTCICECandidate&) override; |
125 virtual void didChangeSignalingState(SignalingState) override; | 125 void didChangeSignalingState(SignalingState) override; |
126 virtual void didChangeICEGatheringState(ICEGatheringState) override; | 126 void didChangeICEGatheringState(ICEGatheringState) override; |
127 virtual void didChangeICEConnectionState(ICEConnectionState) override; | 127 void didChangeICEConnectionState(ICEConnectionState) override; |
128 virtual void didAddRemoteStream(const WebMediaStream&) override; | 128 void didAddRemoteStream(const WebMediaStream&) override; |
129 virtual void didRemoveRemoteStream(const WebMediaStream&) override; | 129 void didRemoveRemoteStream(const WebMediaStream&) override; |
130 virtual void didAddRemoteDataChannel(WebRTCDataChannelHandler*) override; | 130 void didAddRemoteDataChannel(WebRTCDataChannelHandler*) override; |
131 virtual void releasePeerConnectionHandler() override; | 131 void releasePeerConnectionHandler() override; |
132 virtual void closePeerConnection() override; | 132 void closePeerConnection() override; |
133 | 133 |
134 // EventTarget | 134 // EventTarget |
135 virtual const AtomicString& interfaceName() const override; | 135 const AtomicString& interfaceName() const override; |
136 virtual ExecutionContext* executionContext() const override; | 136 ExecutionContext* executionContext() const override; |
137 | 137 |
138 // ActiveDOMObject | 138 // ActiveDOMObject |
139 virtual void suspend() override; | 139 void suspend() override; |
140 virtual void resume() override; | 140 void resume() override; |
141 virtual void stop() override; | 141 void stop() override; |
142 // We keep the this object alive until either stopped or closed. | 142 // We keep the this object alive until either stopped or closed. |
143 virtual bool hasPendingActivity() const override | 143 bool hasPendingActivity() const override |
144 { | 144 { |
145 return !m_closed && !m_stopped; | 145 return !m_closed && !m_stopped; |
146 } | 146 } |
147 | 147 |
148 // Oilpan: need to eagerly finalize m_peerHandler | 148 // Oilpan: need to eagerly finalize m_peerHandler |
149 EAGERLY_FINALIZE(); | 149 EAGERLY_FINALIZE(); |
150 DECLARE_VIRTUAL_TRACE(); | 150 DECLARE_VIRTUAL_TRACE(); |
151 | 151 |
152 private: | 152 private: |
153 RTCPeerConnection(ExecutionContext*, RTCConfiguration*, WebMediaConstraints,
ExceptionState&); | 153 RTCPeerConnection(ExecutionContext*, RTCConfiguration*, WebMediaConstraints,
ExceptionState&); |
(...skipping 25 matching lines...) Expand all 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 |