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

Unified Diff: android_webview/native/aw_web_contents_delegate.cc

Issue 10941015: [Android] Upstream the WebView find-in-page API implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fixes + command line switch for synchronous APIs Created 8 years, 3 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
Index: android_webview/native/aw_web_contents_delegate.cc
diff --git a/android_webview/native/aw_web_contents_delegate.cc b/android_webview/native/aw_web_contents_delegate.cc
index 73021281e067b482292ed45f64d697085dc0ba96..e2195c481320493f648f232c9354359c381b853f 100644
--- a/android_webview/native/aw_web_contents_delegate.cc
+++ b/android_webview/native/aw_web_contents_delegate.cc
@@ -4,6 +4,12 @@
#include "android_webview/native/aw_web_contents_delegate.h"
+#include "android_webview/browser/find_helper.h"
+#include "android_webview/native/aw_contents.h"
+#include "content/public/browser/web_contents.h"
+
+using content::WebContents;
+
namespace android_webview {
AwWebContentsDelegate::AwWebContentsDelegate(
@@ -15,4 +21,20 @@ AwWebContentsDelegate::AwWebContentsDelegate(
AwWebContentsDelegate::~AwWebContentsDelegate() {
}
+void AwWebContentsDelegate::FindReply(WebContents* web_contents,
+ int request_id,
+ int number_of_matches,
+ const gfx::Rect& selection_rect,
+ int active_match_ordinal,
+ bool final_update) {
+ AwContents* aw_contents = AwContents::FromWebContents(web_contents);
+ if (!aw_contents)
+ return;
+
+ aw_contents->GetFindHelper()->HandleFindReply(request_id,
+ number_of_matches,
+ active_match_ordinal,
+ final_update);
+}
+
} // namespace android_webview

Powered by Google App Engine
This is Rietveld 408576698