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

Unified Diff: content/browser/renderer_host/render_view_host_impl.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: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 6984a0d179015df883c49ed1ede37f6ceffcf46c..9c22adfae12f699813ddaa3974ae980724473368 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -12,6 +12,7 @@
#include "base/i18n/rtl.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
+#include "base/command_line.h"
#include "base/message_loop.h"
#include "base/stl_util.h"
#include "base/string_util.h"
@@ -509,6 +510,20 @@ void RenderViewHostImpl::ActivateNearestFindResult(int request_id,
void RenderViewHostImpl::RequestFindMatchRects(int current_version) {
Send(new ViewMsg_FindMatchRects(GetRoutingID(), current_version));
}
+
+void RenderViewHostImpl::SynchronousFind(int request_id,
+ const string16& search_text,
+ const WebKit::WebFindOptions& options,
+ int* match_count,
+ int* active_ordinal) {
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableWebViewSynchronousAPIs)) {
+ return;
+ }
+
+ Send(new ViewMsg_SynchronousFind(GetRoutingID(), request_id, search_text,
+ options, match_count, active_ordinal));
+}
#endif
void RenderViewHostImpl::DragTargetDragEnter(

Powered by Google App Engine
This is Rietveld 408576698