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

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

Issue 789643005: PlzNavigate: make content unit tests work with browser side navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cancel-navigations
Patch Set: Fixed nits Created 5 years, 11 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/frame_host/render_frame_host_manager.cc
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index b36562c7f81320ac7bf6a218b45e3cc133bff27a..9c14de971ad46477a58d21ffa0fcb6fc43e8b6b4 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -281,7 +281,7 @@ bool RenderFrameHostManager::ShouldCloseTabOnUnresponsiveRenderer() {
// If the tab becomes unresponsive during beforeunload while doing a
// cross-site navigation, proceed with the navigation. (This assumes that
// the pending RenderFrameHost is still responsive.)
- if (render_frame_host_->is_waiting_for_beforeunload_ack()) {
+ if (render_frame_host_->IsWaitingForBeforeUnloadACK()) {
// Haven't gotten around to starting the request, because we're still
// waiting for the beforeunload handler to finish. We'll pretend that it
// did finish, to let the navigation proceed. Note that there's a danger
@@ -460,7 +460,6 @@ void RenderFrameHostManager::DidNavigateFrame(
if (render_frame_host == pending_render_frame_host_) {
// The pending cross-site navigation completed, so show the renderer.
CommitPending();
- cross_navigation_pending_ = false;
} else if (render_frame_host == render_frame_host_) {
if (was_caused_by_user_gesture) {
// A navigation in the original page has taken place. Cancel the pending
@@ -737,6 +736,7 @@ RenderFrameHostImpl* RenderFrameHostManager::GetFrameHostForNavigation(
}
}
+ cross_navigation_pending_ = navigation_rfh != render_frame_host_.get();
return navigation_rfh;
}
@@ -1521,6 +1521,7 @@ void RenderFrameHostManager::CommitPending() {
old_render_frame_host =
SetRenderFrameHost(speculative_render_frame_host_.Pass());
}
+ cross_navigation_pending_ = false;
if (is_main_frame)
render_frame_host_->render_view_host()->AttachToFrameTree();
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/browser/frame_host/render_frame_host_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698