diff options
author | henrika@chromium.org <henrika@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-12 10:19:51 +0000 |
---|---|---|
committer | henrika@chromium.org <henrika@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-12 10:19:51 +0000 |
commit | f7eb0a394522b0c3d6e9c16b54072e0bbafa0957 (patch) | |
tree | 922a5de3698273b57aad5d40206514b75466fb3c /content/renderer/render_thread.cc | |
parent | 8b241822a6eb2ee3ae99eeeac4dd11dda343c42e (diff) | |
download | chromium_src-f7eb0a394522b0c3d6e9c16b54072e0bbafa0957.zip chromium_src-f7eb0a394522b0c3d6e9c16b54072e0bbafa0957.tar.gz chromium_src-f7eb0a394522b0c3d6e9c16b54072e0bbafa0957.tar.bz2 |
Ensures that AudioMessageFilter now lives on the main render thread.
In addition, removes usage of routing ID by utilizing control messages instead of routed messages.
BUG=none
TESTS=none
Review URL: http://codereview.chromium.org/7157001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92138 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/render_thread.cc')
-rw-r--r-- | content/renderer/render_thread.cc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/content/renderer/render_thread.cc b/content/renderer/render_thread.cc index d9d9d1d..93d240b 100644 --- a/content/renderer/render_thread.cc +++ b/content/renderer/render_thread.cc @@ -37,6 +37,8 @@ #include "content/renderer/gpu/gpu_channel_host.h" #include "content/renderer/gpu/gpu_video_service_host.h" #include "content/renderer/indexed_db_dispatcher.h" +#include "content/renderer/media/audio_input_message_filter.h" +#include "content/renderer/media/audio_message_filter.h" #include "content/renderer/media/video_capture_impl_manager.h" #include "content/renderer/media/video_capture_message_filter.h" #include "content/renderer/plugin_channel_host.h" @@ -174,6 +176,12 @@ void RenderThread::Init() { vc_manager_ = new VideoCaptureImplManager(); AddFilter(vc_manager_->video_capture_message_filter()); + audio_input_message_filter_ = new AudioInputMessageFilter(); + AddFilter(audio_input_message_filter_.get()); + + audio_message_filter_ = new AudioMessageFilter(); + AddFilter(audio_message_filter_.get()); + content::GetContentClient()->renderer()->RenderThreadStarted(); TRACE_EVENT_END_ETW("RenderThread::Init", 0, ""); @@ -188,6 +196,12 @@ RenderThread::~RenderThread() { web_database_observer_impl_->WaitForAllDatabasesToClose(); // Shutdown in reverse of the initialization order. + RemoveFilter(audio_input_message_filter_.get()); + audio_input_message_filter_ = NULL; + + RemoveFilter(audio_message_filter_.get()); + audio_message_filter_ = NULL; + RemoveFilter(vc_manager_->video_capture_message_filter()); RemoveFilter(db_message_filter_.get()); @@ -594,7 +608,7 @@ void RenderThread::EnsureWebKitInitialized() { !command_line.HasSwitch(switches::kDisableGeolocation)); WebKit::WebRuntimeFeatures::enableMediaStream( - command_line.HasSwitch(switches::kEnableMediaStream)); + command_line.HasSwitch(switches::kEnableMediaStream)); #if defined(OS_CHROMEOS) // TODO(crogers): enable once Web Audio has been tested and optimized. |