| Index: media/blink/webmediaplayer_impl.h
|
| diff --git a/media/blink/webmediaplayer_impl.h b/media/blink/webmediaplayer_impl.h
|
| index 1b184a88858d488d68fbde6c0f5684c791cad08d..6a65adc107f8f1cc8d4cac5007b5b0f818e4114c 100644
|
| --- a/media/blink/webmediaplayer_impl.h
|
| +++ b/media/blink/webmediaplayer_impl.h
|
| @@ -88,6 +88,7 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
|
| : public NON_EXPORTED_BASE(blink::WebMediaPlayer),
|
| public NON_EXPORTED_BASE(WebMediaPlayerDelegate::Observer),
|
| public NON_EXPORTED_BASE(Pipeline::Client),
|
| + public MediaObserverClient,
|
| public base::SupportsWeakPtr<WebMediaPlayerImpl> {
|
| public:
|
| // Constructs a WebMediaPlayer implementation using Chromium's media stack.
|
| @@ -214,19 +215,14 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
|
| void SetUseFallbackPath(bool use_fallback_path);
|
| #endif
|
|
|
| + // MediaObserverClient implementation.
|
| + void SwitchRenderer(bool disable_pipeline_auto_suspend) override;
|
| + void ActivateViewportIntersectionMonitoring(bool activate) override;
|
| +
|
| // Called from WebMediaPlayerCast.
|
| // TODO(hubbe): WMPI_CAST make private.
|
| void OnPipelineSeeked(bool time_updated);
|
|
|
| - // Restart the player/pipeline as soon as possible. This will destroy the
|
| - // current renderer, if any, and create a new one via the RendererFactory; and
|
| - // then seek to resume playback at the current position.
|
| - void ScheduleRestart();
|
| -
|
| - // Called when requests to activate monitoring changes on viewport
|
| - // intersection.
|
| - void ActivateViewportIntersectionMonitoring(bool activate);
|
| -
|
| // Distinct states that |delegate_| can be in. (Public for testing.)
|
| enum class DelegateState {
|
| GONE,
|
| @@ -296,6 +292,11 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
|
| // Finishes starting the pipeline due to a call to load().
|
| void StartPipeline();
|
|
|
| + // Restart the player/pipeline as soon as possible. This will destroy the
|
| + // current renderer, if any, and create a new one via the RendererFactory; and
|
| + // then seek to resume playback at the current position.
|
| + void ScheduleRestart();
|
| +
|
| // Helpers that set the network/ready state and notifies the client if
|
| // they've changed.
|
| void SetNetworkState(blink::WebMediaPlayer::NetworkState state);
|
| @@ -339,7 +340,7 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
|
|
|
| // Methods internal to UpdatePlayState().
|
| PlayState UpdatePlayState_ComputePlayState(bool is_remote,
|
| - bool is_streaming,
|
| + bool can_auto_suspend,
|
| bool is_suspended,
|
| bool is_backgrounded);
|
| void SetDelegateState(DelegateState new_state, bool is_idle);
|
| @@ -689,6 +690,9 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
|
| // Whether the pipeline is being resumed at the moment.
|
| bool is_pipeline_resuming_ = false;
|
|
|
| + // When this is true, pipeline will not be auto suspended.
|
| + bool disable_pipeline_auto_suspend_ = false;
|
| +
|
| // Pipeline statistics overridden by tests.
|
| base::Optional<PipelineStatistics> pipeline_statistics_for_test_;
|
|
|
|
|