| 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 2730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2741 #endif | 2741 #endif |
| 2742 | 2742 |
| 2743 scoped_refptr<media::AudioRendererSink> sink; | 2743 scoped_refptr<media::AudioRendererSink> sink; |
| 2744 if (!cmd_line->HasSwitch(switches::kDisableAudio)) { | 2744 if (!cmd_line->HasSwitch(switches::kDisableAudio)) { |
| 2745 sink = RenderThreadImpl::current()->GetAudioRendererMixerManager()-> | 2745 sink = RenderThreadImpl::current()->GetAudioRendererMixerManager()-> |
| 2746 CreateInput(routing_id_); | 2746 CreateInput(routing_id_); |
| 2747 DVLOG(1) << "Using AudioRendererMixerManager-provided sink: " << sink; | 2747 DVLOG(1) << "Using AudioRendererMixerManager-provided sink: " << sink; |
| 2748 } | 2748 } |
| 2749 | 2749 |
| 2750 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories; | 2750 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories; |
| 2751 WebGraphicsContext3DCommandBufferImpl* context3d = NULL; | 2751 scoped_refptr<base::MessageLoopProxy> factories_loop = |
| 2752 if (!cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) | 2752 RenderThreadImpl::current()->compositor_message_loop_proxy(); |
| 2753 context3d = RenderThreadImpl::current()->GetGpuVDAContext3D(); | 2753 if (!factories_loop) |
| 2754 if (context3d) { | 2754 factories_loop = base::MessageLoopProxy::current(); |
| 2755 scoped_refptr<base::MessageLoopProxy> factories_loop = | 2755 gpu_factories = RenderThreadImpl::current()->GetGpuFactories(factories_loop); |
| 2756 RenderThreadImpl::current()->compositor_message_loop_proxy(); | |
| 2757 if (!factories_loop) | |
| 2758 factories_loop = base::MessageLoopProxy::current(); | |
| 2759 GpuChannelHost* gpu_channel_host = | |
| 2760 RenderThreadImpl::current()->EstablishGpuChannelSync( | |
| 2761 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); | |
| 2762 gpu_factories = new RendererGpuVideoDecoderFactories( | |
| 2763 gpu_channel_host, factories_loop, context3d); | |
| 2764 } | |
| 2765 | 2756 |
| 2766 webkit_media::WebMediaPlayerParams params( | 2757 webkit_media::WebMediaPlayerParams params( |
| 2767 sink, gpu_factories, new RenderMediaLog()); | 2758 sink, gpu_factories, new RenderMediaLog()); |
| 2768 WebMediaPlayer* media_player = | 2759 WebMediaPlayer* media_player = |
| 2769 GetContentClient()->renderer()->OverrideCreateWebMediaPlayer( | 2760 GetContentClient()->renderer()->OverrideCreateWebMediaPlayer( |
| 2770 this, frame, client, AsWeakPtr(), params); | 2761 this, frame, client, AsWeakPtr(), params); |
| 2771 if (!media_player) { | 2762 if (!media_player) { |
| 2772 media_player = new webkit_media::WebMediaPlayerImpl( | 2763 media_player = new webkit_media::WebMediaPlayerImpl( |
| 2773 frame, client, AsWeakPtr(), params); | 2764 frame, client, AsWeakPtr(), params); |
| 2774 } | 2765 } |
| (...skipping 3785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6560 WebURL url = icon_urls[i].iconURL(); | 6551 WebURL url = icon_urls[i].iconURL(); |
| 6561 if (!url.isEmpty()) | 6552 if (!url.isEmpty()) |
| 6562 urls.push_back(FaviconURL(url, | 6553 urls.push_back(FaviconURL(url, |
| 6563 ToFaviconType(icon_urls[i].iconType()))); | 6554 ToFaviconType(icon_urls[i].iconType()))); |
| 6564 } | 6555 } |
| 6565 SendUpdateFaviconURL(urls); | 6556 SendUpdateFaviconURL(urls); |
| 6566 } | 6557 } |
| 6567 | 6558 |
| 6568 | 6559 |
| 6569 } // namespace content | 6560 } // namespace content |
| OLD | NEW |