| 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/bind.h" | 10 #include "base/bind.h" |
| (...skipping 2579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2590 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); | 2590 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); |
| 2591 collection->GetVideoDecoders()->push_back(new media::GpuVideoDecoder( | 2591 collection->GetVideoDecoders()->push_back(new media::GpuVideoDecoder( |
| 2592 base::Bind(&media::MessageLoopFactory::GetMessageLoop, | 2592 base::Bind(&media::MessageLoopFactory::GetMessageLoop, |
| 2593 base::Unretained(message_loop_factory), | 2593 base::Unretained(message_loop_factory), |
| 2594 media::MessageLoopFactory::kPipeline), | 2594 media::MessageLoopFactory::kPipeline), |
| 2595 factories_loop, | 2595 factories_loop, |
| 2596 new RendererGpuVideoDecoderFactories( | 2596 new RendererGpuVideoDecoderFactories( |
| 2597 gpu_channel_host, factories_loop, context3d))); | 2597 gpu_channel_host, factories_loop, context3d))); |
| 2598 } | 2598 } |
| 2599 | 2599 |
| 2600 bool encrypted_media_enabled = |
| 2601 cmd_line->HasSwitch(switches::kEnableEncryptedMedia); |
| 2602 |
| 2600 WebMediaPlayer* media_player = | 2603 WebMediaPlayer* media_player = |
| 2601 GetContentClient()->renderer()->OverrideCreateWebMediaPlayer( | 2604 GetContentClient()->renderer()->OverrideCreateWebMediaPlayer( |
| 2602 this, frame, client, AsWeakPtr(), collection, audio_source_provider, | 2605 this, frame, client, AsWeakPtr(), collection, audio_source_provider, |
| 2603 audio_source_provider, message_loop_factory, media_stream_impl_, | 2606 audio_source_provider, message_loop_factory, media_stream_impl_, |
| 2604 render_media_log); | 2607 encrypted_media_enabled, render_media_log); |
| 2605 if (!media_player) { | 2608 if (!media_player) { |
| 2609 |
| 2606 media_player = new webkit_media::WebMediaPlayerImpl( | 2610 media_player = new webkit_media::WebMediaPlayerImpl( |
| 2607 frame, client, AsWeakPtr(), collection, audio_source_provider, | 2611 frame, client, AsWeakPtr(), collection, audio_source_provider, |
| 2608 audio_source_provider, message_loop_factory, media_stream_impl_, | 2612 audio_source_provider, message_loop_factory, media_stream_impl_, |
| 2609 render_media_log); | 2613 encrypted_media_enabled, render_media_log); |
| 2610 } | 2614 } |
| 2611 return media_player; | 2615 return media_player; |
| 2612 } | 2616 } |
| 2613 | 2617 |
| 2614 WebApplicationCacheHost* RenderViewImpl::createApplicationCacheHost( | 2618 WebApplicationCacheHost* RenderViewImpl::createApplicationCacheHost( |
| 2615 WebFrame* frame, WebApplicationCacheHostClient* client) { | 2619 WebFrame* frame, WebApplicationCacheHostClient* client) { |
| 2616 if (!frame || !frame->view()) | 2620 if (!frame || !frame->view()) |
| 2617 return NULL; | 2621 return NULL; |
| 2618 return new RendererWebApplicationCacheHostImpl( | 2622 return new RendererWebApplicationCacheHostImpl( |
| 2619 FromWebView(frame->view()), client, | 2623 FromWebView(frame->view()), client, |
| (...skipping 3820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6440 } | 6444 } |
| 6441 #endif | 6445 #endif |
| 6442 | 6446 |
| 6443 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( | 6447 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( |
| 6444 TransportDIB::Handle dib_handle) { | 6448 TransportDIB::Handle dib_handle) { |
| 6445 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6449 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
| 6446 RenderProcess::current()->ReleaseTransportDIB(dib); | 6450 RenderProcess::current()->ReleaseTransportDIB(dib); |
| 6447 } | 6451 } |
| 6448 | 6452 |
| 6449 } // namespace content | 6453 } // namespace content |
| OLD | NEW |