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

Unified Diff: media/blink/webmediaplayer_impl.h

Issue 2796193002: fix canplaythrough (Closed)
Patch Set: kSpecCompliantCanPlayThrough Created 3 years, 7 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 | « media/blink/buffered_data_source_host_impl_unittest.cc ('k') | 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 6001102e433b4a0d33a82bdd1bf59ba246ba8b49..1829790c7c3eb9a9e7c812f42769dfea222a9d36 100644
--- a/media/blink/webmediaplayer_impl.h
+++ b/media/blink/webmediaplayer_impl.h
@@ -457,9 +457,20 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
// handling a src= or MSE based playback.
void RecordUnderflowDuration(base::TimeDelta duration);
+ // Called by the data source when loading progresses.
+ // Can be called quite often.
+ void OnProgress();
+
+ // Returns true when we estimate that we can play the rest of the media
+ // without buffering.
+ bool CanPlayThrough();
+
// Records |natural_size| to MediaLog and video height to UMA.
void RecordVideoNaturalSize(const gfx::Size& natural_size);
+ // Takes ownership of |tick_clock|
+ void SetTickClockForTest(base::TickClock* tick_clock);
+
blink::WebLocalFrame* frame_;
// The playback state last reported to |delegate_|, to avoid setting duplicate
@@ -584,6 +595,8 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_;
+ std::unique_ptr<base::TickClock> tick_clock_;
+
BufferedDataSourceHostImpl buffered_data_source_host_;
linked_ptr<UrlIndex> url_index_;
@@ -685,8 +698,6 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
bool preroll_attempt_pending_;
base::TimeTicks preroll_attempt_start_time_;
- std::unique_ptr<base::TickClock> tick_clock_;
-
// Monitors the player events.
base::WeakPtr<MediaObserver> observer_;
« no previous file with comments | « media/blink/buffered_data_source_host_impl_unittest.cc ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698