Don't send FrameMsg_Delete from ~RenderFrameHostImpl

Instead, actively notify the renderer when events that delete frames, to
ensure the renderer-side state is in sync. The problem with deleting in
the destructor is:
- it can send double-deletes: safe, but somewhat wasteful
- it can send deletes for frames it's not supposed to: bad, because many
  things randomly break if the main frame is detached before the view is
  shut down.

Eventually, this entire logic needs to be overhauled to work at a
subtree level, rather than node by node, like it does today.

Bug: 838348
Change-Id: I8926a99a68aaefac598777132c40c60948c3b49c
Reviewed-on: https://chromium-review.googlesource.com/c/1366020
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616229}
3 files changed