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

Unified Diff: webkit/media/android/webmediaplayer_impl_android.cc

Issue 11442056: Add external surface rendering mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add getPersonality() Created 8 years 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 side-by-side diff with in-line comments
Download patch
Index: webkit/media/android/webmediaplayer_impl_android.cc
diff --git a/webkit/media/android/webmediaplayer_impl_android.cc b/webkit/media/android/webmediaplayer_impl_android.cc
index c43605f8d818c6c5e28804d3bb4d09f1cfd2b2c0..c654ce3a9d135037f8cb86662ca34f89d3938292 100644
--- a/webkit/media/android/webmediaplayer_impl_android.cc
+++ b/webkit/media/android/webmediaplayer_impl_android.cc
@@ -124,6 +124,20 @@ void WebMediaPlayerImplAndroid::OnMediaPlayerPause() {
client()->playbackStateChanged();
}
+void WebMediaPlayerImplAndroid::OnDidEnterVideoView() {
+ SetIsInVideoView(true);
+ SetNeedsEstablishPeer(false);
+}
+
+void WebMediaPlayerImplAndroid::OnDidExitVideoView() {
+ SetIsInVideoView(false);
+ SetNeedsEstablishPeer(true);
+ // We had the video view surface connected to Android MediaPlayer,
qinmin 2012/12/17 19:34:06 so if i have 2 videos on the page, one is playing,
wonsik2 2013/02/14 14:56:38 I thought we only allow one MediaPlayer instance t
+ // so reconnect our surface texture for embedded playback.
+ if (!paused())
+ EstablishSurfaceTexturePeer();
+}
+
void WebMediaPlayerImplAndroid::Destroy() {
proxy_->DestroyPlayer(player_id());
proxy_ = NULL;

Powered by Google App Engine
This is Rietveld 408576698