Chromium Code Reviews| Index: media/blink/webmediaplayer_impl.h |
| diff --git a/media/blink/webmediaplayer_impl.h b/media/blink/webmediaplayer_impl.h |
| index 0283efb40fad6819c0b6a47852e72994de7f3bf2..ee3198a03e4c60503c755575411b018de64ac7ad 100644 |
| --- a/media/blink/webmediaplayer_impl.h |
| +++ b/media/blink/webmediaplayer_impl.h |
| @@ -167,8 +167,9 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl |
| void exitedFullscreen() override; |
| // WebMediaPlayerDelegate::Observer implementation. |
| - void OnHidden(bool must_suspend) override; |
| + void OnHidden() override; |
| void OnShown() override; |
| + void OnSuspend(bool must_suspend) override; |
|
sandersd (OOO until July 31)
2016/03/07 23:27:51
I keep getting tripped up on this bool, so +1 for
DaleCurtis
2016/03/09 02:56:14
I kept going around on this and can't find names I
|
| void OnPlay() override; |
| void OnPause() override; |
| void OnVolumeMultiplierUpdate(double multiplier) override; |
| @@ -279,6 +280,9 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl |
| void ReportMemoryUsage(); |
| void FinishMemoryUsageReport(int64_t demuxer_memory_usage); |
| + // Indicates if Resume() or Suspend() are allowed to be called respectively. |
|
sandersd (OOO until July 31)
2016/03/07 23:27:51
I'm not clear on this comment given that there is
DaleCurtis
2016/03/09 02:56:14
Done.
|
| + bool IsResumeAllowed(); |
| + |
| blink::WebLocalFrame* frame_; |
| // TODO(hclam): get rid of these members and read from the pipeline directly. |
| @@ -421,6 +425,15 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl |
| scoped_ptr<RendererFactory> renderer_factory_; |
| + // Indicates if playback may be started from the background via a to play from |
|
mlamouri (slow - plz ping)
2016/03/05 22:37:36
nit: "via a to play from JavaScript" might be miss
|
| + // JavaScript or the media session. |
| + enum class BackgroundPlaybackState { |
| + PLAY_FORBIDDEN_NEVER_CALLED_IN_FOREGROUND, |
|
xhwang
2016/03/07 19:13:58
Can you provide more comments around these states?
DaleCurtis
2016/03/07 19:23:07
Yeah my names are bad :( I was trying to capture "
DaleCurtis
2016/03/09 02:56:14
After some more thought, I don't need these values
|
| + PLAY_FORBIDDEN_WHEN_SUSPENDED, |
| + PLAY_ALLOWED_WHEN_SUSPENDED, |
| + }; |
| + BackgroundPlaybackState background_playback_state_; |
| + |
| // For requesting surfaces on behalf of the Android H/W decoder in fullscreen. |
| // This will be null everywhere but Android. |
| SurfaceManager* surface_manager_; |