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

Unified Diff: Source/core/html/HTMLMediaElement.cpp

Issue 156183003: Remove HTMLMediaElement::percentLoaded() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLMediaElement.cpp
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
index b8dc2bde778c1be33b154da95d6802745ef77a83..598583eff9d79b8a11288cebdcca901165fbed4a 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -2499,25 +2499,6 @@ bool HTMLMediaElement::canPlay() const
return paused() || ended() || m_readyState < HAVE_METADATA;
}
-double HTMLMediaElement::percentLoaded() const
-{
- if (!m_player)
- return 0;
- double duration = m_player->duration();
-
- if (!duration || std::isinf(duration))
- return 0;
-
- double buffered = 0;
- RefPtr<TimeRanges> timeRanges = m_player->buffered();
- for (unsigned i = 0; i < timeRanges->length(); ++i) {
- double start = timeRanges->start(i, IGNORE_EXCEPTION);
- double end = timeRanges->end(i, IGNORE_EXCEPTION);
- buffered += end - start;
- }
- return buffered / duration;
-}
-
void HTMLMediaElement::mediaPlayerDidAddTrack(WebInbandTextTrack* webTrack)
{
if (!RuntimeEnabledFeatures::videoTrackEnabled())
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698