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

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

Issue 2563853003: [MediaControls] Listen to durationchange instead of letting HTML call methods of MediaControls (Closed)
Patch Set: addressed nits from mlamouri@ Created 4 years 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
Index: third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
index c7685babd45c0dc954c0a852c454b8367de70065..daade53bb3b95adf43a7c2788d7c3a2bff1790b9 100644
--- a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
@@ -705,6 +705,11 @@ void MediaControls::onTimeUpdate() {
makeTransparent();
}
+void MediaControls::onDurationChange() {
+ m_timeline->setDuration(mediaElement().duration());
+ updateCurrentTimeDisplay();
+}
+
void MediaControls::onPlay() {
updatePlayState();
m_timeline->setPosition(mediaElement().currentTime());

Powered by Google App Engine
This is Rietveld 408576698