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

Unified Diff: content/browser/frame_host/render_frame_host_impl.h

Issue 1890493002: PlzNavigate: properly execute BeforeUnload on renderer initiated navigations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 years, 7 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.h
diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h
index 45d8ca0cffc75a6862df86dcbaef4b24a71fe007..17e740fc86e7491884872c2c52c426c71f0a4b41 100644
--- a/content/browser/frame_host/render_frame_host_impl.h
+++ b/content/browser/frame_host/render_frame_host_impl.h
@@ -397,9 +397,11 @@ class CONTENT_EXPORT RenderFrameHostImpl : public RenderFrameHost,
// Runs the beforeunload handler for this frame. |for_navigation| indicates
// whether this call is for the current frame during a cross-process
- // navigation. False means we're closing the entire tab.
+ // navigation. False means we're closing the entire tab. |is_reload|
+ // indicates whether the navigation is a reload of the page or not. If
+ // |for_navigation| is false, |is_reload| should be false as well.
// PlzNavigate: this call happens on all browser-initiated navigations.
- void DispatchBeforeUnload(bool for_navigation);
+ void DispatchBeforeUnload(bool for_navigation, bool is_reload);
// Returns true if a call to DispatchBeforeUnload will actually send the
// BeforeUnload IPC. This is the case if the current renderer is live and this

Powered by Google App Engine
This is Rietveld 408576698