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

Unified Diff: content/browser/frame_host/render_frame_host_impl.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: Now addressing failures due to speculative RFH 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_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index f284e5765ae46ad8fe3d6ec78e6a8c38ec56c3af..edd4788a91f20d40b4396032a2dd9ae778b1068d 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -21,6 +21,7 @@
#include "content/browser/frame_host/frame_tree.h"
#include "content/browser/frame_host/frame_tree_node.h"
#include "content/browser/frame_host/navigator.h"
+#include "content/browser/frame_host/navigator_impl.h"
#include "content/browser/frame_host/render_frame_host_delegate.h"
#include "content/browser/frame_host/render_frame_proxy_host.h"
#include "content/browser/frame_host/render_widget_host_view_child_frame.h"
@@ -883,6 +884,15 @@ void RenderFrameHostImpl::OnBeforeUnloadACK(
render_view_host_->GetDelegate()->DidCancelLoading();
}
+bool RenderFrameHostImpl::IsWaitingForBeforeUnloadACK() const {
+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableBrowserSideNavigation)) {
+ return is_waiting_for_beforeunload_ack_;
+ }
+ return frame_tree_node_->navigator()->IsWaitingForBeforeUnloadACK(
+ frame_tree_node_);
+}
+
bool RenderFrameHostImpl::IsWaitingForUnloadACK() const {
return render_view_host_->is_waiting_for_close_ack_ ||
rfh_state_ == STATE_PENDING_SWAP_OUT;

Powered by Google App Engine
This is Rietveld 408576698