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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 9826023: Merge AudioRendererImpl and AudioRendererBase; add NullAudioSink (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win build Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/media/webrtc_audio_device_impl.cc ('k') | media/audio/audio_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 #include "content/renderer/devtools_agent.h" 57 #include "content/renderer/devtools_agent.h"
58 #include "content/renderer/dom_automation_controller.h" 58 #include "content/renderer/dom_automation_controller.h"
59 #include "content/renderer/external_popup_menu.h" 59 #include "content/renderer/external_popup_menu.h"
60 #include "content/renderer/geolocation_dispatcher.h" 60 #include "content/renderer/geolocation_dispatcher.h"
61 #include "content/renderer/gpu/compositor_thread.h" 61 #include "content/renderer/gpu/compositor_thread.h"
62 #include "content/renderer/idle_user_detector.h" 62 #include "content/renderer/idle_user_detector.h"
63 #include "content/renderer/input_tag_speech_dispatcher.h" 63 #include "content/renderer/input_tag_speech_dispatcher.h"
64 #include "content/renderer/java/java_bridge_dispatcher.h" 64 #include "content/renderer/java/java_bridge_dispatcher.h"
65 #include "content/renderer/load_progress_tracker.h" 65 #include "content/renderer/load_progress_tracker.h"
66 #include "content/renderer/media/audio_message_filter.h" 66 #include "content/renderer/media/audio_message_filter.h"
67 #include "content/renderer/media/audio_renderer_impl.h"
68 #include "content/renderer/media/media_stream_dependency_factory.h" 67 #include "content/renderer/media/media_stream_dependency_factory.h"
69 #include "content/renderer/media/media_stream_dispatcher.h" 68 #include "content/renderer/media/media_stream_dispatcher.h"
70 #include "content/renderer/media/media_stream_impl.h" 69 #include "content/renderer/media/media_stream_impl.h"
71 #include "content/renderer/media/render_audiosourceprovider.h" 70 #include "content/renderer/media/render_audiosourceprovider.h"
72 #include "content/renderer/media/render_media_log.h" 71 #include "content/renderer/media/render_media_log.h"
73 #include "content/renderer/media/renderer_gpu_video_decoder_factories.h" 72 #include "content/renderer/media/renderer_gpu_video_decoder_factories.h"
74 #include "content/renderer/mhtml_generator.h" 73 #include "content/renderer/mhtml_generator.h"
75 #include "content/renderer/mouse_lock_dispatcher.h" 74 #include "content/renderer/mouse_lock_dispatcher.h"
76 #include "content/renderer/notification_provider.h" 75 #include "content/renderer/notification_provider.h"
77 #include "content/renderer/p2p/socket_dispatcher.h" 76 #include "content/renderer/p2p/socket_dispatcher.h"
78 #include "content/renderer/plugin_channel_host.h" 77 #include "content/renderer/plugin_channel_host.h"
79 #include "content/renderer/browser_plugin/browser_plugin_constants.h" 78 #include "content/renderer/browser_plugin/browser_plugin_constants.h"
80 #include "content/renderer/browser_plugin/browser_plugin_placeholder.h" 79 #include "content/renderer/browser_plugin/browser_plugin_placeholder.h"
81 #include "content/renderer/render_process.h" 80 #include "content/renderer/render_process.h"
82 #include "content/renderer/render_thread_impl.h" 81 #include "content/renderer/render_thread_impl.h"
83 #include "content/renderer/render_widget_fullscreen_pepper.h" 82 #include "content/renderer/render_widget_fullscreen_pepper.h"
84 #include "content/renderer/renderer_accessibility.h" 83 #include "content/renderer/renderer_accessibility.h"
85 #include "content/renderer/renderer_webapplicationcachehost_impl.h" 84 #include "content/renderer/renderer_webapplicationcachehost_impl.h"
86 #include "content/renderer/renderer_webcolorchooser_impl.h" 85 #include "content/renderer/renderer_webcolorchooser_impl.h"
87 #include "content/renderer/renderer_webstoragenamespace_impl.h" 86 #include "content/renderer/renderer_webstoragenamespace_impl.h"
88 #include "content/renderer/text_input_client_observer.h" 87 #include "content/renderer/text_input_client_observer.h"
89 #include "content/renderer/v8_value_converter_impl.h" 88 #include "content/renderer/v8_value_converter_impl.h"
90 #include "content/renderer/web_intents_host.h" 89 #include "content/renderer/web_intents_host.h"
91 #include "content/renderer/web_ui_bindings.h" 90 #include "content/renderer/web_ui_bindings.h"
92 #include "content/renderer/webplugin_delegate_proxy.h" 91 #include "content/renderer/webplugin_delegate_proxy.h"
93 #include "content/renderer/websharedworker_proxy.h" 92 #include "content/renderer/websharedworker_proxy.h"
94 #include "media/base/filter_collection.h" 93 #include "media/base/filter_collection.h"
95 #include "media/base/media_switches.h" 94 #include "media/base/media_switches.h"
96 #include "media/base/message_loop_factory.h" 95 #include "media/base/message_loop_factory.h"
96 #include "media/filters/audio_renderer_base.h"
97 #include "media/filters/gpu_video_decoder.h" 97 #include "media/filters/gpu_video_decoder.h"
98 #include "net/base/escape.h" 98 #include "net/base/escape.h"
99 #include "net/base/net_errors.h" 99 #include "net/base/net_errors.h"
100 #include "net/http/http_util.h" 100 #include "net/http/http_util.h"
101 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObjec t.h" 101 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObjec t.h"
102 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" 102 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h"
103 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" 103 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
104 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" 104 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h"
105 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileChooserParams. h" 105 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileChooserParams. h"
106 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemCallback s.h" 106 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemCallback s.h"
(...skipping 2060 matching lines...) Expand 10 before | Expand all | Expand 10 after
2167 2167
2168 // Add in any custom filter factories first. 2168 // Add in any custom filter factories first.
2169 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); 2169 const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
2170 if (!cmd_line->HasSwitch(switches::kDisableAudio)) { 2170 if (!cmd_line->HasSwitch(switches::kDisableAudio)) {
2171 // audio_source_provider is a "provider" to WebKit, and a sink 2171 // audio_source_provider is a "provider" to WebKit, and a sink
2172 // from the perspective of the audio renderer. 2172 // from the perspective of the audio renderer.
2173 audio_source_provider = new RenderAudioSourceProvider(); 2173 audio_source_provider = new RenderAudioSourceProvider();
2174 2174
2175 // Add the chrome specific audio renderer, using audio_source_provider 2175 // Add the chrome specific audio renderer, using audio_source_provider
2176 // as the sink. 2176 // as the sink.
2177 AudioRendererImpl* audio_renderer = 2177 media::AudioRendererBase* audio_renderer =
2178 new AudioRendererImpl(audio_source_provider); 2178 new media::AudioRendererBase(audio_source_provider);
2179 collection->AddAudioRenderer(audio_renderer); 2179 collection->AddAudioRenderer(audio_renderer);
2180 } 2180 }
2181 2181
2182 // Currently only cros/arm has any HW video decode support in 2182 // Currently only cros/arm has any HW video decode support in
2183 // GpuVideoDecodeAccelerator so we don't even try to use it on other 2183 // GpuVideoDecodeAccelerator so we don't even try to use it on other
2184 // platforms. This is a startup-time optimization. When new VDA 2184 // platforms. This is a startup-time optimization. When new VDA
2185 // implementations are added, relax the #if above. 2185 // implementations are added, relax the #if above.
2186 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) 2186 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)
2187 // Note we don't actually use the result of this blind down-cast unless it's 2187 // Note we don't actually use the result of this blind down-cast unless it's
2188 // valid (not NULL and of the right type). 2188 // valid (not NULL and of the right type).
(...skipping 3044 matching lines...) Expand 10 before | Expand all | Expand 10 after
5233 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 5233 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
5234 return !!RenderThreadImpl::current()->compositor_thread(); 5234 return !!RenderThreadImpl::current()->compositor_thread();
5235 } 5235 }
5236 5236
5237 void RenderViewImpl::OnJavaBridgeInit() { 5237 void RenderViewImpl::OnJavaBridgeInit() {
5238 DCHECK(!java_bridge_dispatcher_.get()); 5238 DCHECK(!java_bridge_dispatcher_.get());
5239 #if defined(ENABLE_JAVA_BRIDGE) 5239 #if defined(ENABLE_JAVA_BRIDGE)
5240 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); 5240 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this));
5241 #endif 5241 #endif
5242 } 5242 }
OLDNEW
« no previous file with comments | « content/renderer/media/webrtc_audio_device_impl.cc ('k') | media/audio/audio_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698