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 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
777 WebMediaPlayer::NetworkState WebMediaPlayerImpl::GetNetworkState() const { | 777 WebMediaPlayer::NetworkState WebMediaPlayerImpl::GetNetworkState() const { |
778 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 778 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
779 return network_state_; | 779 return network_state_; |
780 } | 780 } |
781 | 781 |
782 WebMediaPlayer::ReadyState WebMediaPlayerImpl::GetReadyState() const { | 782 WebMediaPlayer::ReadyState WebMediaPlayerImpl::GetReadyState() const { |
783 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 783 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
784 return ready_state_; | 784 return ready_state_; |
785 } | 785 } |
786 | 786 |
787 blink::WebString WebMediaPlayerImpl::GetErrorMessage() { | 787 blink::WebString WebMediaPlayerImpl::GetErrorMessage() const { |
788 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 788 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
789 return blink::WebString::FromUTF8(media_log_->GetLastErrorMessage()); | 789 return blink::WebString::FromUTF8(media_log_->GetErrorMessage()); |
790 } | 790 } |
791 | 791 |
792 blink::WebTimeRanges WebMediaPlayerImpl::Buffered() const { | 792 blink::WebTimeRanges WebMediaPlayerImpl::Buffered() const { |
793 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 793 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
794 | 794 |
795 Ranges<base::TimeDelta> buffered_time_ranges = | 795 Ranges<base::TimeDelta> buffered_time_ranges = |
796 pipeline_controller_.GetBufferedTimeRanges(); | 796 pipeline_controller_.GetBufferedTimeRanges(); |
797 | 797 |
798 const base::TimeDelta duration = GetPipelineMediaDuration(); | 798 const base::TimeDelta duration = GetPipelineMediaDuration(); |
799 if (duration != kInfiniteDuration) { | 799 if (duration != kInfiniteDuration) { |
(...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2395 | 2395 |
2396 if (is_encrypted_) | 2396 if (is_encrypted_) |
2397 UMA_HISTOGRAM_VIDEO_HEIGHT("Media.VideoHeight.Initial.EME", height); | 2397 UMA_HISTOGRAM_VIDEO_HEIGHT("Media.VideoHeight.Initial.EME", height); |
2398 | 2398 |
2399 UMA_HISTOGRAM_VIDEO_HEIGHT("Media.VideoHeight.Initial.All", height); | 2399 UMA_HISTOGRAM_VIDEO_HEIGHT("Media.VideoHeight.Initial.All", height); |
2400 } | 2400 } |
2401 | 2401 |
2402 #undef UMA_HISTOGRAM_VIDEO_HEIGHT | 2402 #undef UMA_HISTOGRAM_VIDEO_HEIGHT |
2403 | 2403 |
2404 } // namespace media | 2404 } // namespace media |
OLD | NEW |