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

Unified Diff: media/blink/webmediaplayer_impl.h

Issue 2681863005: [Video] MediaSession API event handlers can resume background video. (Closed)
Patch Set: Added tests Created 3 years, 10 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
Index: media/blink/webmediaplayer_impl.h
diff --git a/media/blink/webmediaplayer_impl.h b/media/blink/webmediaplayer_impl.h
index 7dbf69c32867adde855cc3c807f7832e2d0a03f6..f0641223d45909adbb3c83968a91f1d8a30c1914 100644
--- a/media/blink/webmediaplayer_impl.h
+++ b/media/blink/webmediaplayer_impl.h
@@ -241,6 +241,7 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
private:
friend class WebMediaPlayerImplTest;
+ friend class WebMediaPlayerImplBackgroundBehaviorTest;
void EnableOverlay();
void DisableOverlay();
@@ -700,6 +701,10 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
// Pipeline media duration overridden by tests.
base::Optional<base::TimeDelta> pipeline_media_duration_for_test_;
+ // Whether the video requires a user gesture to resume after it was paused in
+ // the background. Affects the value of ShouldPauseVideoWhenHidden().
+ bool video_locked_when_paused_when_hidden_ = false;
+
DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
};

Powered by Google App Engine
This is Rietveld 408576698