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

Side by Side Diff: media/blink/webmediaplayer_impl.cc

Issue 2767823002: Media Remoting: Add interstitial elements to media element shadow dom. (Closed)
Patch Set: Addressed liberato's comments. Changed to use HTMLDivElement instead of HTMLInputElement. Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/blink/webmediaplayer_impl.h" 5 #include "media/blink/webmediaplayer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <limits> 9 #include <limits>
10 #include <string> 10 #include <string>
(...skipping 2307 matching lines...) Expand 10 before | Expand all | Expand 10 after
2318 base::TimeDelta time_to_first_frame = new_frame_time - foreground_time; 2318 base::TimeDelta time_to_first_frame = new_frame_time - foreground_time;
2319 if (HasAudio()) { 2319 if (HasAudio()) {
2320 UMA_HISTOGRAM_TIMES( 2320 UMA_HISTOGRAM_TIMES(
2321 "Media.Video.TimeFromForegroundToFirstFrame.DisableTrack", 2321 "Media.Video.TimeFromForegroundToFirstFrame.DisableTrack",
2322 time_to_first_frame); 2322 time_to_first_frame);
2323 } else { 2323 } else {
2324 UMA_HISTOGRAM_TIMES("Media.Video.TimeFromForegroundToFirstFrame.Paused", 2324 UMA_HISTOGRAM_TIMES("Media.Video.TimeFromForegroundToFirstFrame.Paused",
2325 time_to_first_frame); 2325 time_to_first_frame);
2326 } 2326 }
2327 } 2327 }
2328 void WebMediaPlayerImpl::SwitchRenderer(bool disable_pipeline_auto_suspend) { 2328 void WebMediaPlayerImpl::SwitchRenderer(bool is_rendered_remotely) {
2329 DCHECK(main_task_runner_->BelongsToCurrentThread()); 2329 DCHECK(main_task_runner_->BelongsToCurrentThread());
2330 disable_pipeline_auto_suspend_ = disable_pipeline_auto_suspend; 2330 disable_pipeline_auto_suspend_ = is_rendered_remotely;
2331 ScheduleRestart(); 2331 ScheduleRestart();
2332 if (client_) {
2333 if (is_rendered_remotely)
2334 client_->MediaRemotingStarted();
2335 else
2336 client_->MediaRemotingStopped();
2337 }
2332 } 2338 }
2333 2339
2334 void WebMediaPlayerImpl::RecordUnderflowDuration(base::TimeDelta duration) { 2340 void WebMediaPlayerImpl::RecordUnderflowDuration(base::TimeDelta duration) {
2335 DCHECK(data_source_ || chunk_demuxer_); 2341 DCHECK(data_source_ || chunk_demuxer_);
2336 if (data_source_) 2342 if (data_source_)
2337 UMA_HISTOGRAM_TIMES("Media.UnderflowDuration", duration); 2343 UMA_HISTOGRAM_TIMES("Media.UnderflowDuration", duration);
2338 else 2344 else
2339 UMA_HISTOGRAM_TIMES("Media.UnderflowDuration.MSE", duration); 2345 UMA_HISTOGRAM_TIMES("Media.UnderflowDuration.MSE", duration);
2340 } 2346 }
2341 2347
2342 } // namespace media 2348 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698