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

Unified Diff: media/blink/webmediaplayer_impl.h

Issue 2644723004: [Video] Don't pause video-only elements if they're already paused... (Closed)
Patch Set: Added PauseVideoIfNeeded Created 3 years, 11 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 | media/blink/webmediaplayer_impl.cc » ('j') | media/blink/webmediaplayer_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webmediaplayer_impl.h
diff --git a/media/blink/webmediaplayer_impl.h b/media/blink/webmediaplayer_impl.h
index af26096083c03d17ae07222189f751904a7ca3c4..ace66ad12eda52e750f45fc87f957f6f19121194 100644
--- a/media/blink/webmediaplayer_impl.h
+++ b/media/blink/webmediaplayer_impl.h
@@ -390,6 +390,12 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
// after the pipeline has started, otherwise returns false.
bool IsBackgroundOptimizationCandidate() const;
+ // Pauses a hidden video only player to save power if possible.
+ // Must be called when either of the following happens:
+ // - right after the video was hidden,
+ // - right ater the pipeline has resumed if the video is hidden.
+ void PauseVideoIfNeeded();
+
// Disables the video track to save power if possible.
// Must be called when either of the following happens:
// - right after the video was hidden,
« no previous file with comments | « no previous file | media/blink/webmediaplayer_impl.cc » ('j') | media/blink/webmediaplayer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698