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

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

Issue 2477203002: Media Controls: delegate 'volumechange' and 'focusin' handling to an EventListener. (Closed)
Patch Set: add comment Created 4 years, 1 month 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.h
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControls.h b/third_party/WebKit/Source/core/html/shadow/MediaControls.h
index 93e9fe8f3dfc22eab5c281cf1e303b7a47f25b65..923c6db04d7ebcbfa4d4ad45ddcc022ff67eca50 100644
--- a/third_party/WebKit/Source/core/html/shadow/MediaControls.h
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControls.h
@@ -33,6 +33,7 @@
namespace blink {
class Event;
+class MediaControlsMediaEventListener;
class MediaControlsWindowEventListener;
class CORE_EXPORT MediaControls final : public HTMLDivElement {
@@ -56,8 +57,6 @@ class CORE_EXPORT MediaControls final : public HTMLDivElement {
void updateCurrentTimeDisplay();
- void updateVolume();
-
void changedClosedCaptionsVisibility();
void refreshClosedCaptionsButtonVisibility();
void toggleTextTrackList();
@@ -77,8 +76,6 @@ class CORE_EXPORT MediaControls final : public HTMLDivElement {
void setAllowHiddenVolumeControls(bool);
- void mediaElementFocused();
-
// Returns the layout object for the part of the controls that should be
// used for overlap checking during text track layout. May be null.
LayoutObject* layoutObjectForTextTrackLayout();
@@ -105,6 +102,7 @@ class CORE_EXPORT MediaControls final : public HTMLDivElement {
DECLARE_VIRTUAL_TRACE();
private:
+ friend class MediaControlsMediaEventListener;
friend class MediaControlsTest;
void invalidate(Element*);
@@ -148,6 +146,10 @@ class CORE_EXPORT MediaControls final : public HTMLDivElement {
void defaultEventHandler(Event*) override;
bool containsRelatedTarget(Event*);
+ // Methods called by MediaControlsMediaEventListener.
+ void onVolumeChange();
+ void onFocusIn();
+
Member<HTMLMediaElement> m_mediaElement;
// Media control elements.
@@ -172,6 +174,7 @@ class CORE_EXPORT MediaControls final : public HTMLDivElement {
Member<MediaControlFullscreenButtonElement> m_fullscreenButton;
Member<MediaControlDownloadButtonElement> m_downloadButton;
+ Member<MediaControlsMediaEventListener> m_mediaEventListener;
Member<MediaControlsWindowEventListener> m_windowEventListener;
Timer<MediaControls> m_hideMediaControlsTimer;

Powered by Google App Engine
This is Rietveld 408576698