Index: Source/core/html/shadow/MediaControls.h |
diff --git a/Source/core/html/shadow/MediaControls.h b/Source/core/html/shadow/MediaControls.h |
index 0c8f7ad3b959a3755d7dca5e027373463508189b..711420a9c0c871df60c08331be22511cefd63f3f 100644 |
--- a/Source/core/html/shadow/MediaControls.h |
+++ b/Source/core/html/shadow/MediaControls.h |
@@ -67,6 +67,11 @@ public: |
void stoppedCasting(); |
void refreshCastButtonVisibility(); |
void showOverlayCastButton(); |
+ // Update cast button visibility, but don't try to update our panel |
+ // button visibility for space. |
+ void refreshCastButtonVisibilityWithoutUpdate(); |
+ |
+ void setAllowHiddenAudioElements(bool); |
void mediaElementFocused(); |
@@ -74,6 +79,9 @@ public: |
// used for overlap checking during text track layout. May be null. |
LayoutObject* layoutObjectForTextTrackLayout(); |
+ // Notify us that our controls enclosure has changed width. |
+ void notifyPanelWidthChanged(int panelWidth); |
+ |
DECLARE_VIRTUAL_TRACE(); |
private: |
@@ -103,6 +111,16 @@ private: |
// element in the page, it will be hidden. |
void tryShowOverlayCastButton(); |
+ // After changing the want / don't want state of one or more controls, |
+ // call this to recompute what's visible. |
+ void changedControlSelections(); |
+ |
+ void panelWidthChangedTimerFired(Timer<MediaControls>*); |
+ |
+ // Hide elements that don't fit, and show those things that we want which |
+ // do fit. This requires that m_panelWidth is current. |
+ void computeWhichControlsFit(); |
+ |
// Node |
bool isMediaControls() const override { return true; } |
bool willRespondToMouseMoveEvents() override { return true; } |
@@ -131,6 +149,12 @@ private: |
unsigned m_hideTimerBehaviorFlags; |
bool m_isMouseOverControls : 1; |
bool m_isPausedForScrubbing : 1; |
+ |
+ Timer<MediaControls> m_panelWidthChangedTimer; |
+ int m_panelWidth; |
+ |
+ bool m_allowHiddenAudioElements : 1; |
+ bool m_keepMuteButton : 1; |
}; |
DEFINE_ELEMENT_TYPE_CASTS(MediaControls, isMediaControls()); |