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

Unified Diff: third_party/WebKit/Source/web/FullscreenController.cpp

Issue 2204673004: WIP - WebMediaPlayer switch media renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add switching of CdmFactory. Created 4 years, 4 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/web/FullscreenController.cpp
diff --git a/third_party/WebKit/Source/web/FullscreenController.cpp b/third_party/WebKit/Source/web/FullscreenController.cpp
index 1d0f0fcc1cfe818faf7921877ab15ccf4eba3ca6..b0ae9ac1248e731b2ec5f48f444a1fb87795be4f 100644
--- a/third_party/WebKit/Source/web/FullscreenController.cpp
+++ b/third_party/WebKit/Source/web/FullscreenController.cpp
@@ -40,6 +40,7 @@
#include "platform/RuntimeEnabledFeatures.h"
#include "public/platform/WebLayerTreeView.h"
#include "public/web/WebFrameClient.h"
+#include "third_party/WebKit/Source/core/dom/TagCollection.h"
#include "web/WebLocalFrameImpl.h"
#include "web/WebSettingsImpl.h"
#include "web/WebViewImpl.h"
@@ -88,6 +89,10 @@ void FullscreenController::didEnterFullscreen()
HTMLVideoElement* videoElement = toHTMLVideoElement(element);
if (videoElement->usesOverlayFullscreenVideo() && m_webViewImpl->layerTreeView())
m_webViewImpl->layerTreeView()->setHasTransparentBackground(true);
+ } else {
+ // Notify all the video descendants that it enters full screen.
+ for (HTMLVideoElement& videoElement : Traversal<HTMLVideoElement>::descendantsOf(*element))
+ videoElement.parentEnteredFullscreen();
}
}
@@ -120,6 +125,11 @@ void FullscreenController::didExitFullscreen()
m_needsScrollAndScaleRestore = true;
fullscreen->didExitFullscreen();
+ if (!isHTMLVideoElement(element)) {
+ // Notify all the video descendants that it exits full screen.
+ for (HTMLVideoElement& videoElement : Traversal<HTMLVideoElement>::descendantsOf(*element))
+ videoElement.parentExitedFullscreen();
+ }
}
}
}

Powered by Google App Engine
This is Rietveld 408576698