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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2783723002: Keep track in the browser of which frames have onunload and onbeforeunload handlers. (Closed)
Patch Set: fix content_browsertests with plznavigate and also remove now unnecessary unloadcontroller change Created 3 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
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 679773f82aca83ced3397903a82c2e4dd7c899e6..421ae065cfbcd6d2d3f951423709ef3852372ac9 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4756,6 +4756,21 @@ void RenderFrameImpl::exitFullscreen() {
Send(new FrameHostMsg_ToggleFullscreen(routing_id_, false));
}
+void RenderFrameImpl::suddenTerminationDisablerChanged(
+ bool present,
+ blink::WebFrameClient::SuddenTerminationDisablerType type) {
+ switch (type) {
+ case blink::WebFrameClient::BeforeUnloadHandler:
+ Send(new FrameHostMsg_BeforeUnloadHandlersPresent(routing_id_, present));
+ break;
+ case blink::WebFrameClient::UnloadHandler:
+ Send(new FrameHostMsg_UnloadHandlersPresent(routing_id_, present));
+ break;
+ default:
nasko 2017/03/29 23:31:26 Omitting the default: clause should be fine and wi
+ NOTREACHED();
+ }
+}
+
void RenderFrameImpl::registerProtocolHandler(const WebString& scheme,
const WebURL& url,
const WebString& title) {

Powered by Google App Engine
This is Rietveld 408576698