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

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

Issue 208243019: Move SwapOut methods to RenderFrameHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 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) {

Powered by Google App Engine
This is Rietveld 408576698