Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(368)

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1959183002: Multi-Process Find-in-Page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disabled tests on Android Release because of crbug.com/615291. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bfdda50f69c982a5208572a106e7b34157cfed2d..763c2800a075b6a56dee75e8afc48c32e3098246 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
@@ -3618,6 +3620,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(),
@@ -4985,6 +4993,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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698