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

Unified Diff: third_party/WebKit/Source/core/html/shadow/MediaControlsMediaEventListener.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
« no previous file with comments | « third_party/WebKit/Source/core/html/shadow/MediaControls.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/shadow/MediaControlsMediaEventListener.cpp
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControlsMediaEventListener.cpp b/third_party/WebKit/Source/core/html/shadow/MediaControlsMediaEventListener.cpp
index 9b6dae1cd4269c01be186f647103095bc7548f31..d440d055683b93a81d63f916d456e943c92c88c7 100644
--- a/third_party/WebKit/Source/core/html/shadow/MediaControlsMediaEventListener.cpp
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControlsMediaEventListener.cpp
@@ -24,6 +24,8 @@ MediaControlsMediaEventListener::MediaControlsMediaEventListener(
false);
m_mediaControls->m_mediaElement->addEventListener(EventTypeNames::pause, this,
false);
+ m_mediaControls->m_mediaElement->addEventListener(
+ EventTypeNames::durationchange, this, false);
// TextTracks events.
TextTrackList* textTracks = m_mediaControls->m_mediaElement->textTracks();
@@ -52,6 +54,10 @@ void MediaControlsMediaEventListener::handleEvent(
m_mediaControls->onTimeUpdate();
return;
}
+ if (event->type() == EventTypeNames::durationchange) {
+ m_mediaControls->onDurationChange();
+ return;
+ }
if (event->type() == EventTypeNames::play) {
m_mediaControls->onPlay();
return;
« no previous file with comments | « third_party/WebKit/Source/core/html/shadow/MediaControls.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698