OLD | NEW |
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 3043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3054 Send(new AecDumpMsg_DisableAecDump()); | 3054 Send(new AecDumpMsg_DisableAecDump()); |
3055 } | 3055 } |
3056 | 3056 |
3057 base::FilePath RenderProcessHostImpl::GetAecDumpFilePathWithExtensions( | 3057 base::FilePath RenderProcessHostImpl::GetAecDumpFilePathWithExtensions( |
3058 const base::FilePath& file) { | 3058 const base::FilePath& file) { |
3059 return file.AddExtension(IntToStringType(base::GetProcId(GetHandle()))) | 3059 return file.AddExtension(IntToStringType(base::GetProcId(GetHandle()))) |
3060 .AddExtension(kAecDumpFileNameAddition); | 3060 .AddExtension(kAecDumpFileNameAddition); |
3061 } | 3061 } |
3062 #endif // BUILDFLAG(ENABLE_WEBRTC) | 3062 #endif // BUILDFLAG(ENABLE_WEBRTC) |
3063 | 3063 |
3064 void RenderProcessHostImpl::GetAudioOutputControllers( | |
3065 const GetAudioOutputControllersCallback& callback) const { | |
3066 audio_renderer_host()->GetOutputControllers(callback); | |
3067 } | |
3068 | |
3069 void RenderProcessHostImpl::RecomputeAndUpdateWebKitPreferences() { | 3064 void RenderProcessHostImpl::RecomputeAndUpdateWebKitPreferences() { |
3070 // We are updating all widgets including swapped out ones. | 3065 // We are updating all widgets including swapped out ones. |
3071 for (auto* widget : widgets_) { | 3066 for (auto* widget : widgets_) { |
3072 RenderViewHost* rvh = RenderViewHost::From(widget); | 3067 RenderViewHost* rvh = RenderViewHost::From(widget); |
3073 if (!rvh) | 3068 if (!rvh) |
3074 continue; | 3069 continue; |
3075 | 3070 |
3076 rvh->OnWebkitPreferencesChanged(); | 3071 rvh->OnWebkitPreferencesChanged(); |
3077 } | 3072 } |
3078 } | 3073 } |
3079 | 3074 |
3080 // static | 3075 // static |
3081 void RenderProcessHostImpl::OnMojoError(int render_process_id, | 3076 void RenderProcessHostImpl::OnMojoError(int render_process_id, |
3082 const std::string& error) { | 3077 const std::string& error) { |
3083 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3078 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
3084 | 3079 |
3085 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. | 3080 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. |
3086 // Capture the error message in a crash key value. | 3081 // Capture the error message in a crash key value. |
3087 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); | 3082 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); |
3088 bad_message::ReceivedBadMessage(render_process_id, | 3083 bad_message::ReceivedBadMessage(render_process_id, |
3089 bad_message::RPH_MOJO_PROCESS_ERROR); | 3084 bad_message::RPH_MOJO_PROCESS_ERROR); |
3090 } | 3085 } |
3091 | 3086 |
3092 } // namespace content | 3087 } // namespace content |
OLD | NEW |