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

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

Issue 1689043002: Add WebMediaPlayer::exitedFullscreen() and call it from HTMLMediaElement (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 ac9168d2f444499ae3a72956d1e57c6db109d421..c37b09d04ae6d6f265fb4e765828bbb9762511ca 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -67,6 +67,7 @@
#include "core/page/NetworkStateNotifier.h"
#include "platform/ContentType.h"
#include "platform/Histogram.h"
+#include "platform/LayoutTestSupport.h"
#include "platform/Logging.h"
#include "platform/MIMETypeFromURL.h"
#include "platform/MIMETypeRegistry.h"
@@ -3104,6 +3105,9 @@ void HTMLMediaElement::didBecomeFullscreenElement()
{
if (mediaControls())
mediaControls()->enteredFullscreen();
+ // FIXME: There is no embedder-side handling in layout test mode.
+ if (webMediaPlayer() && !LayoutTestSupport::isRunningLayoutTest())
+ webMediaPlayer()->enteredFullscreen();
// Cache this in case the player is destroyed before leaving fullscreen.
m_inOverlayFullscreenVideo = usesOverlayFullscreenVideo();
if (m_inOverlayFullscreenVideo)
@@ -3114,6 +3118,8 @@ void HTMLMediaElement::willStopBeingFullscreenElement()
{
if (mediaControls())
mediaControls()->exitedFullscreen();
+ if (webMediaPlayer())
+ webMediaPlayer()->exitedFullscreen();
if (m_inOverlayFullscreenVideo)
document().layoutView()->compositor()->setNeedsCompositingUpdate(CompositingUpdateRebuildTree);
m_inOverlayFullscreenVideo = false;
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.cc ('k') | third_party/WebKit/Source/web/FullscreenController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698