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

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

Issue 247083003: Revert "Make scrubbing a MediaControls-internal concept" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 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 e2e5431ee3eee82a95a4b242692b452ae4047c7b..29bef6fc94f68fc1f96b5a94d99fa8b105f7d1fd 100644
--- a/Source/core/html/shadow/MediaControls.cpp
+++ b/Source/core/html/shadow/MediaControls.cpp
@@ -61,7 +61,6 @@ MediaControls::MediaControls(HTMLMediaElement& mediaElement)
, m_enclosure(0)
, m_hideMediaControlsTimer(this, &MediaControls::hideMediaControlsTimerFired)
, m_isMouseOverControls(false)
- , m_isPausedForScrubbing(false)
{
}
@@ -250,9 +249,6 @@ void MediaControls::playbackStopped()
void MediaControls::updatePlayState()
{
- if (m_isPausedForScrubbing)
- return;
-
if (m_overlayPlayButton)
m_overlayPlayButton->updateDisplayType();
m_playButton->updateDisplayType();
@@ -260,19 +256,18 @@ void MediaControls::updatePlayState()
void MediaControls::beginScrubbing()
{
- if (!mediaElement().togglePlayStateWillPlay()) {
- m_isPausedForScrubbing = true;
- mediaElement().togglePlayState();
- }
+ if (mediaElement().controller())
+ mediaElement().controller()->beginScrubbing();
+ else
+ mediaElement().beginScrubbing();
}
void MediaControls::endScrubbing()
{
- if (m_isPausedForScrubbing) {
- m_isPausedForScrubbing = false;
- if (mediaElement().togglePlayStateWillPlay())
- mediaElement().togglePlayState();
- }
+ if (mediaElement().controller())
+ mediaElement().controller()->endScrubbing();
+ else
+ mediaElement().endScrubbing();
}
void MediaControls::updateCurrentTimeDisplay()
« 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