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

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

Issue 1156993013: New media playback UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: minor decrufting. Created 5 years, 5 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
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());

Powered by Google App Engine
This is Rietveld 408576698