| 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 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 WebMediaPlayer::NetworkState WebMediaPlayerImpl::GetNetworkState() const { | 776 WebMediaPlayer::NetworkState WebMediaPlayerImpl::GetNetworkState() const { |
| 777 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 777 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
| 778 return network_state_; | 778 return network_state_; |
| 779 } | 779 } |
| 780 | 780 |
| 781 WebMediaPlayer::ReadyState WebMediaPlayerImpl::GetReadyState() const { | 781 WebMediaPlayer::ReadyState WebMediaPlayerImpl::GetReadyState() const { |
| 782 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 782 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
| 783 return ready_state_; | 783 return ready_state_; |
| 784 } | 784 } |
| 785 | 785 |
| 786 blink::WebString WebMediaPlayerImpl::GetErrorMessage() { | 786 blink::WebString WebMediaPlayerImpl::GetErrorMessage() const { |
| 787 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 787 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
| 788 return blink::WebString::FromUTF8(media_log_->GetLastErrorMessage()); | 788 return blink::WebString::FromUTF8(media_log_->GetErrorMessage()); |
| 789 } | 789 } |
| 790 | 790 |
| 791 blink::WebTimeRanges WebMediaPlayerImpl::Buffered() const { | 791 blink::WebTimeRanges WebMediaPlayerImpl::Buffered() const { |
| 792 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 792 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
| 793 | 793 |
| 794 Ranges<base::TimeDelta> buffered_time_ranges = | 794 Ranges<base::TimeDelta> buffered_time_ranges = |
| 795 pipeline_controller_.GetBufferedTimeRanges(); | 795 pipeline_controller_.GetBufferedTimeRanges(); |
| 796 | 796 |
| 797 const base::TimeDelta duration = GetPipelineMediaDuration(); | 797 const base::TimeDelta duration = GetPipelineMediaDuration(); |
| 798 if (duration != kInfiniteDuration) { | 798 if (duration != kInfiniteDuration) { |
| (...skipping 1584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2383 | 2383 |
| 2384 if (is_encrypted_) | 2384 if (is_encrypted_) |
| 2385 UMA_HISTOGRAM_VIDEO_HEIGHT("Media.VideoHeight.Initial.EME", height); | 2385 UMA_HISTOGRAM_VIDEO_HEIGHT("Media.VideoHeight.Initial.EME", height); |
| 2386 | 2386 |
| 2387 UMA_HISTOGRAM_VIDEO_HEIGHT("Media.VideoHeight.Initial.All", height); | 2387 UMA_HISTOGRAM_VIDEO_HEIGHT("Media.VideoHeight.Initial.All", height); |
| 2388 } | 2388 } |
| 2389 | 2389 |
| 2390 #undef UMA_HISTOGRAM_VIDEO_HEIGHT | 2390 #undef UMA_HISTOGRAM_VIDEO_HEIGHT |
| 2391 | 2391 |
| 2392 } // namespace media | 2392 } // namespace media |
| OLD | NEW |