Chromium Code Reviews| 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 2684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2695 GetWebView()->sharedGraphicsContext3D(); | 2695 GetWebView()->sharedGraphicsContext3D(); |
| 2696 | 2696 |
| 2697 GpuChannelHost* gpu_channel_host = | 2697 GpuChannelHost* gpu_channel_host = |
| 2698 RenderThreadImpl::current()->EstablishGpuChannelSync( | 2698 RenderThreadImpl::current()->EstablishGpuChannelSync( |
| 2699 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); | 2699 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); |
| 2700 if (!gpu_channel_host) { | 2700 if (!gpu_channel_host) { |
| 2701 LOG(ERROR) << "Failed to establish GPU channel for media player"; | 2701 LOG(ERROR) << "Failed to establish GPU channel for media player"; |
| 2702 return NULL; | 2702 return NULL; |
| 2703 } | 2703 } |
| 2704 | 2704 |
| 2705 if (cmd_line->HasSwitch(switches::kMediaPlayerInRenderProcess)) { | |
|
qinmin
2013/03/01 00:36:26
keep this logic to create the mediaplayer in rende
no sievers
2013/03/01 00:43:04
I made this use the same flag then (kInProcessWebG
| |
| 2706 if (!media_bridge_manager_.get()) { | |
| 2707 media_bridge_manager_.reset( | |
| 2708 new webkit_media::MediaPlayerBridgeManagerImpl(1)); | |
| 2709 } | |
| 2710 return new webkit_media::WebMediaPlayerInProcessAndroid( | |
| 2711 frame, | |
| 2712 client, | |
| 2713 cookieJar(frame), | |
| 2714 media_player_manager_.get(), | |
| 2715 media_bridge_manager_.get(), | |
| 2716 new StreamTextureFactoryImpl( | |
| 2717 resource_context, gpu_channel_host, routing_id_), | |
| 2718 cmd_line->HasSwitch(switches::kDisableMediaHistoryLogging)); | |
| 2719 } | |
| 2720 if (!media_player_proxy_) { | 2705 if (!media_player_proxy_) { |
| 2721 media_player_proxy_ = new WebMediaPlayerProxyImplAndroid( | 2706 media_player_proxy_ = new WebMediaPlayerProxyImplAndroid( |
| 2722 this, media_player_manager_.get()); | 2707 this, media_player_manager_.get()); |
| 2723 } | 2708 } |
| 2724 return new webkit_media::WebMediaPlayerImplAndroid( | 2709 return new webkit_media::WebMediaPlayerImplAndroid( |
| 2725 frame, | 2710 frame, |
| 2726 client, | 2711 client, |
| 2727 media_player_manager_.get(), | 2712 media_player_manager_.get(), |
| 2728 media_player_proxy_, | 2713 media_player_proxy_, |
| 2729 new StreamTextureFactoryImpl( | 2714 new StreamTextureFactoryImpl( |
| (...skipping 3907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6637 } | 6622 } |
| 6638 #endif | 6623 #endif |
| 6639 | 6624 |
| 6640 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( | 6625 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( |
| 6641 TransportDIB::Handle dib_handle) { | 6626 TransportDIB::Handle dib_handle) { |
| 6642 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6627 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
| 6643 RenderProcess::current()->ReleaseTransportDIB(dib); | 6628 RenderProcess::current()->ReleaseTransportDIB(dib); |
| 6644 } | 6629 } |
| 6645 | 6630 |
| 6646 } // namespace content | 6631 } // namespace content |
| OLD | NEW |