Move last messages from RVH->RWH and break routing.
This CL moves the final 4 messages that are sent to the
RenderWidgetHost's routing ID, but which were handled by RenderViewHost
or an object within RVH's delegate/subdelegate tangle.
Specifically, WidgetHostMsg_Close, ViewHostMsg_RouteCloseEvent,
WidgetHostMsg_DidFirstVisuallyNonEmptyPaint, and
WidgetHostMsg_DidCommitAndDrawCompositorFrame now terminate in the
RenderWidgetHost and are sent down via explicit methods on the
delegates interfaces.
After this CL, any messages sent to RenderWidgetHost no longer pass
into the RenderViewHost.
RenderWidgetHostView*::OnMessageReceived...I'm coming for ya next.
You're a marked object and ima gonna sweep your methods clean.
Bug: 419087
Change-Id: Ic104aaf785983159ae4a7f1a65781d89b98dfabe
Reviewed-on: https://chromium-review.googlesource.com/c/1278285
Reviewed-by: Albert J. Wong <[email protected]>
Reviewed-by: Nasko Oskov <[email protected]>
Commit-Queue: Albert J. Wong <[email protected]>
Cr-Commit-Position: refs/heads/master@{#599805}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index a4ef5c9..b98084a 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -855,10 +855,6 @@
bool handled = true;
IPC_BEGIN_MESSAGE_MAP_WITH_PARAM(WebContentsImpl, message, render_view_host)
- IPC_MESSAGE_HANDLER(ViewHostMsg_DidFirstVisuallyNonEmptyPaint,
- OnFirstVisuallyNonEmptyPaint)
- IPC_MESSAGE_HANDLER(ViewHostMsg_DidCommitAndDrawCompositorFrame,
- OnCommitAndDrawCompositorFrame)
IPC_MESSAGE_HANDLER(ViewHostMsg_GoToEntryAtOffset, OnGoToEntryAtOffset)
IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits)
IPC_MESSAGE_HANDLER(ViewHostMsg_PageScaleFactorChanged,
@@ -4860,7 +4856,8 @@
is_overlay_content_ = is_overlay_content;
}
-void WebContentsImpl::OnFirstVisuallyNonEmptyPaint(RenderViewHostImpl* source) {
+void WebContentsImpl::DidFirstVisuallyNonEmptyPaint(
+ RenderViewHostImpl* source) {
// TODO(nick): When this is ported to FrameHostMsg_, we should only listen if
// |source| is the main frame.
for (auto& observer : observers_)
@@ -4876,7 +4873,7 @@
}
}
-void WebContentsImpl::OnCommitAndDrawCompositorFrame(
+void WebContentsImpl::DidCommitAndDrawCompositorFrame(
RenderViewHostImpl* source) {
for (auto& observer : observers_)
observer.DidCommitAndDrawCompositorFrame();