| 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 2916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2927 return web_media_player_android.release(); | 2927 return web_media_player_android.release(); |
| 2928 #endif // defined(OS_ANDROID) | 2928 #endif // defined(OS_ANDROID) |
| 2929 | 2929 |
| 2930 scoped_refptr<media::AudioRendererSink> sink; | 2930 scoped_refptr<media::AudioRendererSink> sink; |
| 2931 if (!cmd_line->HasSwitch(switches::kDisableAudio)) { | 2931 if (!cmd_line->HasSwitch(switches::kDisableAudio)) { |
| 2932 sink = RenderThreadImpl::current()->GetAudioRendererMixerManager()-> | 2932 sink = RenderThreadImpl::current()->GetAudioRendererMixerManager()-> |
| 2933 CreateInput(routing_id_); | 2933 CreateInput(routing_id_); |
| 2934 DVLOG(1) << "Using AudioRendererMixerManager-provided sink: " << sink.get(); | 2934 DVLOG(1) << "Using AudioRendererMixerManager-provided sink: " << sink.get(); |
| 2935 } | 2935 } |
| 2936 | 2936 |
| 2937 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories; | 2937 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories = |
| 2938 WebGraphicsContext3DCommandBufferImpl* context3d = NULL; | 2938 RenderThreadImpl::current()->GetGpuFactories(); |
| 2939 if (!cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) | |
| 2940 context3d = RenderThreadImpl::current()->GetGpuVDAContext3D(); | |
| 2941 if (context3d) { | |
| 2942 scoped_refptr<base::MessageLoopProxy> factories_loop = | |
| 2943 RenderThreadImpl::current()->compositor_message_loop_proxy(); | |
| 2944 if (!factories_loop.get()) | |
| 2945 factories_loop = base::MessageLoopProxy::current(); | |
| 2946 GpuChannelHost* gpu_channel_host = | |
| 2947 RenderThreadImpl::current()->EstablishGpuChannelSync( | |
| 2948 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); | |
| 2949 gpu_factories = new RendererGpuVideoDecoderFactories( | |
| 2950 gpu_channel_host, factories_loop, context3d); | |
| 2951 } | |
| 2952 | 2939 |
| 2953 webkit_media::WebMediaPlayerParams params( | 2940 webkit_media::WebMediaPlayerParams params( |
| 2954 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy(), | 2941 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy(), |
| 2955 base::Bind(&ContentRendererClient::DeferMediaLoad, | 2942 base::Bind(&ContentRendererClient::DeferMediaLoad, |
| 2956 base::Unretained(GetContentClient()->renderer()), | 2943 base::Unretained(GetContentClient()->renderer()), |
| 2957 static_cast<RenderView*>(this)), | 2944 static_cast<RenderView*>(this)), |
| 2958 sink, | 2945 sink, |
| 2959 gpu_factories, | 2946 gpu_factories, |
| 2960 new RenderMediaLog()); | 2947 new RenderMediaLog()); |
| 2961 return new webkit_media::WebMediaPlayerImpl( | 2948 return new webkit_media::WebMediaPlayerImpl( |
| (...skipping 3827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6789 WebURL url = icon_urls[i].iconURL(); | 6776 WebURL url = icon_urls[i].iconURL(); |
| 6790 if (!url.isEmpty()) | 6777 if (!url.isEmpty()) |
| 6791 urls.push_back(FaviconURL(url, | 6778 urls.push_back(FaviconURL(url, |
| 6792 ToFaviconType(icon_urls[i].iconType()))); | 6779 ToFaviconType(icon_urls[i].iconType()))); |
| 6793 } | 6780 } |
| 6794 SendUpdateFaviconURL(urls); | 6781 SendUpdateFaviconURL(urls); |
| 6795 } | 6782 } |
| 6796 | 6783 |
| 6797 | 6784 |
| 6798 } // namespace content | 6785 } // namespace content |
| OLD | NEW |