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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2973643002: Cache the override for WebRTC's AEC3 in RenderProcessHostImpl (Closed)
Patch Set: Add a TODO Created 3 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
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 2896 matching lines...) Expand 10 before | Expand all | Expand 10 after
2907 const base::FilePath& file_path) { 2907 const base::FilePath& file_path) {
2908 return webrtc_eventlog_host_.StartWebRTCEventLog(file_path); 2908 return webrtc_eventlog_host_.StartWebRTCEventLog(file_path);
2909 } 2909 }
2910 2910
2911 bool RenderProcessHostImpl::StopWebRTCEventLog() { 2911 bool RenderProcessHostImpl::StopWebRTCEventLog() {
2912 return webrtc_eventlog_host_.StopWebRTCEventLog(); 2912 return webrtc_eventlog_host_.StopWebRTCEventLog();
2913 } 2913 }
2914 2914
2915 void RenderProcessHostImpl::SetEchoCanceller3(bool enable) { 2915 void RenderProcessHostImpl::SetEchoCanceller3(bool enable) {
2916 DCHECK_CURRENTLY_ON(BrowserThread::UI); 2916 DCHECK_CURRENTLY_ON(BrowserThread::UI);
2917 // TODO(hlundin) Implement a test to verify that the setting works both with
2918 // aec_dump_consumers already registered, and with those registered in the
2919 // future. crbug.com/740104
2920 override_aec3_ = enable;
2917 2921
2918 // Piggybacking on AEC dumps. 2922 // Piggybacking on AEC dumps.
2919 // TODO(hlundin): Change name for aec_dump_consumers_; 2923 // TODO(hlundin): Change name for aec_dump_consumers_;
2920 // http://crbug.com/709919. 2924 // http://crbug.com/709919.
2921 for (std::vector<int>::iterator it = aec_dump_consumers_.begin(); 2925 for (std::vector<int>::iterator it = aec_dump_consumers_.begin();
2922 it != aec_dump_consumers_.end(); ++it) { 2926 it != aec_dump_consumers_.end(); ++it) {
2923 Send(new AudioProcessingMsg_EnableAec3(*it, enable)); 2927 Send(new AudioProcessingMsg_EnableAec3(*it, enable));
2924 } 2928 }
2925 } 2929 }
2926 2930
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
3739 3743
3740 void RenderProcessHostImpl::RegisterAecDumpConsumerOnUIThread(int id) { 3744 void RenderProcessHostImpl::RegisterAecDumpConsumerOnUIThread(int id) {
3741 DCHECK_CURRENTLY_ON(BrowserThread::UI); 3745 DCHECK_CURRENTLY_ON(BrowserThread::UI);
3742 aec_dump_consumers_.push_back(id); 3746 aec_dump_consumers_.push_back(id);
3743 3747
3744 if (WebRTCInternals::GetInstance()->IsAudioDebugRecordingsEnabled()) { 3748 if (WebRTCInternals::GetInstance()->IsAudioDebugRecordingsEnabled()) {
3745 base::FilePath file_with_extensions = GetAecDumpFilePathWithExtensions( 3749 base::FilePath file_with_extensions = GetAecDumpFilePathWithExtensions(
3746 WebRTCInternals::GetInstance()->GetAudioDebugRecordingsFilePath()); 3750 WebRTCInternals::GetInstance()->GetAudioDebugRecordingsFilePath());
3747 EnableAecDumpForId(file_with_extensions, id); 3751 EnableAecDumpForId(file_with_extensions, id);
3748 } 3752 }
3753 if (override_aec3_) {
3754 Send(new AudioProcessingMsg_EnableAec3(id, *override_aec3_));
3755 }
3749 } 3756 }
3750 3757
3751 void RenderProcessHostImpl::UnregisterAecDumpConsumerOnUIThread(int id) { 3758 void RenderProcessHostImpl::UnregisterAecDumpConsumerOnUIThread(int id) {
3752 DCHECK_CURRENTLY_ON(BrowserThread::UI); 3759 DCHECK_CURRENTLY_ON(BrowserThread::UI);
3753 for (std::vector<int>::iterator it = aec_dump_consumers_.begin(); 3760 for (std::vector<int>::iterator it = aec_dump_consumers_.begin();
3754 it != aec_dump_consumers_.end(); ++it) { 3761 it != aec_dump_consumers_.end(); ++it) {
3755 if (*it == id) { 3762 if (*it == id) {
3756 aec_dump_consumers_.erase(it); 3763 aec_dump_consumers_.erase(it);
3757 break; 3764 break;
3758 } 3765 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
3805 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 3812 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
3806 3813
3807 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. 3814 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing.
3808 // Capture the error message in a crash key value. 3815 // Capture the error message in a crash key value.
3809 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); 3816 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error);
3810 bad_message::ReceivedBadMessage(render_process_id, 3817 bad_message::ReceivedBadMessage(render_process_id,
3811 bad_message::RPH_MOJO_PROCESS_ERROR); 3818 bad_message::RPH_MOJO_PROCESS_ERROR);
3812 } 3819 }
3813 3820
3814 } // namespace content 3821 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698