Move ViewHostMsg_OnGotoEntryAtOffset to FrameHostMsg_OnGotoEntryAtOffset
In order to add metrics to calculate top level navigations from
iframes that are sandboxed frame's navigation source needs to be
conveyed to the browser. The easiest way to do this is to move the API
to the frame API.
No behavioural changes intended.
BUG=705583
Change-Id: I2ae2ffa45d1a488b7c43177d07b8768e8dbb2106
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1524416
Commit-Queue: Dave Tapuska <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Alex Moshchuk <[email protected]>
Cr-Commit-Position: refs/heads/master@{#641957}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 0c5634c..487d587 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -857,7 +857,6 @@
bool handled = true;
IPC_BEGIN_MESSAGE_MAP_WITH_PARAM(WebContentsImpl, message, render_view_host)
- IPC_MESSAGE_HANDLER(ViewHostMsg_GoToEntryAtOffset, OnGoToEntryAtOffset)
IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits)
IPC_MESSAGE_HANDLER(ViewHostMsg_PageScaleFactorChanged,
OnPageScaleFactorChanged)
@@ -908,6 +907,7 @@
OnDidDisplayContentWithCertificateErrors)
IPC_MESSAGE_HANDLER(FrameHostMsg_DidRunContentWithCertificateErrors,
OnDidRunContentWithCertificateErrors)
+ IPC_MESSAGE_HANDLER(FrameHostMsg_GoToEntryAtOffset, OnGoToEntryAtOffset)
IPC_MESSAGE_HANDLER(FrameHostMsg_RegisterProtocolHandler,
OnRegisterProtocolHandler)
IPC_MESSAGE_HANDLER(FrameHostMsg_UnregisterProtocolHandler,
@@ -4731,7 +4731,7 @@
observer.DidFinishLoad(source, validated_url);
}
-void WebContentsImpl::OnGoToEntryAtOffset(RenderViewHostImpl* source,
+void WebContentsImpl::OnGoToEntryAtOffset(RenderFrameHostImpl* source,
int offset,
bool has_user_gesture) {
// Non-user initiated navigations coming from the renderer should be ignored