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

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

Issue 2810813004: Hide fullscreen rotation jank (Closed)
Patch Set: Added as feature (temporarily enabled-by-default for testing CQ failures). Other cr feedback 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..ff1e502cd21536276dd6dd1d10d51d400a512b2f 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2032,6 +2032,11 @@ void WebContentsImpl::EnterFullscreenMode(const GURL& origin) {
if (delegate_)
delegate_->EnterFullscreenModeForTab(this, origin);
+ RenderWidgetHostViewBase* rwhvb =
+ static_cast<RenderWidgetHostViewBase*>(GetRenderWidgetHostView());
+ if (rwhvb)
+ rwhvb->OnFullscreenStateChanged(IsFullscreenForCurrentTab());
+
for (auto& observer : observers_)
observer.DidToggleFullscreenModeForTab(IsFullscreenForCurrentTab(), false);
}
@@ -2054,6 +2059,11 @@ void WebContentsImpl::ExitFullscreenMode(bool will_cause_resize) {
if (delegate_)
delegate_->ExitFullscreenModeForTab(this);
+ RenderWidgetHostViewBase* rwhvb =
+ static_cast<RenderWidgetHostViewBase*>(GetRenderWidgetHostView());
+ if (rwhvb)
+ rwhvb->OnFullscreenStateChanged(IsFullscreenForCurrentTab());
+
// The fullscreen state is communicated to the renderer through a resize
// message. If the change in fullscreen state doesn't cause a view resize
// then we must ensure web contents exit the fullscreen state by explicitly

Powered by Google App Engine
This is Rietveld 408576698