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

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

Issue 2363813002: Clear pause timer upon start of a playback. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 388
389 #if defined(OS_ANDROID) // WMPI_CAST 389 #if defined(OS_ANDROID) // WMPI_CAST
390 if (isRemote()) { 390 if (isRemote()) {
391 cast_impl_.play(); 391 cast_impl_.play();
392 return; 392 return;
393 } 393 }
394 #endif 394 #endif
395 paused_ = false; 395 paused_ = false;
396 is_idle_ = false; 396 is_idle_ = false;
397 pipeline_.SetPlaybackRate(playback_rate_); 397 pipeline_.SetPlaybackRate(playback_rate_);
398 background_pause_timer_.Stop();
398 399
399 if (data_source_) 400 if (data_source_)
400 data_source_->MediaIsPlaying(); 401 data_source_->MediaIsPlaying();
401 402
402 DCHECK(watch_time_reporter_); 403 DCHECK(watch_time_reporter_);
403 watch_time_reporter_->OnPlaying(); 404 watch_time_reporter_->OnPlaying();
404 media_log_->AddEvent(media_log_->CreateEvent(MediaLogEvent::PLAY)); 405 media_log_->AddEvent(media_log_->CreateEvent(MediaLogEvent::PLAY));
405 UpdatePlayState(); 406 UpdatePlayState();
406 } 407 }
407 408
(...skipping 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after
1814 pipeline_metadata_.natural_size, 1815 pipeline_metadata_.natural_size,
1815 base::Bind(&GetCurrentTimeInternal, this))); 1816 base::Bind(&GetCurrentTimeInternal, this)));
1816 watch_time_reporter_->OnVolumeChange(volume_); 1817 watch_time_reporter_->OnVolumeChange(volume_);
1817 if (delegate_ && delegate_->IsHidden()) 1818 if (delegate_ && delegate_->IsHidden())
1818 watch_time_reporter_->OnHidden(); 1819 watch_time_reporter_->OnHidden();
1819 else 1820 else
1820 watch_time_reporter_->OnShown(); 1821 watch_time_reporter_->OnShown();
1821 } 1822 }
1822 1823
1823 } // namespace media 1824 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698