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

Unified Diff: third_party/WebKit/public/web/WebLocalFrame.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 dcheng's comments Created 4 years, 8 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: third_party/WebKit/public/web/WebLocalFrame.h
diff --git a/third_party/WebKit/public/web/WebLocalFrame.h b/third_party/WebKit/public/web/WebLocalFrame.h
index 7dd32559f963276187c6abdf5c307cec2696d570..30d38018cf122358a7d35f69828bb9b333c10f91 100644
--- a/third_party/WebKit/public/web/WebLocalFrame.h
+++ b/third_party/WebKit/public/web/WebLocalFrame.h
@@ -86,6 +86,17 @@ public:
// Navigation ----------------------------------------------------------
+ enum class BeforeUnloadReturnValue {
+ Proceed,
+ DontProceed,
+ FrameDestroyed,
+ };
+
+ // Runs beforeunload handlers for this frame and updates |proceed| with the
+ // value returned by handlers. Returns false if the execution of
+ // BeforeUnload led to the destruction of the frame, true otherwise.
dcheng 2016/05/03 21:34:30 Also, this comment should be updated.
clamy 2016/05/04 13:50:15 Done.
+ virtual BeforeUnloadReturnValue dispatchBeforeUnloadEvent(bool isReload) = 0;
+
// Returns a WebURLRequest corresponding to the load of the WebHistoryItem.
virtual WebURLRequest requestFromHistoryItem(const WebHistoryItem&, WebCachePolicy) const = 0;
« content/renderer/render_frame_impl.cc ('K') | « third_party/WebKit/public/web/WebFrame.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698