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

Unified Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp

Issue 1655083002: Enable SurfaceView fullscreen video on Android with WebMediaPlayerImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@avda-sv
Patch Set: cleaned up Created 4 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/HTMLMediaElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
index 7a3c5bb811ac9c53744959f8ea10062c0685cee2..24be90364865cf702c627fa50e8339d6fb532e09 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -66,6 +66,7 @@
#include "core/page/ChromeClient.h"
#include "core/page/NetworkStateNotifier.h"
#include "platform/ContentType.h"
+#include "platform/LayoutTestSupport.h"
#include "platform/Logging.h"
#include "platform/MIMETypeFromURL.h"
#include "platform/MIMETypeRegistry.h"
@@ -3102,10 +3103,14 @@ void HTMLMediaElement::didBecomeFullscreenElement()
{
if (mediaControls())
mediaControls()->enteredFullscreen();
+ // FIXME: There is no embedder-side handling in layout test mode.
+ if (webMediaPlayer() && !LayoutTestSupport::isRunningLayoutTest())
+ webMediaPlayer()->enterFullscreen();
// Cache this in case the player is destroyed before leaving fullscreen.
m_inOverlayFullscreenVideo = usesOverlayFullscreenVideo();
- if (m_inOverlayFullscreenVideo)
+ if (m_inOverlayFullscreenVideo) {
document().layoutView()->compositor()->setNeedsCompositingUpdate(CompositingUpdateRebuildTree);
+ }
}
void HTMLMediaElement::willStopBeingFullscreenElement()
@@ -3115,6 +3120,8 @@ void HTMLMediaElement::willStopBeingFullscreenElement()
if (m_inOverlayFullscreenVideo)
document().layoutView()->compositor()->setNeedsCompositingUpdate(CompositingUpdateRebuildTree);
m_inOverlayFullscreenVideo = false;
+ if (webMediaPlayer())
+ webMediaPlayer()->exitedFullscreen();
}
WebLayer* HTMLMediaElement::platformLayer() const

Powered by Google App Engine
This is Rietveld 408576698