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

Unified Diff: android_webview/native/aw_contents.cc

Issue 23464080: [Android] Decouple pausing video from RenderView pause. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits 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
« no previous file with comments | « no previous file | content/browser/android/content_view_core_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/native/aw_contents.cc
diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc
index 2db91fa2c4d2dde0621e74685a6d9c2d2886341b..8b6941cdd46d65779f327dcefc496e451017c5a3 100644
--- a/android_webview/native/aw_contents.cc
+++ b/android_webview/native/aw_contents.cc
@@ -686,6 +686,12 @@ void AwContents::SetWindowVisibility(JNIEnv* env, jobject obj, bool visible) {
void AwContents::SetIsPaused(JNIEnv* env, jobject obj, bool paused) {
browser_view_renderer_->SetIsPaused(paused);
+ if (paused) {
+ ContentViewCore* cvc =
+ ContentViewCore::FromWebContents(web_contents_.get());
+ if (cvc)
+ cvc->PauseVideo();
+ }
}
void AwContents::OnAttachedToWindow(JNIEnv* env, jobject obj, int w, int h) {
« no previous file with comments | « no previous file | content/browser/android/content_view_core_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698