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

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

Issue 217103004: Ignore MediaController in the muted/volume controls logic (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: repaint in updateVolume 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 81ab4cb426c2f42ec7c1cf9584b943e4cfd9a046..acaabef0dfb1628c2081e83eee5c82589d48ee69 100644
--- a/Source/core/html/shadow/MediaControls.cpp
+++ b/Source/core/html/shadow/MediaControls.cpp
@@ -183,12 +183,11 @@ void MediaControls::reset()
m_timeline->setDuration(mediaControllerInterface().duration());
m_timeline->setPosition(mediaControllerInterface().currentTime());
- if (!mediaControllerInterface().hasAudio()) {
+ if (!mediaElement().hasAudio())
m_volumeSlider->hide();
- } else {
+ else
m_volumeSlider->show();
- m_volumeSlider->setVolume(mediaControllerInterface().volume());
- }
+ updateVolume();
refreshClosedCaptionsButtonVisibility();
@@ -303,21 +302,16 @@ void MediaControls::updateCurrentTimeDisplay()
m_currentTimeDisplay->setCurrentValue(now);
}
-void MediaControls::changedMute()
+void MediaControls::updateVolume()
{
m_muteButton->updateDisplayType();
+ if (m_muteButton->renderer())
+ m_muteButton->renderer()->repaint();
- if (mediaControllerInterface().muted())
+ if (mediaElement().muted())
m_volumeSlider->setVolume(0);
else
- m_volumeSlider->setVolume(mediaControllerInterface().volume());
-}
-
-void MediaControls::changedVolume()
-{
- m_volumeSlider->setVolume(mediaControllerInterface().volume());
- if (m_muteButton->renderer())
- m_muteButton->renderer()->repaint();
+ m_volumeSlider->setVolume(mediaElement().volume());
}
void MediaControls::changedClosedCaptionsVisibility()
« 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