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

Unified Diff: content/renderer/media/peer_connection_tracker.h

Issue 1676043002: Deliver webrtc-internals updates in bulk, every 500ms at most. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/peer_connection_tracker.h
diff --git a/content/renderer/media/peer_connection_tracker.h b/content/renderer/media/peer_connection_tracker.h
index 63c55145e357fcb4736dfb76a358b211d638cd85..7828231269a500623214389ceefc9207545c00e0 100644
--- a/content/renderer/media/peer_connection_tracker.h
+++ b/content/renderer/media/peer_connection_tracker.h
@@ -163,16 +163,21 @@ class CONTENT_EXPORT PeerConnectionTracker
private:
// Assign a local ID to a peer connection so that the browser process can
// uniquely identify a peer connection in the renderer process.
+ // The return value will always be positive.
int GetNextLocalID();
+ // Looks up a handler in our map and if found, returns its ID. If the handler
+ // is not registered, the return value will be -1.
+ int GetLocalIDForHandler(RTCPeerConnectionHandler* handler) const;
+
// IPC Message handler for getting all stats.
void OnGetAllStats();
// Called when the browser process reports a suspend event from the OS.
void OnSuspend();
- void SendPeerConnectionUpdate(RTCPeerConnectionHandler* pc_handler,
- const std::string& callback_type,
+ void SendPeerConnectionUpdate(int local_id,
Henrik Grunell 2016/02/08 09:52:08 Nit: Would be great to add a comment for this func
tommi (sloooow) - chröme 2016/02/08 13:50:23 Done.
Henrik Grunell 2016/02/09 08:18:11 Great comment. Thanks!
+ const char* callback_type,
const std::string& value);
// This map stores the local ID assigned to each RTCPeerConnectionHandler.

Powered by Google App Engine
This is Rietveld 408576698