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

Side by Side Diff: content/renderer/media/android/webmediaplayer_android.cc

Issue 1850733003: Media: Report informational error messages to HTMLMediaElement (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@use_locking_in_rendermedialog
Patch Set: Rebase to ToT, address watk@'s nits. Created 4 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
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 "content/renderer/media/android/webmediaplayer_android.h" 5 #include "content/renderer/media/android/webmediaplayer_android.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <limits> 9 #include <limits>
10 10
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 } 612 }
613 613
614 WebMediaPlayer::NetworkState WebMediaPlayerAndroid::getNetworkState() const { 614 WebMediaPlayer::NetworkState WebMediaPlayerAndroid::getNetworkState() const {
615 return network_state_; 615 return network_state_;
616 } 616 }
617 617
618 WebMediaPlayer::ReadyState WebMediaPlayerAndroid::getReadyState() const { 618 WebMediaPlayer::ReadyState WebMediaPlayerAndroid::getReadyState() const {
619 return ready_state_; 619 return ready_state_;
620 } 620 }
621 621
622 blink::WebString WebMediaPlayerAndroid::getErrorMessage() {
623 return blink::WebString::fromUTF8(media_log_->GetLastErrorMessage());
624 }
625
622 blink::WebTimeRanges WebMediaPlayerAndroid::buffered() const { 626 blink::WebTimeRanges WebMediaPlayerAndroid::buffered() const {
623 if (media_source_delegate_) 627 if (media_source_delegate_)
624 return media_source_delegate_->Buffered(); 628 return media_source_delegate_->Buffered();
625 return buffered_; 629 return buffered_;
626 } 630 }
627 631
628 blink::WebTimeRanges WebMediaPlayerAndroid::seekable() const { 632 blink::WebTimeRanges WebMediaPlayerAndroid::seekable() const {
629 if (ready_state_ < WebMediaPlayer::ReadyStateHaveMetadata) 633 if (ready_state_ < WebMediaPlayer::ReadyStateHaveMetadata)
630 return blink::WebTimeRanges(); 634 return blink::WebTimeRanges();
631 635
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after
1675 result = PREDICTION_RESULT_PATH_BASED_WAS_BETTER; 1679 result = PREDICTION_RESULT_PATH_BASED_WAS_BETTER;
1676 } else if (is_hls_url == is_hls) { 1680 } else if (is_hls_url == is_hls) {
1677 result = PREDICTION_RESULT_URL_BASED_WAS_BETTER; 1681 result = PREDICTION_RESULT_URL_BASED_WAS_BETTER;
1678 } 1682 }
1679 UMA_HISTOGRAM_ENUMERATION( 1683 UMA_HISTOGRAM_ENUMERATION(
1680 "Media.Android.IsHttpLiveStreamingMediaPredictionResult", 1684 "Media.Android.IsHttpLiveStreamingMediaPredictionResult",
1681 result, PREDICTION_RESULT_MAX); 1685 result, PREDICTION_RESULT_MAX);
1682 } 1686 }
1683 1687
1684 } // namespace content 1688 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698