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

Unified Diff: Source/web/WebFrameImpl.cpp

Issue 217543005: Move dispatchBeforeUnloadEvent to WebFrame, part 1/3. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix Created 6 years, 9 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
« no previous file with comments | « Source/web/WebFrameImpl.h ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebFrameImpl.cpp
diff --git a/Source/web/WebFrameImpl.cpp b/Source/web/WebFrameImpl.cpp
index b77f1206377c41769aa70062332ad392838b994e..7e1777552394851706f850f9da41a4fa079a3266 100644
--- a/Source/web/WebFrameImpl.cpp
+++ b/Source/web/WebFrameImpl.cpp
@@ -777,6 +777,13 @@ WebPerformance WebFrameImpl::performance() const
return WebPerformance(&frame()->domWindow()->performance());
}
+bool WebFrameImpl::dispatchBeforeUnloadEvent()
+{
+ if (!frame())
+ return true;
+ return frame()->loader().shouldClose();
+}
+
NPObject* WebFrameImpl::windowObject() const
{
if (!frame())
« no previous file with comments | « Source/web/WebFrameImpl.h ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698