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

Side by Side Diff: content/browser/webrtc/webrtc_internals.h

Issue 2727233002: Don't collect a log per peerconnection if webrtc-internals isn't open. (Closed)
Patch Set: Address comments, add tests Created 3 years, 9 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
« no previous file with comments | « no previous file | content/browser/webrtc/webrtc_internals.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_WEBRTC_WEBRTC_INTERNALS_H_ 5 #ifndef CONTENT_BROWSER_WEBRTC_WEBRTC_INTERNALS_H_
6 #define CONTENT_BROWSER_WEBRTC_WEBRTC_INTERNALS_H_ 6 #define CONTENT_BROWSER_WEBRTC_WEBRTC_INTERNALS_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <queue> 9 #include <queue>
10 #include <string> 10 #include <string>
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 // impose/release a block on suspending the current application for power 168 // impose/release a block on suspending the current application for power
169 // saving. 169 // saving.
170 void CreateOrReleasePowerSaveBlocker(); 170 void CreateOrReleasePowerSaveBlocker();
171 171
172 // Called on a timer to deliver updates to javascript. 172 // Called on a timer to deliver updates to javascript.
173 // We throttle and bulk together updates to avoid DOS like scenarios where 173 // We throttle and bulk together updates to avoid DOS like scenarios where
174 // a page uses a lot of peerconnection instances with many event 174 // a page uses a lot of peerconnection instances with many event
175 // notifications. 175 // notifications.
176 void ProcessPendingUpdates(); 176 void ProcessPendingUpdates();
177 177
178 base::DictionaryValue* FindRecord(base::ProcessId pid,
179 int lid,
180 size_t* index = nullptr);
181
178 base::ObserverList<WebRTCInternalsUIObserver> observers_; 182 base::ObserverList<WebRTCInternalsUIObserver> observers_;
179 183
180 // |peer_connection_data_| is a list containing all the PeerConnection 184 // |peer_connection_data_| is a list containing all the PeerConnection
181 // updates. 185 // updates.
182 // Each item of the list represents the data for one PeerConnection, which 186 // Each item of the list represents the data for one PeerConnection, which
183 // contains these fields: 187 // contains these fields:
184 // "rid" -- the renderer id. 188 // "rid" -- the renderer id.
185 // "pid" -- OS process id of the renderer that creates the PeerConnection. 189 // "pid" -- OS process id of the renderer that creates the PeerConnection.
186 // "lid" -- local Id assigned to the PeerConnection. 190 // "lid" -- local Id assigned to the PeerConnection.
187 // "url" -- url of the web page that created the PeerConnection. 191 // "url" -- url of the web page that created the PeerConnection.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 std::queue<PendingUpdate> pending_updates_; 256 std::queue<PendingUpdate> pending_updates_;
253 const int aggregate_updates_ms_; 257 const int aggregate_updates_ms_;
254 258
255 // Weak factory for this object that we use for bulking up updates. 259 // Weak factory for this object that we use for bulking up updates.
256 base::WeakPtrFactory<WebRTCInternals> weak_factory_; 260 base::WeakPtrFactory<WebRTCInternals> weak_factory_;
257 }; 261 };
258 262
259 } // namespace content 263 } // namespace content
260 264
261 #endif // CONTENT_BROWSER_WEBRTC_WEBRTC_INTERNALS_H_ 265 #endif // CONTENT_BROWSER_WEBRTC_WEBRTC_INTERNALS_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/webrtc/webrtc_internals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698