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

Side by Side Diff: content/browser/android/surface_texture_peer_browser_impl.cc

Issue 10979047: Upstream fullscreen video implementation for android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove some unused variables and make fullscreen video to work with content shell Created 8 years, 2 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
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/browser/android/surface_texture_peer_browser_impl.h" 5 #include "content/browser/android/surface_texture_peer_browser_impl.h"
6 6
7 #include "content/browser/android/media_player_manager_android.h" 7 #include "content/browser/android/media_player_manager_android.h"
8 #include "content/browser/renderer_host/render_view_host_impl.h" 8 #include "content/browser/renderer_host/render_view_host_impl.h"
9 #include "content/common/android/surface_callback.h" 9 #include "content/common/android/surface_callback.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 20 matching lines...) Expand all
31 } 31 }
32 32
33 JNIEnv* env = base::android::AttachCurrentThread(); 33 JNIEnv* env = base::android::AttachCurrentThread();
34 DCHECK(env); 34 DCHECK(env);
35 if (renderer_id) { 35 if (renderer_id) {
36 RenderViewHostImpl* host = RenderViewHostImpl::FromID( 36 RenderViewHostImpl* host = RenderViewHostImpl::FromID(
37 renderer_id, render_view_id); 37 renderer_id, render_view_id);
38 if (host) { 38 if (host) {
39 media::MediaPlayerBridge* player = 39 media::MediaPlayerBridge* player =
40 host->media_player_manager()->GetPlayer(player_id); 40 host->media_player_manager()->GetPlayer(player_id);
41 if (player) { 41 if (player &&
42 player->SetVideoSurface(j_surface); 42 player != host->media_player_manager()->GetFullscreenPlayer())
43 } 43 player->SetVideoSurface(j_surface);
scherkus (not reviewing) 2012/10/02 16:20:16 nit: if statements > 1 line need {}
qinmin 2012/10/03 02:32:48 Done.
44 } 44 }
45 } 45 }
46 46
47 ReleaseSurface(j_surface); 47 ReleaseSurface(j_surface);
48 env->DeleteGlobalRef(j_surface); 48 env->DeleteGlobalRef(j_surface);
49 } 49 }
50 50
51 SurfaceTexturePeerBrowserImpl::SurfaceTexturePeerBrowserImpl( 51 SurfaceTexturePeerBrowserImpl::SurfaceTexturePeerBrowserImpl(
52 bool player_in_render_process) 52 bool player_in_render_process)
53 : player_in_render_process_(player_in_render_process) { 53 : player_in_render_process_(player_in_render_process) {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 player_id)); 87 player_id));
88 } 88 }
89 } 89 }
90 90
91 bool SurfaceTexturePeerBrowserImpl::RegisterBrowserProcessSurfaceTexture( 91 bool SurfaceTexturePeerBrowserImpl::RegisterBrowserProcessSurfaceTexture(
92 JNIEnv* env) { 92 JNIEnv* env) {
93 return RegisterNativesImpl(env); 93 return RegisterNativesImpl(env);
94 } 94 }
95 95
96 } // namespace content 96 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698