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 2908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2919 factories_loop = base::MessageLoopProxy::current(); | 2919 factories_loop = base::MessageLoopProxy::current(); |
2920 GpuChannelHost* gpu_channel_host = | 2920 GpuChannelHost* gpu_channel_host = |
2921 RenderThreadImpl::current()->EstablishGpuChannelSync( | 2921 RenderThreadImpl::current()->EstablishGpuChannelSync( |
2922 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); | 2922 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); |
2923 gpu_factories = new RendererGpuVideoDecoderFactories( | 2923 gpu_factories = new RendererGpuVideoDecoderFactories( |
2924 gpu_channel_host, factories_loop, context3d); | 2924 gpu_channel_host, factories_loop, context3d); |
2925 } | 2925 } |
2926 | 2926 |
2927 webkit_media::WebMediaPlayerParams params( | 2927 webkit_media::WebMediaPlayerParams params( |
2928 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy(), | 2928 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy(), |
2929 sink, gpu_factories, new RenderMediaLog()); | 2929 GetContentClient()->renderer()->OverrideCreateMediaLoadDelegate(this), |
2930 WebMediaPlayer* media_player = | 2930 sink, |
2931 GetContentClient()->renderer()->OverrideCreateWebMediaPlayer( | 2931 gpu_factories, |
2932 this, frame, client, AsWeakPtr(), params); | 2932 new RenderMediaLog()); |
2933 if (!media_player) { | 2933 return new webkit_media::WebMediaPlayerImpl( |
2934 media_player = new webkit_media::WebMediaPlayerImpl( | 2934 frame, client, AsWeakPtr(), params); |
2935 frame, client, AsWeakPtr(), params); | |
2936 } | |
2937 return media_player; | |
2938 } | 2935 } |
2939 | 2936 |
2940 WebApplicationCacheHost* RenderViewImpl::createApplicationCacheHost( | 2937 WebApplicationCacheHost* RenderViewImpl::createApplicationCacheHost( |
2941 WebFrame* frame, WebApplicationCacheHostClient* client) { | 2938 WebFrame* frame, WebApplicationCacheHostClient* client) { |
2942 if (!frame || !frame->view()) | 2939 if (!frame || !frame->view()) |
2943 return NULL; | 2940 return NULL; |
2944 return new RendererWebApplicationCacheHostImpl( | 2941 return new RendererWebApplicationCacheHostImpl( |
2945 FromWebView(frame->view()), client, | 2942 FromWebView(frame->view()), client, |
2946 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); | 2943 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); |
2947 } | 2944 } |
(...skipping 3816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6764 WebURL url = icon_urls[i].iconURL(); | 6761 WebURL url = icon_urls[i].iconURL(); |
6765 if (!url.isEmpty()) | 6762 if (!url.isEmpty()) |
6766 urls.push_back(FaviconURL(url, | 6763 urls.push_back(FaviconURL(url, |
6767 ToFaviconType(icon_urls[i].iconType()))); | 6764 ToFaviconType(icon_urls[i].iconType()))); |
6768 } | 6765 } |
6769 SendUpdateFaviconURL(urls); | 6766 SendUpdateFaviconURL(urls); |
6770 } | 6767 } |
6771 | 6768 |
6772 | 6769 |
6773 } // namespace content | 6770 } // namespace content |
OLD | NEW |