Chromium Code Reviews| 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 27519843e2400272d346df8695e820266cda035f..ed7f170ae3c8c54658b4ebb7cc8780ad4fc142c9 100644 |
| --- a/content/browser/web_contents/web_contents_impl.cc |
| +++ b/content/browser/web_contents/web_contents_impl.cc |
| @@ -3007,23 +3007,20 @@ void WebContentsImpl::Close(RenderViewHost* rvh) { |
| delegate_->CloseContents(this); |
| } |
| -void WebContentsImpl::SwappedOut(RenderViewHost* rvh) { |
| - if (rvh == GetRenderViewHost()) { |
| +void WebContentsImpl::SwappedOut(RenderFrameHost* rfh) { |
| + // TODO(creis): Handle subframes that go fullscreen. |
| + if (rfh->GetRenderViewHost() == GetRenderViewHost()) { |
| // Exit fullscreen mode before the current RVH is swapped out. For numerous |
| // cases, there is no guarantee the renderer would/could initiate an exit. |
| // Example: http://crbug.com/347232 |
| if (IsFullscreenForCurrentTab()) { |
| - if (rvh) |
| - rvh->ExitFullscreen(); |
| + rfh->GetRenderViewHost()->ExitFullscreen(); |
| DCHECK(!IsFullscreenForCurrentTab()); |
| } |
| if (delegate_) |
| delegate_->SwappedOut(this); |
| } |
| - |
| - // Allow the navigation to proceed. |
| - GetRenderManager()->SwappedOut(rvh); |
|
Charlie Reis
2014/03/24 22:17:49
I moved this line into RFHI::SwapOut.
|
| } |
| void WebContentsImpl::RequestMove(const gfx::Rect& new_bounds) { |