[TabDiscarding] Differentiate between beforeunload and unload handlers

To enable fast killing of tabs in more situations, the TabManager need
to be aware of the cause of the sudden termination disabler. This CL
propagates the disabler type to the RenderFrameHostImpl where it can be
stored and queried.

This step is required to enable the TabManager to fastkill in more
situations.

This CL is extracted from oysteine's CL:
https://chromium-review.googlesource.com/c/537072 which I took over
with his permission.

Bug: chromium:731264,chromium:123049
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: Ibd3a96df76793d4808bf84edecf4353093d81620
Reviewed-on: https://chromium-review.googlesource.com/562616
Commit-Queue: Fadi Meawad <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: John Abd-El-Malek <[email protected]>
Reviewed-by: Chris Hamilton <[email protected]>
Cr-Commit-Position: refs/heads/master@{#487680}
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 6f6388c..39309d0a 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -662,6 +662,9 @@
   void DidChangeManifest() override;
   void EnterFullscreen() override;
   void ExitFullscreen() override;
+  void SuddenTerminationDisablerChanged(
+      bool present,
+      blink::WebSuddenTerminationDisablerType disabler_type) override;
   void RegisterProtocolHandler(const blink::WebString& scheme,
                                const blink::WebURL& url,
                                const blink::WebString& title) override;