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

Unified Diff: media/blink/webmediaplayer_impl.h

Issue 2567833002: [Video] Pause videos with no audio when in the background. (Closed)
Patch Set: Pause videos without audio Created 3 years, 11 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
« no previous file with comments | « no previous file | media/blink/webmediaplayer_impl.cc » ('j') | media/blink/webmediaplayer_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webmediaplayer_impl.h
diff --git a/media/blink/webmediaplayer_impl.h b/media/blink/webmediaplayer_impl.h
index 9e0d97c2abd313ee331e6a6cbbdd4132bd35317e..ac80c099c3ec0199b182fdce94cd6a6867b32c6b 100644
--- a/media/blink/webmediaplayer_impl.h
+++ b/media/blink/webmediaplayer_impl.h
@@ -368,6 +368,9 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
// is intended for android.
bool DoesOverlaySupportMetadata() const;
+ // Whether the media should be paused when hidden.
+ bool ShouldPauseWhenHidden() const;
+
blink::WebLocalFrame* frame_;
// The playback state last reported to |delegate_|, to avoid setting duplicate
@@ -431,6 +434,10 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
bool paused_;
base::TimeDelta paused_time_;
+ // Set if paused automatically when hidden and need to resume when visible.
+ // Reset if paused for any other reason.
+ bool paused_when_hidden_;
+
// Set when starting, seeking, and resuming (all of which require a Pipeline
// seek). |seek_time_| is only valid when |seeking_| is true.
bool seeking_;
« no previous file with comments | « no previous file | media/blink/webmediaplayer_impl.cc » ('j') | media/blink/webmediaplayer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698