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

Side by Side Diff: content/public/browser/render_process_host.h

Issue 1855193002: Move the call to enable the WebRTC event log from PeerConnectionFactory to PeerConnection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed content/public/ interface, used RenderProcessHost instead. Created 4 years, 7 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_
6 #define CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ 6 #define CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 // Checks that the given renderer can request |url|, if not it sets it to 213 // Checks that the given renderer can request |url|, if not it sets it to
214 // about:blank. 214 // about:blank.
215 // |empty_allowed| must be set to false for navigations for security reasons. 215 // |empty_allowed| must be set to false for navigations for security reasons.
216 virtual void FilterURL(bool empty_allowed, GURL* url) = 0; 216 virtual void FilterURL(bool empty_allowed, GURL* url) = 0;
217 217
218 #if defined(ENABLE_WEBRTC) 218 #if defined(ENABLE_WEBRTC)
219 virtual void EnableAudioDebugRecordings(const base::FilePath& file) = 0; 219 virtual void EnableAudioDebugRecordings(const base::FilePath& file) = 0;
220 virtual void DisableAudioDebugRecordings() = 0; 220 virtual void DisableAudioDebugRecordings() = 0;
221 221
222 virtual void EnableEventLogRecordings(const base::FilePath& file) = 0;
223 virtual void DisableEventLogRecordings() = 0;
224
225 // When set, |callback| receives log messages regarding, for example, media 222 // When set, |callback| receives log messages regarding, for example, media
226 // devices (webcams, mics, etc) that were initially requested in the render 223 // devices (webcams, mics, etc) that were initially requested in the render
227 // process associated with this RenderProcessHost. 224 // process associated with this RenderProcessHost.
228 virtual void SetWebRtcLogMessageCallback( 225 virtual void SetWebRtcLogMessageCallback(
229 base::Callback<void(const std::string&)> callback) = 0; 226 base::Callback<void(const std::string&)> callback) = 0;
230 virtual void ClearWebRtcLogMessageCallback() = 0; 227 virtual void ClearWebRtcLogMessageCallback() = 0;
231 228
232 typedef base::Callback<void(std::unique_ptr<uint8_t[]> packet_header, 229 typedef base::Callback<void(std::unique_ptr<uint8_t[]> packet_header,
233 size_t header_length, 230 size_t header_length,
234 size_t packet_length, 231 size_t packet_length,
235 bool incoming)> 232 bool incoming)>
236 WebRtcRtpPacketCallback; 233 WebRtcRtpPacketCallback;
237 234
238 typedef base::Callback<void(bool incoming, bool outgoing)> 235 typedef base::Callback<void(bool incoming, bool outgoing)>
239 WebRtcStopRtpDumpCallback; 236 WebRtcStopRtpDumpCallback;
240 237
241 // Starts passing RTP packets to |packet_callback| and returns the callback 238 // Starts passing RTP packets to |packet_callback| and returns the callback
242 // used to stop dumping. 239 // used to stop dumping.
243 virtual WebRtcStopRtpDumpCallback StartRtpDump( 240 virtual WebRtcStopRtpDumpCallback StartRtpDump(
244 bool incoming, 241 bool incoming,
245 bool outgoing, 242 bool outgoing,
246 const WebRtcRtpPacketCallback& packet_callback) = 0; 243 const WebRtcRtpPacketCallback& packet_callback) = 0;
244
245 // Register callbacks to handle starting and stopping the WebRTC event log
246 // functionality from the chrome://webrtc-internals page. Only one handler can
247 // be registered.
248 using EventLogStartFunc = base::Callback<void(const base::FilePath&)>;
249 using EventLogStopFunc = base::Callback<void()>;
250 virtual void RegisterEventLogHandler(
251 const EventLogStartFunc& start_logging_callback,
252 const EventLogStopFunc& stop_logging_callback) = 0;
253
254 // Register callback functions to receive calls when PeerConnections are
255 // added or removed.
256 using PeerConnectionAddedFunc = base::Callback<void(int)>;
257 using PeerConnectionRemovedFunc = base::Callback<void(int)>;
258 virtual void RegisterPeerConnectionCallbacks(
259 const PeerConnectionAddedFunc& pc_added_callback,
260 const PeerConnectionRemovedFunc& pc_removed_callback) = 0;
247 #endif 261 #endif
248 262
249 // Tells the ResourceDispatcherHost to resume a deferred navigation without 263 // Tells the ResourceDispatcherHost to resume a deferred navigation without
250 // transferring it to a new renderer process. 264 // transferring it to a new renderer process.
251 virtual void ResumeDeferredNavigation(const GlobalRequestID& request_id) = 0; 265 virtual void ResumeDeferredNavigation(const GlobalRequestID& request_id) = 0;
252 266
253 // Notifies the renderer that the timezone configuration of the system might 267 // Notifies the renderer that the timezone configuration of the system might
254 // have changed. 268 // have changed.
255 virtual void NotifyTimezoneChange(const std::string& zone_id) = 0; 269 virtual void NotifyTimezoneChange(const std::string& zone_id) = 0;
256 270
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 static void SetMaxRendererProcessCount(size_t count); 369 static void SetMaxRendererProcessCount(size_t count);
356 370
357 // Returns the current maximum number of renderer process hosts kept by the 371 // Returns the current maximum number of renderer process hosts kept by the
358 // content module. 372 // content module.
359 static size_t GetMaxRendererProcessCount(); 373 static size_t GetMaxRendererProcessCount();
360 }; 374 };
361 375
362 } // namespace content. 376 } // namespace content.
363 377
364 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ 378 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698