| 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/ActiveScriptWrappable.h" | 34 #include "bindings/core/v8/ActiveScriptWrappable.h" |
| 35 #include "bindings/core/v8/ScriptPromise.h" | 35 #include "bindings/core/v8/ScriptPromise.h" |
| 36 #include "core/dom/ActiveDOMObject.h" | 36 #include "core/dom/SuspendableObject.h" |
| 37 #include "modules/EventTargetModules.h" | 37 #include "modules/EventTargetModules.h" |
| 38 #include "modules/crypto/NormalizeAlgorithm.h" | 38 #include "modules/crypto/NormalizeAlgorithm.h" |
| 39 #include "modules/mediastream/MediaStream.h" | 39 #include "modules/mediastream/MediaStream.h" |
| 40 #include "modules/peerconnection/RTCIceCandidate.h" | 40 #include "modules/peerconnection/RTCIceCandidate.h" |
| 41 #include "platform/AsyncMethodRunner.h" | 41 #include "platform/AsyncMethodRunner.h" |
| 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 #include <memory> | 45 #include <memory> |
| 46 | 46 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 58 class RTCSessionDescriptionCallback; | 58 class RTCSessionDescriptionCallback; |
| 59 class RTCSessionDescriptionInit; | 59 class RTCSessionDescriptionInit; |
| 60 class RTCStatsCallback; | 60 class RTCStatsCallback; |
| 61 class ScriptState; | 61 class ScriptState; |
| 62 class VoidCallback; | 62 class VoidCallback; |
| 63 struct WebRTCConfiguration; | 63 struct WebRTCConfiguration; |
| 64 | 64 |
| 65 class RTCPeerConnection final : public EventTargetWithInlineData, | 65 class RTCPeerConnection final : public EventTargetWithInlineData, |
| 66 public WebRTCPeerConnectionHandlerClient, | 66 public WebRTCPeerConnectionHandlerClient, |
| 67 public ActiveScriptWrappable, | 67 public ActiveScriptWrappable, |
| 68 public ActiveDOMObject { | 68 public SuspendableObject { |
| 69 DEFINE_WRAPPERTYPEINFO(); | 69 DEFINE_WRAPPERTYPEINFO(); |
| 70 USING_GARBAGE_COLLECTED_MIXIN(RTCPeerConnection); | 70 USING_GARBAGE_COLLECTED_MIXIN(RTCPeerConnection); |
| 71 USING_PRE_FINALIZER(RTCPeerConnection, dispose); | 71 USING_PRE_FINALIZER(RTCPeerConnection, dispose); |
| 72 | 72 |
| 73 public: | 73 public: |
| 74 static RTCPeerConnection* create(ExecutionContext*, | 74 static RTCPeerConnection* create(ExecutionContext*, |
| 75 const RTCConfiguration&, | 75 const RTCConfiguration&, |
| 76 const Dictionary&, | 76 const Dictionary&, |
| 77 ExceptionState&); | 77 ExceptionState&); |
| 78 ~RTCPeerConnection() override; | 78 ~RTCPeerConnection() override; |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 void didAddRemoteStream(const WebMediaStream&) override; | 179 void didAddRemoteStream(const WebMediaStream&) override; |
| 180 void didRemoveRemoteStream(const WebMediaStream&) override; | 180 void didRemoveRemoteStream(const WebMediaStream&) override; |
| 181 void didAddRemoteDataChannel(WebRTCDataChannelHandler*) override; | 181 void didAddRemoteDataChannel(WebRTCDataChannelHandler*) override; |
| 182 void releasePeerConnectionHandler() override; | 182 void releasePeerConnectionHandler() override; |
| 183 void closePeerConnection() override; | 183 void closePeerConnection() override; |
| 184 | 184 |
| 185 // EventTarget | 185 // EventTarget |
| 186 const AtomicString& interfaceName() const override; | 186 const AtomicString& interfaceName() const override; |
| 187 ExecutionContext* getExecutionContext() const override; | 187 ExecutionContext* getExecutionContext() const override; |
| 188 | 188 |
| 189 // ActiveDOMObject | 189 // SuspendableObject |
| 190 void suspend() override; | 190 void suspend() override; |
| 191 void resume() override; | 191 void resume() override; |
| 192 void contextDestroyed() override; | 192 void contextDestroyed() override; |
| 193 | 193 |
| 194 // ScriptWrappable | 194 // ScriptWrappable |
| 195 // We keep the this object alive until either stopped or closed. | 195 // We keep the this object alive until either stopped or closed. |
| 196 bool hasPendingActivity() const final { return !m_closed && !m_stopped; } | 196 bool hasPendingActivity() const final { return !m_closed && !m_stopped; } |
| 197 | 197 |
| 198 DECLARE_VIRTUAL_TRACE(); | 198 DECLARE_VIRTUAL_TRACE(); |
| 199 | 199 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 | 255 |
| 256 bool m_stopped; | 256 bool m_stopped; |
| 257 bool m_closed; | 257 bool m_closed; |
| 258 | 258 |
| 259 bool m_hasDataChannels; // For RAPPOR metrics | 259 bool m_hasDataChannels; // For RAPPOR metrics |
| 260 }; | 260 }; |
| 261 | 261 |
| 262 } // namespace blink | 262 } // namespace blink |
| 263 | 263 |
| 264 #endif // RTCPeerConnection_h | 264 #endif // RTCPeerConnection_h |
| OLD | NEW |