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

Unified Diff: content/renderer/media/webmediaplayer_impl.cc

Issue 282073003: Add return-by-value implementations of blink::WebMediaPlayer::buffered() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « content/renderer/media/webmediaplayer_impl.h ('k') | content/renderer/media/webmediaplayer_ms.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/webmediaplayer_impl.cc
diff --git a/content/renderer/media/webmediaplayer_impl.cc b/content/renderer/media/webmediaplayer_impl.cc
index 20f5ed55cb8a21567c3c6b94a2eee4bfe1da1a3f..58bf68f9894e64a3f58a0139d2d29db1baec70ad 100644
--- a/content/renderer/media/webmediaplayer_impl.cc
+++ b/content/renderer/media/webmediaplayer_impl.cc
@@ -523,6 +523,15 @@ const blink::WebTimeRanges& WebMediaPlayerImpl::buffered() {
return buffered_web_time_ranges_;
}
+blink::WebTimeRanges WebMediaPlayerImpl::buffered() const {
+ DCHECK(main_loop_->BelongsToCurrentThread());
+ media::Ranges<base::TimeDelta> buffered_time_ranges =
+ pipeline_.GetBufferedTimeRanges();
+ buffered_data_source_host_.AddBufferedTimeRanges(
+ &buffered_time_ranges, pipeline_.GetMediaDuration());
+ return ConvertToWebTimeRanges(buffered_time_ranges);
+}
+
double WebMediaPlayerImpl::maxTimeSeekable() const {
DCHECK(main_loop_->BelongsToCurrentThread());
« no previous file with comments | « content/renderer/media/webmediaplayer_impl.h ('k') | content/renderer/media/webmediaplayer_ms.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698