Do not reset |element_instance_id_| for GuestViews

When a guest view is being destroyed the |element_instance_id_| is reset
to kInstanceIDNone. This serves as a signal that the guest is being
destroyed (or not attached yet). However, |is_being_destroyed_| and
|attach_in_progress_| already service those purposes and resetting the
|element_instance_id_| seems unnecessary.

For frame-based MimeHandlerViewGuest, |element_instance_id()| is used to
uniquely idenitfy the MimeHandlerViewContainerBase in the embedder
process. For clean-up purposes, its value is needed around the time
MimeHandlerViewGuest is being destroyed (i.e., due to detaching the
plugin element on the embedder side).

This CL will remove the code that resets the value of
|element_instance_id_| during destruction, and makes attach rely on the
signal |is_being_destroyed_| as well.

Bug: 659750
Change-Id: I929d1dc1a255bcb70597baefaa663ed7c00cdfa1
Reviewed-on: https://chromium-review.googlesource.com/c/1294202
Commit-Queue: Ehsan Karamad <ekaramad@chromium.org>
Reviewed-by: James MacLean <wjmaclean@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602012}
2 files changed