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

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

Issue 2837133002: To M59: Add MediaError.message (Closed)
Patch Set: 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
« no previous file with comments | « media/blink/webmediaplayer_impl.h ('k') | media/test/data/player.html » ('j') | 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 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « media/blink/webmediaplayer_impl.h ('k') | media/test/data/player.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698