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

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

Issue 2701433003: Hide overlay play button if it can't be shown without clipping (Closed)
Patch Set: Refactor to use ResizeObserver Created 3 years, 10 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: 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 b2046b6cbf97cd441b9544e5aaa4bb1c7126c58c..79c0b4f75b5cf0c7f2e623ea14fa8558c512da8e 100644
--- a/third_party/WebKit/Source/core/html/shadow/MediaControls.h
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControls.h
@@ -83,8 +83,8 @@ class CORE_EXPORT MediaControls final : public HTMLDivElement {
return m_volumeSlider;
}
- // Notify us that our controls enclosure has changed width.
- void notifyPanelWidthChanged(const LayoutUnit& newWidth);
+ // Notify us that our controls enclosure has changed size.
+ void notifyPanelSizeChanged(int newWidth, int newHeight);
mlamouri (slow - plz ping) 2017/02/22 11:48:08 I guess the name needs to be updated?
steimel 2017/02/23 00:53:48 Done.
// Notify us that the media element's network state has changed.
void networkStateChanged();
@@ -121,6 +121,9 @@ class CORE_EXPORT MediaControls final : public HTMLDivElement {
class BatchedControlUpdate;
+ class MediaControlsResizeObserverCallback;
mlamouri (slow - plz ping) 2017/02/22 11:48:08 Do you need to have the class declared here?
steimel 2017/02/23 00:53:48 Discussed offline and leaving here since I'm chang
+ Member<ResizeObserver> m_resizeObserver;
+
explicit MediaControls(HTMLMediaElement&);
void initializeControls();
@@ -144,7 +147,7 @@ class CORE_EXPORT MediaControls final : public HTMLDivElement {
void stopHideMediaControlsTimer();
void resetHideMediaControlsTimer();
- void panelWidthChangedTimerFired(TimerBase*);
+ void panelSizeChangedTimerFired(TimerBase*);
void hideAllMenus();
@@ -210,8 +213,9 @@ class CORE_EXPORT MediaControls final : public HTMLDivElement {
bool m_isMouseOverControls : 1;
bool m_isPausedForScrubbing : 1;
- TaskRunnerTimer<MediaControls> m_panelWidthChangedTimer;
+ TaskRunnerTimer<MediaControls> m_panelSizeChangedTimer;
int m_panelWidth;
+ int m_panelHeight;
bool m_keepShowingUntilTimerFires : 1;
};

Powered by Google App Engine
This is Rietveld 408576698