| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 ScriptPromise setRemoteDescription(ScriptState*, | 101 ScriptPromise setRemoteDescription(ScriptState*, |
| 102 const RTCSessionDescriptionInit&); | 102 const RTCSessionDescriptionInit&); |
| 103 ScriptPromise setRemoteDescription(ScriptState*, | 103 ScriptPromise setRemoteDescription(ScriptState*, |
| 104 const RTCSessionDescriptionInit&, | 104 const RTCSessionDescriptionInit&, |
| 105 VoidCallback*, | 105 VoidCallback*, |
| 106 RTCPeerConnectionErrorCallback*); | 106 RTCPeerConnectionErrorCallback*); |
| 107 RTCSessionDescription* remoteDescription(); | 107 RTCSessionDescription* remoteDescription(); |
| 108 | 108 |
| 109 String signalingState() const; | 109 String signalingState() const; |
| 110 | 110 |
| 111 void setConfiguration(ExecutionContext*, | 111 void setConfiguration(ScriptState*, const RTCConfiguration&, ExceptionState&); |
| 112 const RTCConfiguration&, | |
| 113 ExceptionState&); | |
| 114 | 112 |
| 115 // Certificate management | 113 // Certificate management |
| 116 // http://w3c.github.io/webrtc-pc/#sec.cert-mgmt | 114 // http://w3c.github.io/webrtc-pc/#sec.cert-mgmt |
| 117 static ScriptPromise generateCertificate( | 115 static ScriptPromise generateCertificate( |
| 118 ScriptState*, | 116 ScriptState*, |
| 119 const AlgorithmIdentifier& keygenAlgorithm, | 117 const AlgorithmIdentifier& keygenAlgorithm, |
| 120 ExceptionState&); | 118 ExceptionState&); |
| 121 | 119 |
| 122 ScriptPromise addIceCandidate(ScriptState*, | 120 ScriptPromise addIceCandidate(ScriptState*, |
| 123 const RTCIceCandidateInitOrRTCIceCandidate&); | 121 const RTCIceCandidateInitOrRTCIceCandidate&); |
| 124 ScriptPromise addIceCandidate(ScriptState*, | 122 ScriptPromise addIceCandidate(ScriptState*, |
| 125 const RTCIceCandidateInitOrRTCIceCandidate&, | 123 const RTCIceCandidateInitOrRTCIceCandidate&, |
| 126 VoidCallback*, | 124 VoidCallback*, |
| 127 RTCPeerConnectionErrorCallback*); | 125 RTCPeerConnectionErrorCallback*); |
| 128 | 126 |
| 129 String iceGatheringState() const; | 127 String iceGatheringState() const; |
| 130 | 128 |
| 131 String iceConnectionState() const; | 129 String iceConnectionState() const; |
| 132 | 130 |
| 133 MediaStreamVector getLocalStreams() const; | 131 MediaStreamVector getLocalStreams() const; |
| 134 | 132 |
| 135 MediaStreamVector getRemoteStreams() const; | 133 MediaStreamVector getRemoteStreams() const; |
| 136 | 134 |
| 137 MediaStream* getStreamById(const String& streamId); | 135 MediaStream* getStreamById(const String& streamId); |
| 138 | 136 |
| 139 void addStream(ExecutionContext*, | 137 void addStream(ScriptState*, |
| 140 MediaStream*, | 138 MediaStream*, |
| 141 const Dictionary& mediaConstraints, | 139 const Dictionary& mediaConstraints, |
| 142 ExceptionState&); | 140 ExceptionState&); |
| 143 | 141 |
| 144 void removeStream(MediaStream*, ExceptionState&); | 142 void removeStream(MediaStream*, ExceptionState&); |
| 145 | 143 |
| 146 ScriptPromise getStats(ScriptState*, | 144 ScriptPromise getStats(ScriptState*, |
| 147 RTCStatsCallback* successCallback, | 145 RTCStatsCallback* successCallback, |
| 148 MediaStreamTrack* selector = nullptr); | 146 MediaStreamTrack* selector = nullptr); |
| 149 ScriptPromise getStats(ScriptState*); | 147 ScriptPromise getStats(ScriptState*); |
| 150 | 148 |
| 151 RTCDataChannel* createDataChannel(ExecutionContext*, | 149 RTCDataChannel* createDataChannel(ScriptState*, |
| 152 String label, | 150 String label, |
| 153 const Dictionary& dataChannelDict, | 151 const Dictionary& dataChannelDict, |
| 154 ExceptionState&); | 152 ExceptionState&); |
| 155 | 153 |
| 156 RTCDTMFSender* createDTMFSender(MediaStreamTrack*, ExceptionState&); | 154 RTCDTMFSender* createDTMFSender(MediaStreamTrack*, ExceptionState&); |
| 157 | 155 |
| 158 void close(ExceptionState&); | 156 void close(ExceptionState&); |
| 159 | 157 |
| 160 // We allow getStats after close, but not other calls or callbacks. | 158 // We allow getStats after close, but not other calls or callbacks. |
| 161 bool shouldFireDefaultCallbacks() { return !m_closed && !m_stopped; } | 159 bool shouldFireDefaultCallbacks() { return !m_closed && !m_stopped; } |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 | 252 |
| 255 bool m_stopped; | 253 bool m_stopped; |
| 256 bool m_closed; | 254 bool m_closed; |
| 257 | 255 |
| 258 bool m_hasDataChannels; // For RAPPOR metrics | 256 bool m_hasDataChannels; // For RAPPOR metrics |
| 259 }; | 257 }; |
| 260 | 258 |
| 261 } // namespace blink | 259 } // namespace blink |
| 262 | 260 |
| 263 #endif // RTCPeerConnection_h | 261 #endif // RTCPeerConnection_h |
| OLD | NEW |