 Chromium Code Reviews
 Chromium Code Reviews Issue 1156993013:
  New media playback UI.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master
    
  
    Issue 1156993013:
  New media playback UI.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master| 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..07fcb1bab768735d47fd9a0125f8045339d26dd4 100644 | 
| --- a/Source/core/html/shadow/MediaControls.h | 
| +++ b/Source/core/html/shadow/MediaControls.h | 
| @@ -67,6 +67,7 @@ public: | 
| void stoppedCasting(); | 
| void refreshCastButtonVisibility(); | 
| void showOverlayCastButton(); | 
| + void hideCastButtons(); | 
| 
philipj_slow
2015/07/09 08:56:11
Ought this not be equivalent to refreshCastButtonV
 
liberato (no reviews please)
2015/07/09 22:35:35
i originally had it that way, but decided that it
 
philipj_slow
2015/07/10 14:51:58
Acknowledged.
 | 
| void mediaElementFocused(); | 
| @@ -74,6 +75,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 +107,20 @@ 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>*); | 
| + | 
| + // For the new UI, hide elements that don't fit, and show those things | 
| 
philipj_slow
2015/07/09 08:56:11
Remove "For the new UI" or it's sure to be left in
 
liberato (no reviews please)
2015/07/09 22:35:35
Done.
 | 
| + // that we want that do fit. | 
| + void computeWhichControlsFit(int panelWidth); | 
| + | 
| + // Update cast button visibility, but don't try to update our panel | 
| + // button visibility for space. | 
| + void refreshCastButtonVisibilityWithoutUpdate(); | 
| + | 
| // Node | 
| bool isMediaControls() const override { return true; } | 
| bool willRespondToMouseMoveEvents() override { return true; } | 
| @@ -131,6 +149,9 @@ private: | 
| unsigned m_hideTimerBehaviorFlags; | 
| bool m_isMouseOverControls : 1; | 
| bool m_isPausedForScrubbing : 1; | 
| + | 
| + Timer<MediaControls> m_panelWidthChangedTimer; | 
| + int m_panelWidth; | 
| }; | 
| DEFINE_ELEMENT_TYPE_CASTS(MediaControls, isMediaControls()); |