Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(909)

Side by Side Diff: third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.h

Issue 2156063002: Preparation for new Promise-based RTCPeerConnection.getStats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replaced TODO /w comment what happens if function != 1 args Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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*, ScriptValue);
117 ScriptPromise getStats(ScriptState*, RTCStatsCallback* successCallback, Medi aStreamTrack* selector = nullptr);
118 ScriptPromise getStats(ScriptState*, MediaStreamTrack* selector = nullptr);
117 119
118 RTCDataChannel* createDataChannel(String label, const Dictionary& dataChanne lDict, ExceptionState&); 120 RTCDataChannel* createDataChannel(String label, const Dictionary& dataChanne lDict, ExceptionState&);
119 121
120 RTCDTMFSender* createDTMFSender(MediaStreamTrack*, ExceptionState&); 122 RTCDTMFSender* createDTMFSender(MediaStreamTrack*, ExceptionState&);
121 123
122 void close(ExceptionState&); 124 void close(ExceptionState&);
123 125
124 // We allow getStats after close, but not other calls or callbacks. 126 // We allow getStats after close, but not other calls or callbacks.
125 bool shouldFireDefaultCallbacks() { return !m_closed && !m_stopped; } 127 bool shouldFireDefaultCallbacks() { return !m_closed && !m_stopped; }
126 bool shouldFireGetStatsCallback() { return !m_stopped; } 128 bool shouldFireGetStatsCallback() { return !m_stopped; }
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 216
215 bool m_stopped; 217 bool m_stopped;
216 bool m_closed; 218 bool m_closed;
217 219
218 bool m_hasDataChannels; // For RAPPOR metrics 220 bool m_hasDataChannels; // For RAPPOR metrics
219 }; 221 };
220 222
221 } // namespace blink 223 } // namespace blink
222 224
223 #endif // RTCPeerConnection_h 225 #endif // RTCPeerConnection_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698