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

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

Issue 2793273002: Use internal hooks for notifying fullscreen changes to media controls (Closed)
Patch Set: update more tests Created 3 years, 8 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.cpp
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
index 6fcf2642e672bbb9fa145f243b43bcf7045fa993..26e5af48c5b30e7160e1b7057e0376bffb753a0a 100644
--- a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
@@ -671,6 +671,22 @@ void MediaControls::exitFullscreen() {
Fullscreen::exitFullscreen(document());
}
+void MediaControls::didEnterFullscreen() {
+ m_fullscreenButton->setIsFullscreen(true);
+ stopHideMediaControlsTimer();
+ startHideMediaControlsTimer();
+ if (m_orientationLockDelegate)
+ m_orientationLockDelegate->didEnterFullscreen();
+}
+
+void MediaControls::didExitFullscreen() {
+ m_fullscreenButton->setIsFullscreen(false);
+ stopHideMediaControlsTimer();
+ startHideMediaControlsTimer();
+ if (m_orientationLockDelegate)
+ m_orientationLockDelegate->didExitFullscreen();
+}
+
void MediaControls::startedCasting() {
m_castButton->setIsPlayingRemotely(true);
m_overlayCastButton->setIsPlayingRemotely(true);
@@ -882,18 +898,6 @@ void MediaControls::onLoadedMetadata() {
reset();
}
-void MediaControls::onEnteredFullscreen() {
- m_fullscreenButton->setIsFullscreen(true);
- stopHideMediaControlsTimer();
- startHideMediaControlsTimer();
-}
-
-void MediaControls::onExitedFullscreen() {
- m_fullscreenButton->setIsFullscreen(false);
- stopHideMediaControlsTimer();
- startHideMediaControlsTimer();
-}
-
void MediaControls::notifyElementSizeChanged(ClientRect* newSize) {
// Note that this code permits a bad frame on resize, since it is
// run after the relayout / paint happens. It would be great to improve

Powered by Google App Engine
This is Rietveld 408576698