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

Unified Diff: content/browser/frame_host/navigator_impl.cc

Issue 218093002: Ensure fullscreen mode is exited for same-site navigations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/frame_host/navigator_delegate.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigator_impl.cc
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc
index a9836089cc21893d628cd9861c2d7f10aea22410..7be5f8c967940cc8bd780e2ab9f9313599f045c9 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -396,14 +396,19 @@ void NavigatorImpl::DidNavigate(
}
if (PageTransitionIsMainFrame(params.transition)) {
- // When overscroll navigation gesture is enabled, a screenshot of the page
- // in its current state is taken so that it can be used during the
- // nav-gesture. It is necessary to take the screenshot here, before calling
- // RenderFrameHostManager::DidNavigateMainFrame, because that can change
- // WebContents::GetRenderViewHost to return the new host, instead of the one
- // that may have just been swapped out.
- if (delegate_ && delegate_->CanOverscrollContent())
- controller_->TakeScreenshot();
+ if (delegate_) {
+ // When overscroll navigation gesture is enabled, a screenshot of the page
+ // in its current state is taken so that it can be used during the
+ // nav-gesture. It is necessary to take the screenshot here, before
+ // calling RenderFrameHostManager::DidNavigateMainFrame, because that can
+ // change WebContents::GetRenderViewHost to return the new host, instead
+ // of the one that may have just been swapped out.
+ if (delegate_->CanOverscrollContent())
+ controller_->TakeScreenshot();
+
+ // Run tasks that must execute just before the commit.
+ delegate_->DidNavigateMainFramePreCommit(params);
+ }
if (!use_site_per_process)
frame_tree->root()->render_manager()->DidNavigateFrame(render_frame_host);
« no previous file with comments | « content/browser/frame_host/navigator_delegate.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698