Index: content/browser/web_contents/web_contents_impl.cc |
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc |
index 5621f827b46d1f009ff3cb81d369fc9adbb12d02..61fed4d74079d5206687b23bedd64adf2f65b327 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -706,6 +706,8 @@ bool WebContentsImpl::OnMessageReceived(RenderViewHost* render_view_host, |
#if defined(OS_ANDROID) |
IPC_MESSAGE_HANDLER(FrameHostMsg_FindMatchRects_Reply, |
OnFindMatchRectsReply) |
+ IPC_MESSAGE_HANDLER(FrameHostMsg_GetNearestFindResult_Reply, |
+ OnGetNearestFindResultReply) |
IPC_MESSAGE_HANDLER(ViewHostMsg_OpenDateTimeDialog, |
OnOpenDateTimeDialog) |
#endif |
@@ -3595,6 +3597,12 @@ void WebContentsImpl::OnFindMatchRectsReply( |
render_frame_message_source_, version, rects, active_rect); |
} |
+void WebContentsImpl::OnGetNearestFindResultReply(int request_id, |
+ float distance) { |
+ GetOrCreateFindRequestManager()->OnGetNearestFindResultReply( |
+ render_frame_message_source_, request_id, distance); |
+} |
+ |
void WebContentsImpl::OnOpenDateTimeDialog( |
const ViewHostMsg_DateTimeDialogValue_Params& value) { |
date_time_chooser_->ShowDialog(GetTopLevelNativeWindow(), |
@@ -4954,6 +4962,19 @@ WebUI* WebContentsImpl::CreateWebUI(const GURL& url, |
return NULL; |
} |
+// TODO(paulmeyer): This method will not be used until find-in-page across |
+// GuestViews is implemented. |
+WebContentsImpl* WebContentsImpl::GetOutermostWebContents() { |
+ // Find the outer-most WebContents. |
+ WebContentsImpl* outermost_web_contents = this; |
+ while (outermost_web_contents->node_ && |
+ outermost_web_contents->node_->outer_web_contents()) { |
+ outermost_web_contents = |
+ outermost_web_contents->node_->outer_web_contents(); |
+ } |
+ return outermost_web_contents; |
+} |
+ |
FindRequestManager* WebContentsImpl::GetOrCreateFindRequestManager() { |
// TODO(paulmeyer): This method will need to access (or potentially create) |
// the FindRequestManager in the outermost WebContents once find-in-page |