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

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

Issue 314413003: Revert 175546 "Eliminate MediaPlayer & MediaPlayerClient abstrac..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 6 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 | « no previous file | trunk/Source/core/html/HTMLVideoElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/Source/core/html/HTMLMediaElement.cpp
===================================================================
--- trunk/Source/core/html/HTMLMediaElement.cpp (revision 175711)
+++ trunk/Source/core/html/HTMLMediaElement.cpp (working copy)
@@ -1836,7 +1836,7 @@
scheduleEvent(EventTypeNames::seeking);
// 9 - Set the current playback position to the given new playback position
- webMediaPlayer()->seek(time);
+ m_player->seek(time);
// 10-14 are handled, if necessary, when the engine signals a readystate change or otherwise
// satisfies seek completion and signals a time change.
@@ -1876,10 +1876,7 @@
void HTMLMediaElement::refreshCachedTime() const
{
- if (!webMediaPlayer())
- return;
-
- m_cachedTime = webMediaPlayer()->currentTime();
+ m_cachedTime = m_player->currentTime();
m_cachedTimeWallClockUpdateTime = WTF::currentTime();
}
@@ -1903,7 +1900,7 @@
static const double minCachedDeltaForWarning = 0.01;
#endif
- if (!m_player || !webMediaPlayer())
+ if (!m_player)
return 0;
if (m_seeking) {
@@ -1913,7 +1910,7 @@
if (m_cachedTime != MediaPlayer::invalidTime() && m_paused) {
#if LOG_CACHED_TIME_WARNINGS
- double delta = m_cachedTime - webMediaPlayer()->currentTime();
+ double delta = m_cachedTime - m_player->currentTime();
if (delta > minCachedDeltaForWarning)
WTF_LOG(Media, "HTMLMediaElement::currentTime - WARNING, cached time is %f seconds off of media time when paused", delta);
#endif
@@ -1952,7 +1949,7 @@
if (m_mediaSource)
return m_mediaSource->duration();
- return webMediaPlayer()->duration();
+ return m_player->duration();
}
bool HTMLMediaElement::paused() const
@@ -2768,7 +2765,7 @@
invalidateCachedTime();
// 4.8.10.9 steps 12-14. Needed if no ReadyState change is associated with the seek.
- if (m_seeking && m_readyState >= HAVE_CURRENT_DATA && !webMediaPlayer()->seeking())
+ if (m_seeking && m_readyState >= HAVE_CURRENT_DATA && !m_player->seeking())
finishSeek();
// Always call scheduleTimeupdateEvent when the media engine reports a time discontinuity,
« no previous file with comments | « no previous file | trunk/Source/core/html/HTMLVideoElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698