Index: Source/core/html/HTMLVideoElement.cpp |
diff --git a/Source/core/html/HTMLVideoElement.cpp b/Source/core/html/HTMLVideoElement.cpp |
index 1fd3884597140f252920d6f5e0924fb1c446b25a..db2387f1e9c67b964f248a2c7eb86861ed589bc3 100644 |
--- a/Source/core/html/HTMLVideoElement.cpp |
+++ b/Source/core/html/HTMLVideoElement.cpp |
@@ -38,6 +38,7 @@ |
#include "core/html/parser/HTMLParserIdioms.h" |
#include "core/layout/LayoutImage.h" |
#include "core/layout/LayoutVideo.h" |
+#include "platform/RuntimeEnabledFeatures.h" |
#include "platform/UserGestureIndicator.h" |
#include "platform/graphics/GraphicsContext.h" |
#include "platform/graphics/ImageBuffer.h" |
@@ -244,6 +245,20 @@ bool HTMLVideoElement::webkitDisplayingFullscreen() |
return isFullscreen(); |
} |
+bool HTMLVideoElement::usesOverlayFullscreenVideo() const |
+{ |
+ if (RuntimeEnabledFeatures::forceOverlayFullscreenVideoEnabled()) |
+ return true; |
+ |
+ // TODO(watk): Remove this and the REF check below when the chromium side change to not |
+ // set OverlayFullscreenVideo on Android lands. http://crbug.com/511376 |
+ if (HTMLMediaElement::isMediaStreamURL(sourceURL().string())) |
+ return false; |
+ |
+ return RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() |
+ || (webMediaPlayer() && webMediaPlayer()->supportsOverlayFullscreenVideo()); |
+} |
+ |
void HTMLVideoElement::didMoveToNewDocument(Document& oldDocument) |
{ |
if (m_imageLoader) |