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

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

Issue 2530883002: Refactor overlay fullscreen video handling into a single callback (Closed)
Patch Set: rebase Created 4 years 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 26c96f482d36418c0f2e33185ac42c97bb136068..98a964c321f39f8c59fbb02c48e4011ee15cf46c 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -1194,10 +1194,8 @@ void HTMLMediaElement::startPlayerLoad(const KURL& playerProvidedUrl) {
m_webMediaPlayer->load(loadType(), source, corsMode());
- if (isFullscreen()) {
- // This handles any transition to or from fullscreen overlay mode.
- frame->chromeClient().enterFullscreenForElement(this);
- }
+ if (isFullscreen())
+ m_webMediaPlayer->enteredFullscreen();
}
void HTMLMediaElement::setPlayerPreload() {
@@ -3500,7 +3498,7 @@ void HTMLMediaElement::exitFullscreen() {
Fullscreen::exitFullscreen(document());
}
-void HTMLMediaElement::didBecomeFullscreenElement() {
+void HTMLMediaElement::didEnterFullscreen() {
if (mediaControls())
mediaControls()->enteredFullscreen();
// FIXME: There is no embedder-side handling in layout test mode.
@@ -3513,7 +3511,7 @@ void HTMLMediaElement::didBecomeFullscreenElement() {
CompositingUpdateRebuildTree);
}
-void HTMLMediaElement::willStopBeingFullscreenElement() {
+void HTMLMediaElement::didExitFullscreen() {
if (mediaControls())
mediaControls()->exitedFullscreen();
if (webMediaPlayer())
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMediaElement.h ('k') | third_party/WebKit/Source/core/page/ChromeClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698