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 bfdda50f69c982a5208572a106e7b34157cfed2d..0d9d9daffbd3e5f4c8c3575ea5522fd026649c85 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -1824,11 +1824,9 @@ void WebContentsImpl::EnterFullscreenMode(const GURL& origin) { |
if (delegate_) |
delegate_->EnterFullscreenModeForTab(this, origin); |
- FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
- DidToggleFullscreenModeForTab( |
- IsFullscreenForCurrentTab( |
- GetRenderViewHost()->GetWidget()), |
- false)); |
+ FOR_EACH_OBSERVER( |
+ WebContentsObserver, observers_, |
+ DidToggleFullscreenModeForTab(IsFullscreenForCurrentTab(), false)); |
} |
void WebContentsImpl::ExitFullscreenMode(bool will_cause_resize) { |
@@ -1865,15 +1863,11 @@ void WebContentsImpl::ExitFullscreenMode(bool will_cause_resize) { |
} |
FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
- DidToggleFullscreenModeForTab( |
- IsFullscreenForCurrentTab( |
- GetRenderViewHost()->GetWidget()), |
- will_cause_resize)); |
+ DidToggleFullscreenModeForTab(IsFullscreenForCurrentTab(), |
+ will_cause_resize)); |
} |
-// TODO(alexmos): Remove the unused |render_widget_host| parameter. |
-bool WebContentsImpl::IsFullscreenForCurrentTab( |
- RenderWidgetHostImpl* render_widget_host) const { |
+bool WebContentsImpl::IsFullscreenForCurrentTab() const { |
return delegate_ ? delegate_->IsFullscreenForTabOrPending(this) : false; |
} |
@@ -3288,9 +3282,9 @@ void WebContentsImpl::DidNavigateMainFramePreCommit( |
// No page change? Then, the renderer and browser can remain in fullscreen. |
return; |
} |
- if (IsFullscreenForCurrentTab(GetRenderViewHost()->GetWidget())) |
+ if (IsFullscreenForCurrentTab()) |
ExitFullscreen(false); |
- DCHECK(!IsFullscreenForCurrentTab(GetRenderViewHost()->GetWidget())); |
+ DCHECK(!IsFullscreenForCurrentTab()); |
} |
void WebContentsImpl::DidNavigateMainFramePostCommit( |
@@ -4191,7 +4185,7 @@ void WebContentsImpl::RenderViewTerminated(RenderViewHost* rvh, |
// Ensure fullscreen mode is exited in the |delegate_| since a crashed |
// renderer may not have made a clean exit. |
- if (IsFullscreenForCurrentTab(GetRenderViewHost()->GetWidget())) |
+ if (IsFullscreenForCurrentTab()) |
ExitFullscreenMode(false); |
// Cancel any visible dialogs so they are not left dangling over the sad tab. |