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 52ddbab340bdc1211418e09c4e8ef738543b3935..4d1afa003b837b5d2cd1a7ea9e7e920998604b46 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -2036,6 +2036,11 @@ void WebContentsImpl::EnterFullscreenMode(const GURL& origin) { |
if (delegate_) |
delegate_->EnterFullscreenModeForTab(this, origin); |
+ RenderWidgetHostViewBase* rwhvb = |
boliu
2017/07/05 17:39:48
chaining these two calls through web contents does
|
+ static_cast<RenderWidgetHostViewBase*>(GetRenderWidgetHostView()); |
+ if (rwhvb) |
+ rwhvb->OnFullscreenStateChanged(); |
+ |
for (auto& observer : observers_) |
observer.DidToggleFullscreenModeForTab(IsFullscreenForCurrentTab(), false); |
} |
@@ -2058,6 +2063,11 @@ void WebContentsImpl::ExitFullscreenMode(bool will_cause_resize) { |
if (delegate_) |
delegate_->ExitFullscreenModeForTab(this); |
+ RenderWidgetHostViewBase* rwhvb = |
+ static_cast<RenderWidgetHostViewBase*>(GetRenderWidgetHostView()); |
+ if (rwhvb) |
+ rwhvb->OnFullscreenStateChanged(); |
+ |
// 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 |