This patch moves find-in-page code from RenderView to RenderFrame. This works towards the deprecation of RenderView, and is also the first step towards implementing multi-process find-in-page (for OOPIFs).
Design doc for multi-process find-in-page: https://docs.google.com/a/google.com/document/d/12S_6X2MWWLoyJslajcajL2ELU7zhodPxMOxa8Bg4Wg0/edit?usp=sharing
BUG=457440
TEST=existing tests (no functional difference)
Review URL: https://codereview.chromium.org/1600953003
Cr-Commit-Position: refs/heads/master@{#370767}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 1d19e40..445afd6 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -639,7 +639,7 @@
OnUnregisterProtocolHandler)
IPC_MESSAGE_HANDLER(FrameHostMsg_UpdatePageImportanceSignals,
OnUpdatePageImportanceSignals)
- IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnFindReply)
+ IPC_MESSAGE_HANDLER(FrameHostMsg_Find_Reply, OnFindReply)
IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed)
IPC_MESSAGE_HANDLER(ViewHostMsg_WebUISend, OnWebUISend)
#if defined(ENABLE_PLUGINS)
@@ -663,7 +663,7 @@
IPC_MESSAGE_HANDLER(ViewHostMsg_MoveValidationMessage,
OnMoveValidationMessage)
#if defined(OS_ANDROID) && !defined(USE_AURA)
- IPC_MESSAGE_HANDLER(ViewHostMsg_FindMatchRects_Reply,
+ IPC_MESSAGE_HANDLER(FrameHostMsg_FindMatchRects_Reply,
OnFindMatchRectsReply)
IPC_MESSAGE_HANDLER(ViewHostMsg_OpenDateTimeDialog,
OnOpenDateTimeDialog)
@@ -2836,7 +2836,8 @@
browser_plugin_embedder_->Find(request_id, search_text, options)) {
return;
}
- Send(new ViewMsg_Find(GetRoutingID(), request_id, search_text, options));
+ GetMainFrame()->Send(new FrameMsg_Find(GetMainFrame()->GetRoutingID(),
+ request_id, search_text, options));
}
void WebContentsImpl::StopFinding(StopFindAction action) {
@@ -2845,7 +2846,8 @@
browser_plugin_embedder_->StopFinding(action)) {
return;
}
- Send(new ViewMsg_StopFinding(GetRoutingID(), action));
+ GetMainFrame()->Send(
+ new FrameMsg_StopFinding(GetMainFrame()->GetRoutingID(), action));
}
void WebContentsImpl::InsertCSS(const std::string& css) {