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

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 2552493002: [Media] Record time it takes to start rendering audio and video (Closed)
Patch Set: Shown->Foreground 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 | « media/blink/video_frame_compositor.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webmediaplayer_impl.cc
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
index b6a56c2cd26dce38c4fc4676e610e77460f315e6..a1d7bb8ee3eb0c36c4a15111569c0cffaf36dffe 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -1354,6 +1354,11 @@ void WebMediaPlayerImpl::OnShown() {
if (watch_time_reporter_)
watch_time_reporter_->OnShown();
+ compositor_task_runner_->PostTask(
+ FROM_HERE,
+ base::Bind(&VideoFrameCompositor::SetForegroundTime,
+ base::Unretained(compositor_), base::TimeTicks::Now()));
+
if (IsBackgroundVideoTrackOptimizationEnabled() &&
client_->hasSelectedVideoTrack()) {
WebMediaPlayer::TrackId trackId = client_->getSelectedVideoTrackId();
« no previous file with comments | « media/blink/video_frame_compositor.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698