| Index: media/blink/webmediaplayer_impl.h
|
| diff --git a/media/blink/webmediaplayer_impl.h b/media/blink/webmediaplayer_impl.h
|
| index ac80c099c3ec0199b182fdce94cd6a6867b32c6b..0fa2fc48dfe2a87ad5bfa8c145971adb52c1a45f 100644
|
| --- a/media/blink/webmediaplayer_impl.h
|
| +++ b/media/blink/webmediaplayer_impl.h
|
| @@ -19,6 +19,7 @@
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/threading/thread.h"
|
| #include "base/time/default_tick_clock.h"
|
| +#include "base/time/time.h"
|
| #include "base/timer/elapsed_timer.h"
|
| #include "base/timer/timer.h"
|
| #include "build/build_config.h"
|
| @@ -371,6 +372,10 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
|
| // Whether the media should be paused when hidden.
|
| bool ShouldPauseWhenHidden() const;
|
|
|
| + // Whether the video should recover fast when shown if decoding was disabled
|
| + // in the background.
|
| + bool ShouldDecodeFastWhenShown() const;
|
| +
|
| blink::WebLocalFrame* frame_;
|
|
|
| // The playback state last reported to |delegate_|, to avoid setting duplicate
|
| @@ -599,6 +604,12 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
|
| // Whether the player is currently in autoplay muted state.
|
| bool autoplay_muted_ = false;
|
|
|
| + // The maximum video keyframe distance that allows triggering background
|
| + // playback optimizations.
|
| + // 10 seconds by default but can be overridden by a Finch experiment.
|
| + base::TimeDelta max_keyframe_distance_for_fast_decode_ =
|
| + base::TimeDelta::FromSeconds(10);
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
|
| };
|
|
|
|
|