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

Unified Diff: content/browser/android/content_view_core_impl.cc

Issue 103583005: Restart fullscreen video playback when switching back from background (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed one more buggy line and the fullscreen_player_is_released_ member which is not necessary now Created 7 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: content/browser/android/content_view_core_impl.cc
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
index 474e99536851d6b9c8e2de9aa1644b96243cda30..ebb225c85f129fe4d508b0093a0e86c120e13d74 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -330,6 +330,7 @@ void ContentViewCoreImpl::OnShow(JNIEnv* env, jobject obj) {
void ContentViewCoreImpl::Show() {
GetWebContents()->WasShown();
+ ResumeFullscreenVideo();
}
void ContentViewCoreImpl::Hide() {
@@ -343,6 +344,12 @@ void ContentViewCoreImpl::PauseVideo() {
host->Send(new ViewMsg_PauseVideo(host->GetRoutingID()));
}
+void ContentViewCoreImpl::ResumeFullscreenVideo() {
+ RenderViewHost* host = web_contents_->GetRenderViewHost();
+ if (host)
+ host->Send(new ViewMsg_ResumeFullscreenVideo(host->GetRoutingID()));
+}
+
void ContentViewCoreImpl::OnTabCrashed() {
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);

Powered by Google App Engine
This is Rietveld 408576698