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

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

Issue 18261007: Migrate webkit/renderer/media/ to content/renderer/media/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win64 AGAIN Created 7 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 | 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 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 #include "content/renderer/load_progress_tracker.h" 94 #include "content/renderer/load_progress_tracker.h"
95 #include "content/renderer/media/audio_device_factory.h" 95 #include "content/renderer/media/audio_device_factory.h"
96 #include "content/renderer/media/audio_renderer_mixer_manager.h" 96 #include "content/renderer/media/audio_renderer_mixer_manager.h"
97 #include "content/renderer/media/media_stream_dependency_factory.h" 97 #include "content/renderer/media/media_stream_dependency_factory.h"
98 #include "content/renderer/media/media_stream_dispatcher.h" 98 #include "content/renderer/media/media_stream_dispatcher.h"
99 #include "content/renderer/media/media_stream_impl.h" 99 #include "content/renderer/media/media_stream_impl.h"
100 #include "content/renderer/media/render_media_log.h" 100 #include "content/renderer/media/render_media_log.h"
101 #include "content/renderer/media/renderer_gpu_video_decoder_factories.h" 101 #include "content/renderer/media/renderer_gpu_video_decoder_factories.h"
102 #include "content/renderer/media/rtc_peer_connection_handler.h" 102 #include "content/renderer/media/rtc_peer_connection_handler.h"
103 #include "content/renderer/media/video_capture_impl_manager.h" 103 #include "content/renderer/media/video_capture_impl_manager.h"
104 #include "content/renderer/media/webmediaplayer_impl.h"
105 #include "content/renderer/media/webmediaplayer_ms.h"
106 #include "content/renderer/media/webmediaplayer_params.h"
104 #include "content/renderer/mhtml_generator.h" 107 #include "content/renderer/mhtml_generator.h"
105 #include "content/renderer/notification_provider.h" 108 #include "content/renderer/notification_provider.h"
106 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h" 109 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h"
107 #include "content/renderer/plugin_channel_host.h" 110 #include "content/renderer/plugin_channel_host.h"
108 #include "content/renderer/render_frame_impl.h" 111 #include "content/renderer/render_frame_impl.h"
109 #include "content/renderer/render_process.h" 112 #include "content/renderer/render_process.h"
110 #include "content/renderer/render_thread_impl.h" 113 #include "content/renderer/render_thread_impl.h"
111 #include "content/renderer/render_view_impl_params.h" 114 #include "content/renderer/render_view_impl_params.h"
112 #include "content/renderer/render_view_mouse_lock_dispatcher.h" 115 #include "content/renderer/render_view_mouse_lock_dispatcher.h"
113 #include "content/renderer/render_widget_fullscreen_pepper.h" 116 #include "content/renderer/render_widget_fullscreen_pepper.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 #include "v8/include/v8.h" 208 #include "v8/include/v8.h"
206 #include "webkit/common/dom_storage/dom_storage_types.h" 209 #include "webkit/common/dom_storage/dom_storage_types.h"
207 #include "webkit/glue/webkit_glue.h" 210 #include "webkit/glue/webkit_glue.h"
208 #include "webkit/glue/weburlresponse_extradata_impl.h" 211 #include "webkit/glue/weburlresponse_extradata_impl.h"
209 #include "webkit/plugins/npapi/plugin_list.h" 212 #include "webkit/plugins/npapi/plugin_list.h"
210 #include "webkit/plugins/npapi/plugin_utils.h" 213 #include "webkit/plugins/npapi/plugin_utils.h"
211 #include "webkit/plugins/npapi/webplugin_delegate.h" 214 #include "webkit/plugins/npapi/webplugin_delegate.h"
212 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" 215 #include "webkit/plugins/npapi/webplugin_delegate_impl.h"
213 #include "webkit/plugins/npapi/webplugin_impl.h" 216 #include "webkit/plugins/npapi/webplugin_impl.h"
214 #include "webkit/renderer/appcache/web_application_cache_host_impl.h" 217 #include "webkit/renderer/appcache/web_application_cache_host_impl.h"
215 #include "webkit/renderer/media/webmediaplayer_impl.h"
216 #include "webkit/renderer/media/webmediaplayer_ms.h"
217 #include "webkit/renderer/media/webmediaplayer_params.h"
218 #include "webkit/renderer/webpreferences_renderer.h" 218 #include "webkit/renderer/webpreferences_renderer.h"
219 219
220 #if defined(OS_ANDROID) 220 #if defined(OS_ANDROID)
221 #include <cpu-features.h> 221 #include <cpu-features.h>
222 222
223 #include "content/common/android/device_telephony_info.h" 223 #include "content/common/android/device_telephony_info.h"
224 #include "content/common/gpu/client/context_provider_command_buffer.h" 224 #include "content/common/gpu/client/context_provider_command_buffer.h"
225 #include "content/renderer/android/address_detector.h" 225 #include "content/renderer/android/address_detector.h"
226 #include "content/renderer/android/content_detector.h" 226 #include "content/renderer/android/content_detector.h"
227 #include "content/renderer/android/email_detector.h" 227 #include "content/renderer/android/email_detector.h"
(...skipping 2650 matching lines...) Expand 10 before | Expand all | Expand 10 after
2878 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); 2878 const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
2879 #if defined(ENABLE_WEBRTC) 2879 #if defined(ENABLE_WEBRTC)
2880 EnsureMediaStreamClient(); 2880 EnsureMediaStreamClient();
2881 #if !defined(GOOGLE_TV) 2881 #if !defined(GOOGLE_TV)
2882 if (media_stream_client_->IsMediaStream(url)) { 2882 if (media_stream_client_->IsMediaStream(url)) {
2883 #if defined(OS_ANDROID) && defined(ARCH_CPU_ARMEL) 2883 #if defined(OS_ANDROID) && defined(ARCH_CPU_ARMEL)
2884 bool found_neon = 2884 bool found_neon =
2885 (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0; 2885 (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0;
2886 UMA_HISTOGRAM_BOOLEAN("Platform.WebRtcNEONFound", found_neon); 2886 UMA_HISTOGRAM_BOOLEAN("Platform.WebRtcNEONFound", found_neon);
2887 #endif // defined(OS_ANDROID) && defined(ARCH_CPU_ARMEL) 2887 #endif // defined(OS_ANDROID) && defined(ARCH_CPU_ARMEL)
2888 return new webkit_media::WebMediaPlayerMS( 2888 return new WebMediaPlayerMS(
2889 frame, client, AsWeakPtr(), media_stream_client_, new RenderMediaLog()); 2889 frame, client, AsWeakPtr(), media_stream_client_, new RenderMediaLog());
2890 } 2890 }
2891 #endif // !defined(GOOGLE_TV) 2891 #endif // !defined(GOOGLE_TV)
2892 #endif // defined(ENABLE_WEBRTC) 2892 #endif // defined(ENABLE_WEBRTC)
2893 2893
2894 #if defined(OS_ANDROID) 2894 #if defined(OS_ANDROID)
2895 GpuChannelHost* gpu_channel_host = 2895 GpuChannelHost* gpu_channel_host =
2896 RenderThreadImpl::current()->EstablishGpuChannelSync( 2896 RenderThreadImpl::current()->EstablishGpuChannelSync(
2897 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); 2897 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE);
2898 if (!gpu_channel_host) { 2898 if (!gpu_channel_host) {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
2957 RenderThreadImpl::current()->compositor_message_loop_proxy(); 2957 RenderThreadImpl::current()->compositor_message_loop_proxy();
2958 if (!factories_loop.get()) 2958 if (!factories_loop.get())
2959 factories_loop = base::MessageLoopProxy::current(); 2959 factories_loop = base::MessageLoopProxy::current();
2960 GpuChannelHost* gpu_channel_host = 2960 GpuChannelHost* gpu_channel_host =
2961 RenderThreadImpl::current()->EstablishGpuChannelSync( 2961 RenderThreadImpl::current()->EstablishGpuChannelSync(
2962 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); 2962 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE);
2963 gpu_factories = new RendererGpuVideoDecoderFactories( 2963 gpu_factories = new RendererGpuVideoDecoderFactories(
2964 gpu_channel_host, factories_loop, context3d); 2964 gpu_channel_host, factories_loop, context3d);
2965 } 2965 }
2966 2966
2967 webkit_media::WebMediaPlayerParams params( 2967 WebMediaPlayerParams params(
2968 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy(), 2968 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy(),
2969 base::Bind(&ContentRendererClient::DeferMediaLoad, 2969 base::Bind(&ContentRendererClient::DeferMediaLoad,
2970 base::Unretained(GetContentClient()->renderer()), 2970 base::Unretained(GetContentClient()->renderer()),
2971 static_cast<RenderView*>(this)), 2971 static_cast<RenderView*>(this)),
2972 sink, 2972 sink,
2973 gpu_factories, 2973 gpu_factories,
2974 new RenderMediaLog()); 2974 new RenderMediaLog());
2975 return new webkit_media::WebMediaPlayerImpl( 2975 return new WebMediaPlayerImpl(frame, client, AsWeakPtr(), params);
2976 frame, client, AsWeakPtr(), params);
2977 } 2976 }
2978 2977
2979 WebApplicationCacheHost* RenderViewImpl::createApplicationCacheHost( 2978 WebApplicationCacheHost* RenderViewImpl::createApplicationCacheHost(
2980 WebFrame* frame, WebApplicationCacheHostClient* client) { 2979 WebFrame* frame, WebApplicationCacheHostClient* client) {
2981 if (!frame || !frame->view()) 2980 if (!frame || !frame->view())
2982 return NULL; 2981 return NULL;
2983 return new RendererWebApplicationCacheHostImpl( 2982 return new RendererWebApplicationCacheHostImpl(
2984 FromWebView(frame->view()), client, 2983 FromWebView(frame->view()), client,
2985 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); 2984 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy());
2986 } 2985 }
(...skipping 3792 matching lines...) Expand 10 before | Expand all | Expand 10 after
6779 void RenderViewImpl::EnableAutoResizeForTesting(const gfx::Size& min_size, 6778 void RenderViewImpl::EnableAutoResizeForTesting(const gfx::Size& min_size,
6780 const gfx::Size& max_size) { 6779 const gfx::Size& max_size) {
6781 OnEnableAutoResize(min_size, max_size); 6780 OnEnableAutoResize(min_size, max_size);
6782 } 6781 }
6783 6782
6784 void RenderViewImpl::DisableAutoResizeForTesting(const gfx::Size& new_size) { 6783 void RenderViewImpl::DisableAutoResizeForTesting(const gfx::Size& new_size) {
6785 OnDisableAutoResize(new_size); 6784 OnDisableAutoResize(new_size);
6786 } 6785 }
6787 6786
6788 void RenderViewImpl::SetMediaStreamClientForTesting( 6787 void RenderViewImpl::SetMediaStreamClientForTesting(
6789 webkit_media::MediaStreamClient* media_stream_client) { 6788 MediaStreamClient* media_stream_client) {
6790 DCHECK(!media_stream_client_); 6789 DCHECK(!media_stream_client_);
6791 DCHECK(!web_user_media_client_); 6790 DCHECK(!web_user_media_client_);
6792 media_stream_client_ = media_stream_client; 6791 media_stream_client_ = media_stream_client;
6793 } 6792 }
6794 6793
6795 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( 6794 void RenderViewImpl::OnReleaseDisambiguationPopupDIB(
6796 TransportDIB::Handle dib_handle) { 6795 TransportDIB::Handle dib_handle) {
6797 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); 6796 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle);
6798 RenderProcess::current()->ReleaseTransportDIB(dib); 6797 RenderProcess::current()->ReleaseTransportDIB(dib);
6799 } 6798 }
(...skipping 21 matching lines...) Expand all
6821 WebURL url = icon_urls[i].iconURL(); 6820 WebURL url = icon_urls[i].iconURL();
6822 if (!url.isEmpty()) 6821 if (!url.isEmpty())
6823 urls.push_back(FaviconURL(url, 6822 urls.push_back(FaviconURL(url,
6824 ToFaviconType(icon_urls[i].iconType()))); 6823 ToFaviconType(icon_urls[i].iconType())));
6825 } 6824 }
6826 SendUpdateFaviconURL(urls); 6825 SendUpdateFaviconURL(urls);
6827 } 6826 }
6828 6827
6829 6828
6830 } // namespace content 6829 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/renderer/renderer_webkitplatformsupport_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698