Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 22766004: Fullscreen video in Android WebView (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address nits Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/media/android/stream_texture_factory_android_synchronous_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 #if defined(OS_ANDROID) 211 #if defined(OS_ANDROID)
212 #include <cpu-features.h> 212 #include <cpu-features.h>
213 213
214 #include "content/common/android/device_telephony_info.h" 214 #include "content/common/android/device_telephony_info.h"
215 #include "content/common/gpu/client/context_provider_command_buffer.h" 215 #include "content/common/gpu/client/context_provider_command_buffer.h"
216 #include "content/renderer/android/address_detector.h" 216 #include "content/renderer/android/address_detector.h"
217 #include "content/renderer/android/content_detector.h" 217 #include "content/renderer/android/content_detector.h"
218 #include "content/renderer/android/email_detector.h" 218 #include "content/renderer/android/email_detector.h"
219 #include "content/renderer/android/phone_number_detector.h" 219 #include "content/renderer/android/phone_number_detector.h"
220 #include "content/renderer/media/android/renderer_media_player_manager.h" 220 #include "content/renderer/media/android/renderer_media_player_manager.h"
221 #include "content/renderer/media/android/stream_texture_factory_android.h" 221 #include "content/renderer/media/android/stream_texture_factory_android_impl.h"
222 #include "content/renderer/media/android/stream_texture_factory_android_synchron ous_impl.h"
222 #include "content/renderer/media/android/webmediaplayer_android.h" 223 #include "content/renderer/media/android/webmediaplayer_android.h"
223 #include "content/renderer/media/android/webmediaplayer_proxy_android.h" 224 #include "content/renderer/media/android/webmediaplayer_proxy_android.h"
224 #include "skia/ext/platform_canvas.h" 225 #include "skia/ext/platform_canvas.h"
225 #include "third_party/WebKit/public/platform/WebFloatPoint.h" 226 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
226 #include "third_party/WebKit/public/platform/WebFloatRect.h" 227 #include "third_party/WebKit/public/platform/WebFloatRect.h"
227 #include "third_party/WebKit/public/web/WebHitTestResult.h" 228 #include "third_party/WebKit/public/web/WebHitTestResult.h"
228 #include "ui/gfx/rect_f.h" 229 #include "ui/gfx/rect_f.h"
229 230
230 #if defined(GOOGLE_TV) 231 #if defined(GOOGLE_TV)
231 #include "content/renderer/media/rtc_video_decoder_bridge_tv.h" 232 #include "content/renderer/media/rtc_video_decoder_bridge_tv.h"
(...skipping 2783 matching lines...) Expand 10 before | Expand all | Expand 10 after
3015 RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); 3016 RenderThreadImpl::current()->OffscreenContextProviderForMainThread();
3016 if (!context_provider.get()) { 3017 if (!context_provider.get()) {
3017 LOG(ERROR) << "Failed to get context3d for media player"; 3018 LOG(ERROR) << "Failed to get context3d for media player";
3018 return NULL; 3019 return NULL;
3019 } 3020 }
3020 3021
3021 if (!media_player_proxy_) { 3022 if (!media_player_proxy_) {
3022 media_player_proxy_ = new WebMediaPlayerProxyAndroid( 3023 media_player_proxy_ = new WebMediaPlayerProxyAndroid(
3023 this, media_player_manager_.get()); 3024 this, media_player_manager_.get());
3024 } 3025 }
3026
3027 scoped_ptr<StreamTextureFactory> stream_texture_factory;
3028 if (UsingSynchronousRendererCompositor()) {
3029 stream_texture_factory.reset(new StreamTextureFactorySynchronousImpl);
3030 } else {
3031 stream_texture_factory.reset(new StreamTextureFactoryImpl(
3032 context_provider->Context3d(), gpu_channel_host, routing_id_));
3033 }
3034
3025 scoped_ptr<WebMediaPlayerAndroid> web_media_player_android( 3035 scoped_ptr<WebMediaPlayerAndroid> web_media_player_android(
3026 new WebMediaPlayerAndroid( 3036 new WebMediaPlayerAndroid(
3027 frame, 3037 frame,
3028 client, 3038 client,
3029 AsWeakPtr(), 3039 AsWeakPtr(),
3030 media_player_manager_.get(), 3040 media_player_manager_.get(),
3031 media_player_proxy_, 3041 media_player_proxy_,
3032 new StreamTextureFactory( 3042 stream_texture_factory.release(),
3033 context_provider->Context3d(), gpu_channel_host, routing_id_),
3034 new RenderMediaLog())); 3043 new RenderMediaLog()));
3035 #if defined(ENABLE_WEBRTC) && defined(GOOGLE_TV) 3044 #if defined(ENABLE_WEBRTC) && defined(GOOGLE_TV)
3036 if (media_stream_client_->IsMediaStream(url)) { 3045 if (media_stream_client_->IsMediaStream(url)) {
3037 RTCVideoDecoderFactoryTv* factory = RenderThreadImpl::current() 3046 RTCVideoDecoderFactoryTv* factory = RenderThreadImpl::current()
3038 ->GetMediaStreamDependencyFactory()->decoder_factory_tv(); 3047 ->GetMediaStreamDependencyFactory()->decoder_factory_tv();
3039 // |media_stream_client| and |factory| outlives |web_media_player_android|. 3048 // |media_stream_client| and |factory| outlives |web_media_player_android|.
3040 if (!factory->AcquireDemuxer() || 3049 if (!factory->AcquireDemuxer() ||
3041 !web_media_player_android->InjectMediaStream( 3050 !web_media_player_android->InjectMediaStream(
3042 media_stream_client_, 3051 media_stream_client_,
3043 factory, 3052 factory,
(...skipping 3497 matching lines...) Expand 10 before | Expand all | Expand 10 after
6541 WebURL url = icon_urls[i].iconURL(); 6550 WebURL url = icon_urls[i].iconURL();
6542 if (!url.isEmpty()) 6551 if (!url.isEmpty())
6543 urls.push_back(FaviconURL(url, 6552 urls.push_back(FaviconURL(url,
6544 ToFaviconType(icon_urls[i].iconType()))); 6553 ToFaviconType(icon_urls[i].iconType())));
6545 } 6554 }
6546 SendUpdateFaviconURL(urls); 6555 SendUpdateFaviconURL(urls);
6547 } 6556 }
6548 6557
6549 6558
6550 } // namespace content 6559 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/android/stream_texture_factory_android_synchronous_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698