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 61cd6ca6a8bb3ef3fe4f1ea6e608e7130e4bad9c..acb7916dafaa6adc64f982046ca89ddb0ebc838d 100644 |
--- a/content/browser/frame_host/render_frame_host_impl.cc |
+++ b/content/browser/frame_host/render_frame_host_impl.cc |
@@ -378,8 +378,6 @@ |
is_waiting_for_swapout_ack_(false), |
render_frame_created_(false), |
navigations_suspended_(false), |
- has_beforeunload_handlers_(false), |
- has_unload_handlers_(false), |
is_waiting_for_beforeunload_ack_(false), |
unload_ack_is_for_navigation_(false), |
is_loading_(false), |
@@ -753,10 +751,6 @@ |
IPC_MESSAGE_HANDLER(FrameHostMsg_DocumentOnLoadCompleted, |
OnDocumentOnLoadCompleted) |
IPC_MESSAGE_HANDLER(FrameHostMsg_BeforeUnload_ACK, OnBeforeUnloadACK) |
- IPC_MESSAGE_HANDLER(FrameHostMsg_BeforeUnloadHandlersPresent, |
- OnBeforeUnloadHandlersPresent) |
- IPC_MESSAGE_HANDLER(FrameHostMsg_UnloadHandlersPresent, |
- OnUnloadHandlersPresent) |
IPC_MESSAGE_HANDLER(FrameHostMsg_SwapOut_ACK, OnSwapOutACK) |
IPC_MESSAGE_HANDLER(FrameHostMsg_ContextMenu, OnContextMenu) |
IPC_MESSAGE_HANDLER(FrameHostMsg_JavaScriptExecuteResponse, |
@@ -2379,14 +2373,6 @@ |
frame_tree_node_->OnSetHasReceivedUserGesture(); |
} |
-void RenderFrameHostImpl::OnBeforeUnloadHandlersPresent(bool present) { |
- has_beforeunload_handlers_ = present; |
-} |
- |
-void RenderFrameHostImpl::OnUnloadHandlersPresent(bool present) { |
- has_unload_handlers_ = present; |
-} |
- |
#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) |
void RenderFrameHostImpl::OnShowPopup( |
const FrameHostMsg_ShowPopup_Params& params) { |
@@ -2715,25 +2701,7 @@ |
} |
bool RenderFrameHostImpl::ShouldDispatchBeforeUnload() { |
- if (!IsRenderFrameLive()) |
- return false; |
- |
- for (FrameTreeNode* node : frame_tree_->SubtreeNodes(frame_tree_node_)) { |
- if (node->current_frame_host()->has_beforeunload_handlers_) |
- return true; |
- } |
- return false; |
-} |
- |
-bool RenderFrameHostImpl::ShouldDispatchUnload() { |
- if (!IsRenderFrameLive()) |
- return false; |
- |
- for (FrameTreeNode* node : frame_tree_->SubtreeNodes(frame_tree_node_)) { |
- if (node->current_frame_host()->has_unload_handlers_) |
- return true; |
- } |
- return false; |
+ return IsRenderFrameLive(); |
} |
void RenderFrameHostImpl::UpdateOpener() { |