| Index: media/blink/webmediaplayer_impl.h
|
| diff --git a/media/blink/webmediaplayer_impl.h b/media/blink/webmediaplayer_impl.h
|
| index af26096083c03d17ae07222189f751904a7ca3c4..15130dea85a50ce4525df335b3717fed2b4df3fa 100644
|
| --- a/media/blink/webmediaplayer_impl.h
|
| +++ b/media/blink/webmediaplayer_impl.h
|
| @@ -379,17 +379,34 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
|
|
|
| // Whether the video should be paused when hidden. Uses metadata so has
|
| // meaning only after the pipeline has started, otherwise returns false.
|
| + // Doesn't check if the video can actually be paused depending on the
|
| + // pipeline's state.
|
| bool ShouldPauseVideoWhenHidden() const;
|
|
|
| // Whether the video track should be disabled when hidden. Uses metadata so
|
| // has meaning only after the pipeline has started, otherwise returns false.
|
| + // Doesn't check if the video track can actually be disabled depending on the
|
| + // pipeline's state.
|
| bool ShouldDisableVideoWhenHidden() const;
|
|
|
| // Whether the video is suitable for background playback optimizations (either
|
| // pausing it or disabling the video track). Uses metadata so has meaning only
|
| // after the pipeline has started, otherwise returns false.
|
| + // The logical OR between the two methods above that is also used as their
|
| + // common implementation.
|
| bool IsBackgroundOptimizationCandidate() const;
|
|
|
| + // If enabling or disabling background video optimization has been delayed,
|
| + // because of the pipeline not running, seeking or resuming, this method
|
| + // needs to be called to update the optimization state.
|
| + void UpdateBackgroundVideoOptimizationState();
|
| +
|
| + // 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,
|
|
|