MPArch: Remove NavigationControllerDelegate::IsBeingDestroyed

This patch removes NavigationControllerDelegate::IsBeingDestroyed
and call FrameTree::IsBeingDestroyed instead to check per-FrameTree
state correctly.

is_being_destroyed_ state is now managed in both WebContentsImpl
and FrameTree respectively, and per-FrameTree state is updated
when WebContentsImpl is going to be destroyed. Prerendering FrameTree
is also updated on PrerenderHost being destroyed.

Bug: 1224294
Change-Id: I72cc3b5ab78794a81d4076134654c3c803dc341d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2992402
Reviewed-by: Alexander Timin <[email protected]>
Reviewed-by: Matt Falkenhagen <[email protected]>
Commit-Queue: Takashi Toyoshima <[email protected]>
Cr-Commit-Position: refs/heads/master@{#903769}
diff --git a/content/browser/renderer_host/navigation_controller_impl.cc b/content/browser/renderer_host/navigation_controller_impl.cc
index e9a64c3..b49a0ee 100644
--- a/content/browser/renderer_host/navigation_controller_impl.cc
+++ b/content/browser/renderer_host/navigation_controller_impl.cc
@@ -2279,7 +2279,7 @@
   // progress, since this will cause a use-after-free.  (We only allow this
   // when the tab is being destroyed for shutdown, since it won't return to
   // NavigateToEntry in that case.)  http://crbug.com/347742.
-  CHECK(!in_navigate_to_pending_entry_ || delegate_->IsBeingDestroyed());
+  CHECK(!in_navigate_to_pending_entry_ || frame_tree_.IsBeingDestroyed());
 
   if (was_failure && pending_entry_) {
     failed_pending_entry_id_ = pending_entry_->GetUniqueID();
@@ -3690,7 +3690,7 @@
     LoadCommittedDetails* details) {
   details->entry = GetLastCommittedEntry();
 
-  // We need to notify the ssl_manager_ before the web_contents_ so the
+  // We need to notify the ssl_manager_ before the WebContents so the
   // location bar will have up-to-date information about the security style
   // when it wants to draw.  See http://crbug.com/11157
   ssl_manager_.DidCommitProvisionalLoad(*details);