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

Unified Diff: content/renderer/media/android/webmediaplayer_android.cc

Issue 2445533002: Don't suspend the pipeline before HaveFutureData while decoding progressing (Closed)
Patch Set: fix compiler error from rebase Created 4 years, 1 month 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/renderer/media/android/webmediaplayer_android.cc
diff --git a/content/renderer/media/android/webmediaplayer_android.cc b/content/renderer/media/android/webmediaplayer_android.cc
index f54fc16b4ab9ea116e89443696c2d67d28fd2dea..0e007de0f8396ae7ccaefd38bbfa4b3375d3ecc2 100644
--- a/content/renderer/media/android/webmediaplayer_android.cc
+++ b/content/renderer/media/android/webmediaplayer_android.cc
@@ -1218,11 +1218,11 @@ void WebMediaPlayerAndroid::OnShown() {
play();
}
-void WebMediaPlayerAndroid::OnSuspendRequested(bool must_suspend) {
+bool WebMediaPlayerAndroid::OnSuspendRequested(bool must_suspend) {
if (!must_suspend &&
base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableMediaSuspend)) {
- return;
+ return true;
}
// If we're idle or playing video, pause and release resources; audio only
@@ -1231,6 +1231,8 @@ void WebMediaPlayerAndroid::OnSuspendRequested(bool must_suspend) {
(hasVideo() && !IsBackgroundVideoCandidate())) {
SuspendAndReleaseResources();
}
+
+ return true;
}
void WebMediaPlayerAndroid::OnPlay() {
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.h ('k') | content/renderer/media/renderer_webmediaplayer_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698