Move ContextMenu show/hide state tracking to WebContents
Currently, RenderWidgetHostView of the page tracks the visibility state of context
menus. However, the RWHV might go away during navigations (cross origin). On the
other hand, a context menu might outlive the RWHV and stay visible during the page
navigation which leads to a mismatch between the stored visibility state in the
new RWHV and the actual visibility of the context menu.
This CL will move this state tracking logic to WebContents which stays the same
during page navigations.
BUG=
708182
Review-Url:
https://codereview.chromium.org/2890143003
Cr-Commit-Position: refs/heads/master@{#477346}
Committed:
https://chromium.googlesource.com/chromium/src/+/f6750aae23ef4c4fd8e500f092bff269ca277abc