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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 MediaStreamVector getLocalStreams() const; | 106 MediaStreamVector getLocalStreams() const; |
107 | 107 |
108 MediaStreamVector getRemoteStreams() const; | 108 MediaStreamVector getRemoteStreams() const; |
109 | 109 |
110 MediaStream* getStreamById(const String& streamId); | 110 MediaStream* getStreamById(const String& streamId); |
111 | 111 |
112 void addStream(ExecutionContext*, MediaStream*, const Dictionary& mediaConst
raints, ExceptionState&); | 112 void addStream(ExecutionContext*, MediaStream*, const Dictionary& mediaConst
raints, ExceptionState&); |
113 | 113 |
114 void removeStream(MediaStream*, ExceptionState&); | 114 void removeStream(MediaStream*, ExceptionState&); |
115 | 115 |
116 void getStats(ExecutionContext*, RTCStatsCallback* successCallback, MediaStr
eamTrack* selector); | 116 ScriptPromise getStats(ScriptState*, RTCStatsCallback* successCallback, Medi
aStreamTrack* selector = nullptr); |
| 117 ScriptPromise getStats(ScriptState*, MediaStreamTrack* selector = nullptr); |
117 | 118 |
118 RTCDataChannel* createDataChannel(String label, const Dictionary& dataChanne
lDict, ExceptionState&); | 119 RTCDataChannel* createDataChannel(String label, const Dictionary& dataChanne
lDict, ExceptionState&); |
119 | 120 |
120 RTCDTMFSender* createDTMFSender(MediaStreamTrack*, ExceptionState&); | 121 RTCDTMFSender* createDTMFSender(MediaStreamTrack*, ExceptionState&); |
121 | 122 |
122 void close(ExceptionState&); | 123 void close(ExceptionState&); |
123 | 124 |
124 // We allow getStats after close, but not other calls or callbacks. | 125 // We allow getStats after close, but not other calls or callbacks. |
125 bool shouldFireDefaultCallbacks() { return !m_closed && !m_stopped; } | 126 bool shouldFireDefaultCallbacks() { return !m_closed && !m_stopped; } |
126 bool shouldFireGetStatsCallback() { return !m_stopped; } | 127 bool shouldFireGetStatsCallback() { return !m_stopped; } |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 | 215 |
215 bool m_stopped; | 216 bool m_stopped; |
216 bool m_closed; | 217 bool m_closed; |
217 | 218 |
218 bool m_hasDataChannels; // For RAPPOR metrics | 219 bool m_hasDataChannels; // For RAPPOR metrics |
219 }; | 220 }; |
220 | 221 |
221 } // namespace blink | 222 } // namespace blink |
222 | 223 |
223 #endif // RTCPeerConnection_h | 224 #endif // RTCPeerConnection_h |
OLD | NEW |