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

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

Issue 2389473002: Media Remoting: Add RemotingController. (Closed)
Patch Set: Add building flag. Created 4 years, 2 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 cb8efeffd7bb3e843c17fa3f5debc2591e0afc5f..7a341fddc3bc803f0ee6d62fa188ce4f4145b278 100644
--- a/third_party/WebKit/Source/web/FullscreenController.cpp
+++ b/third_party/WebKit/Source/web/FullscreenController.cpp
@@ -31,6 +31,7 @@
#include "web/FullscreenController.h"
#include "core/dom/Document.h"
+#include "core/dom/ElementTraversal.h"
#include "core/dom/Fullscreen.h"
#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"
@@ -86,6 +87,12 @@ void FullscreenController::didEnterFullscreen() {
if (videoElement->usesOverlayFullscreenVideo() &&
m_webViewImpl->layerTreeView())
m_webViewImpl->layerTreeView()->setHasTransparentBackground(true);
+ } else {
+ for (HTMLVideoElement& videoElement :
+ Traversal<HTMLVideoElement>::descendantsOf(*element)) {
+ if (videoElement.webMediaPlayer())
+ videoElement.webMediaPlayer()->ancestorEnteredFullscreen();
+ }
}
}
@@ -120,6 +127,13 @@ void FullscreenController::didExitFullscreen() {
m_needsScrollAndScaleRestore = true;
fullscreen->didExitFullscreen();
+ if (!isHTMLVideoElement(element)) {
+ for (HTMLVideoElement& videoElement :
+ Traversal<HTMLVideoElement>::descendantsOf(*element)) {
+ if (videoElement.webMediaPlayer())
+ videoElement.webMediaPlayer()->ancestorExitedFullscreen();
+ }
+ }
}
}
}

Powered by Google App Engine
This is Rietveld 408576698