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

Unified Diff: media/blink/webmediaplayer_impl.h

Issue 1164343003: Fix WMPI::currentTime/seek race causing flaky Blink mediasource-redundant-seek.html on desktop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits Created 5 years, 6 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') | no next file with comments »
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 427357b1f615fb8388c87522829dfb97085f8b09..486a68e2fef133cd27f526a6972ad4ad9be8c8fb 100644
--- a/media/blink/webmediaplayer_impl.h
+++ b/media/blink/webmediaplayer_impl.h
@@ -274,10 +274,11 @@ class MEDIA_EXPORT WebMediaPlayerImpl
// time we pause and then return that value in currentTime(). Otherwise our
// clock can creep forward a little bit while the asynchronous
// SetPlaybackRate(0) is being executed.
- bool paused_;
- bool seeking_;
double playback_rate_;
+ bool paused_;
base::TimeDelta paused_time_;
+ bool seeking_;
+ base::TimeDelta seek_time_; // Meaningless when |seeking_| is false.
// TODO(scherkus): Replace with an explicit ended signal to HTMLMediaElement,
// see http://crbug.com/409280
@@ -286,7 +287,8 @@ class MEDIA_EXPORT WebMediaPlayerImpl
// Seek gets pending if another seek is in progress. Only last pending seek
// will have effect.
bool pending_seek_;
- double pending_seek_seconds_;
+ // |pending_seek_time_| is meaningless when |pending_seek_| is false.
+ base::TimeDelta pending_seek_time_;
// Tracks whether to issue time changed notifications during buffering state
// changes.
« no previous file with comments | « no previous file | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698