De-virtualize RenderWidget/RenderViewImpl::OnClose
The interaction between RenderViewImpl and RenderWidget around handling
of ViewMsg_Close is somewhat complex.
Currently, the IPC message is received by RenderViewImpl. It doesn't have
a handler registered, so it falls back to calling
RenderWidget::OnMessageReceived. RenderWidget has a handler - OnClose,
which is a virtual method overriden by RenderViewImpl, therefore
RenderViewImpl::OnClose ends up handling the IPC. This roundtripping
between objects seems unnecessary complexity and should be eliminated.
This CL de-virtualizes OnClose and both RenderViewImpl and RenderWidget
has their own version of the method. RenderViewImpl now defines a handler
directly, so no calls to RenderWidget are made as part of finding a
handler for the IPC message.
BUG=478281
Review URL: https://codereview.chromium.org/1123513002
Cr-Commit-Position: refs/heads/master@{#328003}
3 files changed