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

Unified Diff: Source/core/html/shadow/MediaControls.cpp

Issue 219283004: Remove what remains of MediaControllerInterface (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: earliest possible position FIXME Created 6 years, 9 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/shadow/MediaControls.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/shadow/MediaControls.cpp
diff --git a/Source/core/html/shadow/MediaControls.cpp b/Source/core/html/shadow/MediaControls.cpp
index acaabef0dfb1628c2081e83eee5c82589d48ee69..5ecf0fa81d7798f65c62cfdae701b4636c8b6663 100644
--- a/Source/core/html/shadow/MediaControls.cpp
+++ b/Source/core/html/shadow/MediaControls.cpp
@@ -163,16 +163,9 @@ bool MediaControls::initializeControls()
return true;
}
-MediaControllerInterface& MediaControls::mediaControllerInterface() const
-{
- if (m_mediaElement.controller())
- return *m_mediaElement.controller();
- return m_mediaElement;
-}
-
void MediaControls::reset()
{
- double duration = mediaControllerInterface().duration();
+ double duration = mediaElement().duration();
m_durationDisplay->setInnerText(RenderTheme::theme().formatMediaControlsTime(duration), ASSERT_NO_EXCEPTION);
m_durationDisplay->setCurrentValue(duration);
@@ -180,8 +173,8 @@ void MediaControls::reset()
updateCurrentTimeDisplay();
- m_timeline->setDuration(mediaControllerInterface().duration());
- m_timeline->setPosition(mediaControllerInterface().currentTime());
+ m_timeline->setDuration(duration);
+ m_timeline->setPosition(mediaElement().currentTime());
if (!mediaElement().hasAudio())
m_volumeSlider->hide();
@@ -233,7 +226,7 @@ void MediaControls::playbackStarted()
m_durationDisplay->hide();
updatePlayState();
- m_timeline->setPosition(mediaControllerInterface().currentTime());
+ m_timeline->setPosition(mediaElement().currentTime());
updateCurrentTimeDisplay();
if (m_isFullscreen)
@@ -242,7 +235,7 @@ void MediaControls::playbackStarted()
void MediaControls::playbackProgressed()
{
- m_timeline->setPosition(mediaControllerInterface().currentTime());
+ m_timeline->setPosition(mediaElement().currentTime());
updateCurrentTimeDisplay();
if (!m_isMouseOverControls && mediaElement().hasVideo())
@@ -252,7 +245,7 @@ void MediaControls::playbackProgressed()
void MediaControls::playbackStopped()
{
updatePlayState();
- m_timeline->setPosition(mediaControllerInterface().currentTime());
+ m_timeline->setPosition(mediaElement().currentTime());
updateCurrentTimeDisplay();
makeOpaque();
@@ -288,8 +281,8 @@ void MediaControls::endScrubbing()
void MediaControls::updateCurrentTimeDisplay()
{
- double now = mediaControllerInterface().currentTime();
- double duration = mediaControllerInterface().duration();
+ double now = mediaElement().currentTime();
+ double duration = mediaElement().duration();
// After seek, hide duration display and show current time.
if (now > 0) {
« no previous file with comments | « Source/core/html/shadow/MediaControls.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698