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 2721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2732 #endif | 2732 #endif |
2733 | 2733 |
2734 scoped_refptr<media::AudioRendererSink> sink; | 2734 scoped_refptr<media::AudioRendererSink> sink; |
2735 if (!cmd_line->HasSwitch(switches::kDisableAudio)) { | 2735 if (!cmd_line->HasSwitch(switches::kDisableAudio)) { |
2736 sink = RenderThreadImpl::current()->GetAudioRendererMixerManager()-> | 2736 sink = RenderThreadImpl::current()->GetAudioRendererMixerManager()-> |
2737 CreateInput(routing_id_); | 2737 CreateInput(routing_id_); |
2738 DVLOG(1) << "Using AudioRendererMixerManager-provided sink: " << sink; | 2738 DVLOG(1) << "Using AudioRendererMixerManager-provided sink: " << sink; |
2739 } | 2739 } |
2740 | 2740 |
2741 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories; | 2741 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories; |
2742 WebGraphicsContext3DCommandBufferImpl* context3d = NULL; | 2742 gpu_factories = RenderThreadImpl::current()->GetGpuFactories(); |
2743 if (!cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) | |
2744 context3d = RenderThreadImpl::current()->GetGpuVDAContext3D(); | |
2745 if (context3d) { | |
2746 scoped_refptr<base::MessageLoopProxy> factories_loop = | |
2747 RenderThreadImpl::current()->compositor_message_loop_proxy(); | |
2748 if (!factories_loop) | |
2749 factories_loop = base::MessageLoopProxy::current(); | |
2750 GpuChannelHost* gpu_channel_host = | |
2751 RenderThreadImpl::current()->EstablishGpuChannelSync( | |
2752 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); | |
2753 gpu_factories = new RendererGpuVideoDecoderFactories( | |
2754 gpu_channel_host, factories_loop, context3d); | |
2755 } | |
2756 | 2743 |
2757 webkit_media::WebMediaPlayerParams params( | 2744 webkit_media::WebMediaPlayerParams params( |
2758 sink, gpu_factories, new RenderMediaLog()); | 2745 sink, gpu_factories, new RenderMediaLog()); |
2759 WebMediaPlayer* media_player = | 2746 WebMediaPlayer* media_player = |
2760 GetContentClient()->renderer()->OverrideCreateWebMediaPlayer( | 2747 GetContentClient()->renderer()->OverrideCreateWebMediaPlayer( |
2761 this, frame, client, AsWeakPtr(), params); | 2748 this, frame, client, AsWeakPtr(), params); |
2762 if (!media_player) { | 2749 if (!media_player) { |
2763 media_player = new webkit_media::WebMediaPlayerImpl( | 2750 media_player = new webkit_media::WebMediaPlayerImpl( |
2764 frame, client, AsWeakPtr(), params); | 2751 frame, client, AsWeakPtr(), params); |
2765 } | 2752 } |
(...skipping 3763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6529 WebURL url = icon_urls[i].iconURL(); | 6516 WebURL url = icon_urls[i].iconURL(); |
6530 if (!url.isEmpty()) | 6517 if (!url.isEmpty()) |
6531 urls.push_back(FaviconURL(url, | 6518 urls.push_back(FaviconURL(url, |
6532 ToFaviconType(icon_urls[i].iconType()))); | 6519 ToFaviconType(icon_urls[i].iconType()))); |
6533 } | 6520 } |
6534 SendUpdateFaviconURL(urls); | 6521 SendUpdateFaviconURL(urls); |
6535 } | 6522 } |
6536 | 6523 |
6537 | 6524 |
6538 } // namespace content | 6525 } // namespace content |
OLD | NEW |