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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2810813004: Hide fullscreen rotation jank (Closed)
Patch Set: Refer to static layer as thumbnail layer within content. Rebase Created 3 years, 6 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: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 40429d51814846c69671b3bce27a1af955e1452b..c3fd4cd84d14798fab3670d9f22d46818fa834c9 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2032,6 +2032,13 @@ void WebContentsImpl::EnterFullscreenMode(const GURL& origin) {
if (delegate_)
delegate_->EnterFullscreenModeForTab(this, origin);
+#if defined(OS_ANDROID)
+ RenderWidgetHostViewAndroid* rwhva =
+ static_cast<RenderWidgetHostViewAndroid*>(GetRenderWidgetHostView());
+ if (rwhva)
+ rwhva->OnFullscreenStateChanged(true);
+#endif
+
for (auto& observer : observers_)
observer.DidToggleFullscreenModeForTab(IsFullscreenForCurrentTab(), false);
}
@@ -2049,6 +2056,11 @@ void WebContentsImpl::ExitFullscreenMode(bool will_cause_resize) {
ContentVideoView* video_view = ContentVideoView::GetInstance();
if (video_view != NULL)
video_view->ExitFullscreen();
+
+ RenderWidgetHostViewAndroid* rwhva =
+ static_cast<RenderWidgetHostViewAndroid*>(GetRenderWidgetHostView());
+ if (rwhva)
+ rwhva->OnFullscreenStateChanged(false);
#endif
if (delegate_)

Powered by Google App Engine
This is Rietveld 408576698