OLD | NEW |
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 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1523 void WebMediaPlayerImpl::OnPause() { | 1523 void WebMediaPlayerImpl::OnPause() { |
1524 pause(); | 1524 pause(); |
1525 client_->playbackStateChanged(); | 1525 client_->playbackStateChanged(); |
1526 } | 1526 } |
1527 | 1527 |
1528 void WebMediaPlayerImpl::OnVolumeMultiplierUpdate(double multiplier) { | 1528 void WebMediaPlayerImpl::OnVolumeMultiplierUpdate(double multiplier) { |
1529 volume_multiplier_ = multiplier; | 1529 volume_multiplier_ = multiplier; |
1530 setVolume(volume_); | 1530 setVolume(volume_); |
1531 } | 1531 } |
1532 | 1532 |
| 1533 void WebMediaPlayerImpl::OnBecamePersistentVideo(bool value) { |
| 1534 client_->onBecamePersistentVideo(value); |
| 1535 } |
| 1536 |
1533 void WebMediaPlayerImpl::ScheduleRestart() { | 1537 void WebMediaPlayerImpl::ScheduleRestart() { |
1534 // TODO(watk): All restart logic should be moved into PipelineController. | 1538 // TODO(watk): All restart logic should be moved into PipelineController. |
1535 if (pipeline_controller_.IsPipelineRunning() && | 1539 if (pipeline_controller_.IsPipelineRunning() && |
1536 !pipeline_controller_.IsPipelineSuspended()) { | 1540 !pipeline_controller_.IsPipelineSuspended()) { |
1537 pending_suspend_resume_cycle_ = true; | 1541 pending_suspend_resume_cycle_ = true; |
1538 UpdatePlayState(); | 1542 UpdatePlayState(); |
1539 } | 1543 } |
1540 } | 1544 } |
1541 | 1545 |
1542 void WebMediaPlayerImpl::requestRemotePlaybackDisabled(bool disabled) { | 1546 void WebMediaPlayerImpl::requestRemotePlaybackDisabled(bool disabled) { |
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2320 | 2324 |
2321 void WebMediaPlayerImpl::RecordUnderflowDuration(base::TimeDelta duration) { | 2325 void WebMediaPlayerImpl::RecordUnderflowDuration(base::TimeDelta duration) { |
2322 DCHECK(data_source_ || chunk_demuxer_); | 2326 DCHECK(data_source_ || chunk_demuxer_); |
2323 if (data_source_) | 2327 if (data_source_) |
2324 UMA_HISTOGRAM_TIMES("Media.UnderflowDuration", duration); | 2328 UMA_HISTOGRAM_TIMES("Media.UnderflowDuration", duration); |
2325 else | 2329 else |
2326 UMA_HISTOGRAM_TIMES("Media.UnderflowDuration.MSE", duration); | 2330 UMA_HISTOGRAM_TIMES("Media.UnderflowDuration.MSE", duration); |
2327 } | 2331 } |
2328 | 2332 |
2329 } // namespace media | 2333 } // namespace media |
OLD | NEW |