| 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 3362cc1b63417be749ef6832eabd73c03b175083..bf313eb0a592cc41ddfb2919953f4cfef8212f71 100644
|
| --- a/content/browser/web_contents/web_contents_impl.cc
|
| +++ b/content/browser/web_contents/web_contents_impl.cc
|
| @@ -704,6 +704,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
|
| @@ -3590,6 +3592,12 @@ void WebContentsImpl::OnFindMatchRectsReply(
|
| render_frame_message_source_, version, rects, active_rect);
|
| }
|
|
|
| +void WebContentsImpl::OnGetNearestFindResultReply(int request_id,
|
| + float distance) {
|
| + GetOrCreateFindRequestManager()->GetNearestFindResultReply(
|
| + render_frame_message_source_, request_id, distance);
|
| +}
|
| +
|
| void WebContentsImpl::OnOpenDateTimeDialog(
|
| const ViewHostMsg_DateTimeDialogValue_Params& value) {
|
| date_time_chooser_->ShowDialog(GetTopLevelNativeWindow(),
|
| @@ -4948,6 +4956,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
|
|
|