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

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: Fix Nasko's comment 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/swapped_out_messages.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 195edc388d7e714b3c4772930b2b099f260654fa..e33e52350ff213e19d35a5a3a551fd3f408b76b9 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);
}
void WebContentsImpl::RequestMove(const gfx::Rect& new_bounds) {
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/swapped_out_messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698