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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.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: Addressed review comments by ncarter and grunell. Created 4 years, 6 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_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <map> 11 #include <map>
12 #include <memory> 12 #include <memory>
13 #include <queue> 13 #include <queue>
14 #include <string> 14 #include <string>
15 15
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "base/memory/ref_counted.h" 17 #include "base/memory/ref_counted.h"
18 #include "base/observer_list.h" 18 #include "base/observer_list.h"
19 #include "base/process/process.h" 19 #include "base/process/process.h"
20 #include "base/synchronization/waitable_event.h" 20 #include "base/synchronization/waitable_event.h"
21 #include "build/build_config.h" 21 #include "build/build_config.h"
22 #include "content/browser/child_process_launcher.h" 22 #include "content/browser/child_process_launcher.h"
23 #include "content/browser/dom_storage/session_storage_namespace_impl.h" 23 #include "content/browser/dom_storage/session_storage_namespace_impl.h"
24 #include "content/browser/media/webrtc/webrtc_eventlog_host.h"
24 #include "content/browser/power_monitor_message_broadcaster.h" 25 #include "content/browser/power_monitor_message_broadcaster.h"
25 #include "content/common/content_export.h" 26 #include "content/common/content_export.h"
26 #include "content/common/mojo/service_registry_impl.h" 27 #include "content/common/mojo/service_registry_impl.h"
27 #include "content/public/browser/render_process_host.h" 28 #include "content/public/browser/render_process_host.h"
28 #include "ipc/ipc_channel_proxy.h" 29 #include "ipc/ipc_channel_proxy.h"
29 #include "ipc/ipc_platform_file.h" 30 #include "ipc/ipc_platform_file.h"
30 #include "mojo/public/cpp/bindings/interface_ptr.h" 31 #include "mojo/public/cpp/bindings/interface_ptr.h"
31 #include "ui/gfx/gpu_memory_buffer.h" 32 #include "ui/gfx/gpu_memory_buffer.h"
32 #include "ui/gl/gpu_switching_observer.h" 33 #include "ui/gl/gpu_switching_observer.h"
33 34
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 bool SuddenTerminationAllowed() const override; 137 bool SuddenTerminationAllowed() const override;
137 IPC::ChannelProxy* GetChannel() override; 138 IPC::ChannelProxy* GetChannel() override;
138 void AddFilter(BrowserMessageFilter* filter) override; 139 void AddFilter(BrowserMessageFilter* filter) override;
139 bool FastShutdownForPageCount(size_t count) override; 140 bool FastShutdownForPageCount(size_t count) override;
140 bool FastShutdownStarted() const override; 141 bool FastShutdownStarted() const override;
141 base::TimeDelta GetChildProcessIdleTime() const override; 142 base::TimeDelta GetChildProcessIdleTime() const override;
142 void FilterURL(bool empty_allowed, GURL* url) override; 143 void FilterURL(bool empty_allowed, GURL* url) override;
143 #if defined(ENABLE_WEBRTC) 144 #if defined(ENABLE_WEBRTC)
144 void EnableAudioDebugRecordings(const base::FilePath& file) override; 145 void EnableAudioDebugRecordings(const base::FilePath& file) override;
145 void DisableAudioDebugRecordings() override; 146 void DisableAudioDebugRecordings() override;
146 void EnableEventLogRecordings(const base::FilePath& file) override;
147 void DisableEventLogRecordings() override;
148 void SetWebRtcLogMessageCallback( 147 void SetWebRtcLogMessageCallback(
149 base::Callback<void(const std::string&)> callback) override; 148 base::Callback<void(const std::string&)> callback) override;
150 void ClearWebRtcLogMessageCallback() override; 149 void ClearWebRtcLogMessageCallback() override;
151 WebRtcStopRtpDumpCallback StartRtpDump( 150 WebRtcStopRtpDumpCallback StartRtpDump(
152 bool incoming, 151 bool incoming,
153 bool outgoing, 152 bool outgoing,
154 const WebRtcRtpPacketCallback& packet_callback) override; 153 const WebRtcRtpPacketCallback& packet_callback) override;
154
155 bool StartWebRTCEventLog(const base::FilePath& file_path) override;
156 bool StopWebRTCEventLog() override;
ncarter (slow) 2016/05/25 21:28:58 Move these up, to keep them in order with the inte
Ivo-OOO until feb 6 2016/05/30 15:04:15 Done, moved the implementation in the .cc as well.
155 #endif 157 #endif
156 void ResumeDeferredNavigation(const GlobalRequestID& request_id) override; 158 void ResumeDeferredNavigation(const GlobalRequestID& request_id) override;
157 void NotifyTimezoneChange(const std::string& timezone) override; 159 void NotifyTimezoneChange(const std::string& timezone) override;
158 ServiceRegistry* GetServiceRegistry() override; 160 ServiceRegistry* GetServiceRegistry() override;
159 shell::Connection* GetChildConnection() override; 161 shell::Connection* GetChildConnection() override;
160 std::unique_ptr<base::SharedPersistentMemoryAllocator> TakeMetricsAllocator() 162 std::unique_ptr<base::SharedPersistentMemoryAllocator> TakeMetricsAllocator()
161 override; 163 override;
162 const base::TimeTicks& GetInitTimeForNavigationMetrics() const override; 164 const base::TimeTicks& GetInitTimeForNavigationMetrics() const override;
163 #if defined(ENABLE_BROWSER_CDMS) 165 #if defined(ENABLE_BROWSER_CDMS)
164 scoped_refptr<media::MediaKeys> GetCdm(int render_frame_id, 166 scoped_refptr<media::MediaKeys> GetCdm(int render_frame_id,
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 void CreateSharedRendererHistogramAllocator(); 336 void CreateSharedRendererHistogramAllocator();
335 337
336 // Handle termination of our process. 338 // Handle termination of our process.
337 void ProcessDied(bool already_dead, RendererClosedDetails* known_details); 339 void ProcessDied(bool already_dead, RendererClosedDetails* known_details);
338 340
339 // GpuSwitchingObserver implementation. 341 // GpuSwitchingObserver implementation.
340 void OnGpuSwitched() override; 342 void OnGpuSwitched() override;
341 343
342 #if defined(ENABLE_WEBRTC) 344 #if defined(ENABLE_WEBRTC)
343 void OnRegisterAecDumpConsumer(int id); 345 void OnRegisterAecDumpConsumer(int id);
344 void OnRegisterEventLogConsumer(int id);
345 void OnUnregisterAecDumpConsumer(int id); 346 void OnUnregisterAecDumpConsumer(int id);
346 void OnUnregisterEventLogConsumer(int id);
347 void RegisterAecDumpConsumerOnUIThread(int id); 347 void RegisterAecDumpConsumerOnUIThread(int id);
348 void RegisterEventLogConsumerOnUIThread(int id);
349 void UnregisterAecDumpConsumerOnUIThread(int id); 348 void UnregisterAecDumpConsumerOnUIThread(int id);
350 void UnregisterEventLogConsumerOnUIThread(int id);
351 void EnableAecDumpForId(const base::FilePath& file, int id); 349 void EnableAecDumpForId(const base::FilePath& file, int id);
352 void EnableEventLogForId(const base::FilePath& file, int id);
353 // Sends |file_for_transit| to the render process. 350 // Sends |file_for_transit| to the render process.
354 void SendAecDumpFileToRenderer(int id, 351 void SendAecDumpFileToRenderer(int id,
355 IPC::PlatformFileForTransit file_for_transit); 352 IPC::PlatformFileForTransit file_for_transit);
356 void SendEventLogFileToRenderer(int id,
357 IPC::PlatformFileForTransit file_for_transit);
358 void SendDisableAecDumpToRenderer(); 353 void SendDisableAecDumpToRenderer();
359 void SendDisableEventLogToRenderer();
360 base::FilePath GetAecDumpFilePathWithExtensions(const base::FilePath& file); 354 base::FilePath GetAecDumpFilePathWithExtensions(const base::FilePath& file);
361 base::FilePath GetEventLogFilePathWithExtensions(const base::FilePath& file);
362 #endif 355 #endif
363 356
364 std::unique_ptr<MojoChildConnection> mojo_child_connection_; 357 std::unique_ptr<MojoChildConnection> mojo_child_connection_;
365 std::unique_ptr<MojoApplicationHost> mojo_application_host_; 358 std::unique_ptr<MojoApplicationHost> mojo_application_host_;
366 359
367 // The registered IPC listener objects. When this list is empty, we should 360 // The registered IPC listener objects. When this list is empty, we should
368 // delete ourselves. 361 // delete ourselves.
369 IDMap<IPC::Listener> listeners_; 362 IDMap<IPC::Listener> listeners_;
370 363
371 // The count of currently visible widgets. Since the host can be a container 364 // The count of currently visible widgets. Since the host can be a container
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 scoped_refptr<BrowserDemuxerAndroid> browser_demuxer_android_; 465 scoped_refptr<BrowserDemuxerAndroid> browser_demuxer_android_;
473 #endif 466 #endif
474 467
475 #if defined(ENABLE_WEBRTC) 468 #if defined(ENABLE_WEBRTC)
476 scoped_refptr<P2PSocketDispatcherHost> p2p_socket_dispatcher_host_; 469 scoped_refptr<P2PSocketDispatcherHost> p2p_socket_dispatcher_host_;
477 470
478 // Must be accessed on UI thread. 471 // Must be accessed on UI thread.
479 std::vector<int> aec_dump_consumers_; 472 std::vector<int> aec_dump_consumers_;
480 473
481 WebRtcStopRtpDumpCallback stop_rtp_dump_callback_; 474 WebRtcStopRtpDumpCallback stop_rtp_dump_callback_;
475
476 WebRTCEventLogHost webrtc_eventlog_host_;
482 #endif 477 #endif
483 478
484 int worker_ref_count_; 479 int worker_ref_count_;
485 480
486 // Records the time when the process starts surviving for workers for UMA. 481 // Records the time when the process starts surviving for workers for UMA.
487 base::TimeTicks survive_for_worker_start_time_; 482 base::TimeTicks survive_for_worker_start_time_;
488 483
489 // Records the maximum # of workers simultaneously hosted in this process 484 // Records the maximum # of workers simultaneously hosted in this process
490 // for UMA. 485 // for UMA.
491 int max_worker_count_; 486 int max_worker_count_;
(...skipping 21 matching lines...) Expand all
513 mojo::ScopedMessagePipeHandle in_process_renderer_handle_; 508 mojo::ScopedMessagePipeHandle in_process_renderer_handle_;
514 509
515 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; 510 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_;
516 511
517 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); 512 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl);
518 }; 513 };
519 514
520 } // namespace content 515 } // namespace content
521 516
522 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ 517 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698