| OLD | NEW |
| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 #include "content/renderer/load_progress_tracker.h" | 92 #include "content/renderer/load_progress_tracker.h" |
| 93 #include "content/renderer/media/audio_device_factory.h" | 93 #include "content/renderer/media/audio_device_factory.h" |
| 94 #include "content/renderer/media/audio_renderer_mixer_manager.h" | 94 #include "content/renderer/media/audio_renderer_mixer_manager.h" |
| 95 #include "content/renderer/media/media_stream_dependency_factory.h" | 95 #include "content/renderer/media/media_stream_dependency_factory.h" |
| 96 #include "content/renderer/media/media_stream_dispatcher.h" | 96 #include "content/renderer/media/media_stream_dispatcher.h" |
| 97 #include "content/renderer/media/media_stream_impl.h" | 97 #include "content/renderer/media/media_stream_impl.h" |
| 98 #include "content/renderer/media/render_media_log.h" | 98 #include "content/renderer/media/render_media_log.h" |
| 99 #include "content/renderer/media/renderer_gpu_video_decoder_factories.h" | 99 #include "content/renderer/media/renderer_gpu_video_decoder_factories.h" |
| 100 #include "content/renderer/media/rtc_peer_connection_handler.h" | 100 #include "content/renderer/media/rtc_peer_connection_handler.h" |
| 101 #include "content/renderer/media/video_capture_impl_manager.h" | 101 #include "content/renderer/media/video_capture_impl_manager.h" |
| 102 #include "content/renderer/media/webmediaplayer_impl.h" |
| 103 #include "content/renderer/media/webmediaplayer_ms.h" |
| 104 #include "content/renderer/media/webmediaplayer_params.h" |
| 102 #include "content/renderer/mhtml_generator.h" | 105 #include "content/renderer/mhtml_generator.h" |
| 103 #include "content/renderer/notification_provider.h" | 106 #include "content/renderer/notification_provider.h" |
| 104 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h" | 107 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h" |
| 105 #include "content/renderer/plugin_channel_host.h" | 108 #include "content/renderer/plugin_channel_host.h" |
| 106 #include "content/renderer/render_frame_impl.h" | 109 #include "content/renderer/render_frame_impl.h" |
| 107 #include "content/renderer/render_process.h" | 110 #include "content/renderer/render_process.h" |
| 108 #include "content/renderer/render_thread_impl.h" | 111 #include "content/renderer/render_thread_impl.h" |
| 109 #include "content/renderer/render_view_impl_params.h" | 112 #include "content/renderer/render_view_impl_params.h" |
| 110 #include "content/renderer/render_view_mouse_lock_dispatcher.h" | 113 #include "content/renderer/render_view_mouse_lock_dispatcher.h" |
| 111 #include "content/renderer/render_widget_fullscreen_pepper.h" | 114 #include "content/renderer/render_widget_fullscreen_pepper.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 #include "webkit/common/dom_storage/dom_storage_types.h" | 207 #include "webkit/common/dom_storage/dom_storage_types.h" |
| 205 #include "webkit/common/webdropdata.h" | 208 #include "webkit/common/webdropdata.h" |
| 206 #include "webkit/glue/webkit_glue.h" | 209 #include "webkit/glue/webkit_glue.h" |
| 207 #include "webkit/glue/weburlresponse_extradata_impl.h" | 210 #include "webkit/glue/weburlresponse_extradata_impl.h" |
| 208 #include "webkit/plugins/npapi/plugin_list.h" | 211 #include "webkit/plugins/npapi/plugin_list.h" |
| 209 #include "webkit/plugins/npapi/plugin_utils.h" | 212 #include "webkit/plugins/npapi/plugin_utils.h" |
| 210 #include "webkit/plugins/npapi/webplugin_delegate.h" | 213 #include "webkit/plugins/npapi/webplugin_delegate.h" |
| 211 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" | 214 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" |
| 212 #include "webkit/plugins/npapi/webplugin_impl.h" | 215 #include "webkit/plugins/npapi/webplugin_impl.h" |
| 213 #include "webkit/renderer/appcache/web_application_cache_host_impl.h" | 216 #include "webkit/renderer/appcache/web_application_cache_host_impl.h" |
| 214 #include "webkit/renderer/media/webmediaplayer_impl.h" | |
| 215 #include "webkit/renderer/media/webmediaplayer_ms.h" | |
| 216 #include "webkit/renderer/media/webmediaplayer_params.h" | |
| 217 #include "webkit/renderer/webpreferences_renderer.h" | 217 #include "webkit/renderer/webpreferences_renderer.h" |
| 218 | 218 |
| 219 #if defined(OS_ANDROID) | 219 #if defined(OS_ANDROID) |
| 220 #include <cpu-features.h> | 220 #include <cpu-features.h> |
| 221 | 221 |
| 222 #include "content/common/android/device_telephony_info.h" | 222 #include "content/common/android/device_telephony_info.h" |
| 223 #include "content/common/gpu/client/context_provider_command_buffer.h" | 223 #include "content/common/gpu/client/context_provider_command_buffer.h" |
| 224 #include "content/renderer/android/address_detector.h" | 224 #include "content/renderer/android/address_detector.h" |
| 225 #include "content/renderer/android/content_detector.h" | 225 #include "content/renderer/android/content_detector.h" |
| 226 #include "content/renderer/android/email_detector.h" | 226 #include "content/renderer/android/email_detector.h" |
| (...skipping 2612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2839 | 2839 |
| 2840 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); | 2840 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
| 2841 #if defined(ENABLE_WEBRTC) && !defined(GOOGLE_TV) | 2841 #if defined(ENABLE_WEBRTC) && !defined(GOOGLE_TV) |
| 2842 if (MediaStreamImpl::CheckMediaStream(url)) { | 2842 if (MediaStreamImpl::CheckMediaStream(url)) { |
| 2843 #if defined(OS_ANDROID) && defined(ARCH_CPU_ARMEL) | 2843 #if defined(OS_ANDROID) && defined(ARCH_CPU_ARMEL) |
| 2844 bool found_neon = | 2844 bool found_neon = |
| 2845 (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0; | 2845 (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0; |
| 2846 UMA_HISTOGRAM_BOOLEAN("Platform.WebRtcNEONFound", found_neon); | 2846 UMA_HISTOGRAM_BOOLEAN("Platform.WebRtcNEONFound", found_neon); |
| 2847 #endif // defined(OS_ANDROID) && defined(ARCH_CPU_ARMEL) | 2847 #endif // defined(OS_ANDROID) && defined(ARCH_CPU_ARMEL) |
| 2848 EnsureMediaStreamImpl(); | 2848 EnsureMediaStreamImpl(); |
| 2849 return new webkit_media::WebMediaPlayerMS( | 2849 return new WebMediaPlayerMS( |
| 2850 frame, client, AsWeakPtr(), media_stream_impl_, new RenderMediaLog()); | 2850 frame, client, AsWeakPtr(), media_stream_impl_, new RenderMediaLog()); |
| 2851 } | 2851 } |
| 2852 #endif | 2852 #endif |
| 2853 | 2853 |
| 2854 #if defined(OS_ANDROID) | 2854 #if defined(OS_ANDROID) |
| 2855 GpuChannelHost* gpu_channel_host = | 2855 GpuChannelHost* gpu_channel_host = |
| 2856 RenderThreadImpl::current()->EstablishGpuChannelSync( | 2856 RenderThreadImpl::current()->EstablishGpuChannelSync( |
| 2857 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); | 2857 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); |
| 2858 if (!gpu_channel_host) { | 2858 if (!gpu_channel_host) { |
| 2859 LOG(ERROR) << "Failed to establish GPU channel for media player"; | 2859 LOG(ERROR) << "Failed to establish GPU channel for media player"; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2918 RenderThreadImpl::current()->compositor_message_loop_proxy(); | 2918 RenderThreadImpl::current()->compositor_message_loop_proxy(); |
| 2919 if (!factories_loop.get()) | 2919 if (!factories_loop.get()) |
| 2920 factories_loop = base::MessageLoopProxy::current(); | 2920 factories_loop = base::MessageLoopProxy::current(); |
| 2921 GpuChannelHost* gpu_channel_host = | 2921 GpuChannelHost* gpu_channel_host = |
| 2922 RenderThreadImpl::current()->EstablishGpuChannelSync( | 2922 RenderThreadImpl::current()->EstablishGpuChannelSync( |
| 2923 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); | 2923 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); |
| 2924 gpu_factories = new RendererGpuVideoDecoderFactories( | 2924 gpu_factories = new RendererGpuVideoDecoderFactories( |
| 2925 gpu_channel_host, factories_loop, context3d); | 2925 gpu_channel_host, factories_loop, context3d); |
| 2926 } | 2926 } |
| 2927 | 2927 |
| 2928 webkit_media::WebMediaPlayerParams params( | 2928 WebMediaPlayerParams params( |
| 2929 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy(), | 2929 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy(), |
| 2930 sink, gpu_factories, new RenderMediaLog()); | 2930 sink, gpu_factories, new RenderMediaLog()); |
| 2931 WebMediaPlayer* media_player = | 2931 WebMediaPlayer* media_player = |
| 2932 GetContentClient()->renderer()->OverrideCreateWebMediaPlayer( | 2932 GetContentClient()->renderer()->OverrideCreateWebMediaPlayer( |
| 2933 this, frame, client, AsWeakPtr(), params); | 2933 this, frame, client, AsWeakPtr(), params); |
| 2934 if (!media_player) { | 2934 if (!media_player) { |
| 2935 media_player = new webkit_media::WebMediaPlayerImpl( | 2935 media_player = new WebMediaPlayerImpl(frame, client, AsWeakPtr(), params); |
| 2936 frame, client, AsWeakPtr(), params); | |
| 2937 } | 2936 } |
| 2938 return media_player; | 2937 return media_player; |
| 2939 } | 2938 } |
| 2940 | 2939 |
| 2941 WebApplicationCacheHost* RenderViewImpl::createApplicationCacheHost( | 2940 WebApplicationCacheHost* RenderViewImpl::createApplicationCacheHost( |
| 2942 WebFrame* frame, WebApplicationCacheHostClient* client) { | 2941 WebFrame* frame, WebApplicationCacheHostClient* client) { |
| 2943 if (!frame || !frame->view()) | 2942 if (!frame || !frame->view()) |
| 2944 return NULL; | 2943 return NULL; |
| 2945 return new RendererWebApplicationCacheHostImpl( | 2944 return new RendererWebApplicationCacheHostImpl( |
| 2946 FromWebView(frame->view()), client, | 2945 FromWebView(frame->view()), client, |
| (...skipping 3818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6765 WebURL url = icon_urls[i].iconURL(); | 6764 WebURL url = icon_urls[i].iconURL(); |
| 6766 if (!url.isEmpty()) | 6765 if (!url.isEmpty()) |
| 6767 urls.push_back(FaviconURL(url, | 6766 urls.push_back(FaviconURL(url, |
| 6768 ToFaviconType(icon_urls[i].iconType()))); | 6767 ToFaviconType(icon_urls[i].iconType()))); |
| 6769 } | 6768 } |
| 6770 SendUpdateFaviconURL(urls); | 6769 SendUpdateFaviconURL(urls); |
| 6771 } | 6770 } |
| 6772 | 6771 |
| 6773 | 6772 |
| 6774 } // namespace content | 6773 } // namespace content |
| OLD | NEW |