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

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: . Created 8 years, 9 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
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 "ppapi/c/private/ppb_flash_net_connector.h" 101 #include "ppapi/c/private/ppb_flash_net_connector.h"
102 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObjec t.h" 102 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObjec t.h"
103 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" 103 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h"
104 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" 104 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
105 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" 105 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h"
106 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileChooserParams. h" 106 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileChooserParams. h"
(...skipping 2036 matching lines...) Expand 10 before | Expand all | Expand 10 after
2143 2143
2144 // Add in any custom filter factories first. 2144 // Add in any custom filter factories first.
2145 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); 2145 const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
2146 if (!cmd_line->HasSwitch(switches::kDisableAudio)) { 2146 if (!cmd_line->HasSwitch(switches::kDisableAudio)) {
2147 // audio_source_provider is a "provider" to WebKit, and a sink 2147 // audio_source_provider is a "provider" to WebKit, and a sink
2148 // from the perspective of the audio renderer. 2148 // from the perspective of the audio renderer.
2149 audio_source_provider = new RenderAudioSourceProvider(); 2149 audio_source_provider = new RenderAudioSourceProvider();
2150 2150
2151 // Add the chrome specific audio renderer, using audio_source_provider 2151 // Add the chrome specific audio renderer, using audio_source_provider
2152 // as the sink. 2152 // as the sink.
2153 AudioRendererImpl* audio_renderer = 2153 media::AudioRendererBase* audio_renderer =
2154 new AudioRendererImpl(audio_source_provider); 2154 new media::AudioRendererBase(audio_source_provider);
2155 collection->AddAudioRenderer(audio_renderer); 2155 collection->AddAudioRenderer(audio_renderer);
2156 } 2156 }
2157 2157
2158 // Currently only cros/arm has any HW video decode support in 2158 // Currently only cros/arm has any HW video decode support in
2159 // GpuVideoDecodeAccelerator so we don't even try to use it on other 2159 // GpuVideoDecodeAccelerator so we don't even try to use it on other
2160 // platforms. This is a startup-time optimization. When new VDA 2160 // platforms. This is a startup-time optimization. When new VDA
2161 // implementations are added, relax the #if above. 2161 // implementations are added, relax the #if above.
2162 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) 2162 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)
2163 // Note we don't actually use the result of this blind down-cast unless it's 2163 // Note we don't actually use the result of this blind down-cast unless it's
2164 // valid (not NULL and of the right type). 2164 // valid (not NULL and of the right type).
(...skipping 3029 matching lines...) Expand 10 before | Expand all | Expand 10 after
5194 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 5194 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
5195 return !!RenderThreadImpl::current()->compositor_thread(); 5195 return !!RenderThreadImpl::current()->compositor_thread();
5196 } 5196 }
5197 5197
5198 void RenderViewImpl::OnJavaBridgeInit() { 5198 void RenderViewImpl::OnJavaBridgeInit() {
5199 DCHECK(!java_bridge_dispatcher_.get()); 5199 DCHECK(!java_bridge_dispatcher_.get());
5200 #if defined(ENABLE_JAVA_BRIDGE) 5200 #if defined(ENABLE_JAVA_BRIDGE)
5201 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); 5201 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this));
5202 #endif 5202 #endif
5203 } 5203 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698