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

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

Issue 23464080: [Android] Decouple pausing video from RenderView pause. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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 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 d2c3dd3c3738c631953c950f49b9a625f2214920..7ca298db3996ee89036e5efa00b36d012c41df16 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -342,8 +342,16 @@ void ContentViewCoreImpl::Show() {
void ContentViewCoreImpl::Hide() {
GetWebContents()->WasHidden();
+ PauseVideo();
}
+void ContentViewCoreImpl::PauseVideo() {
+ RenderViewHost* host = web_contents_->GetRenderViewHost();
+ if (host)
+ host->Send(new ViewMsg_PauseVideo(host->GetRoutingID()));
+}
+
+
joth 2013/09/19 02:41:50 \nn
benm (inactive) 2013/09/19 03:27:32 Done.
void ContentViewCoreImpl::OnTabCrashed() {
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);

Powered by Google App Engine
This is Rietveld 408576698