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

Unified Diff: components/web_view/web_view_impl.cc

Issue 1371773003: mandoline: Add find in page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix spacing on the right side of the UI. Created 5 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: components/web_view/web_view_impl.cc
diff --git a/components/web_view/web_view_impl.cc b/components/web_view/web_view_impl.cc
index 8992496bbc2789309aa2883afe1d67c9f21a474b..b028c045fab0f692f63f7f8bd046b23d262510a1 100644
--- a/components/web_view/web_view_impl.cc
+++ b/components/web_view/web_view_impl.cc
@@ -110,6 +110,22 @@ void WebViewImpl::GetViewTreeClient(
mus::ViewTreeConnection::Create(this, view_tree_client.Pass());
}
+void WebViewImpl::Find(int32_t request_id, const mojo::String& search_text) {
+ DCHECK(frame_tree_);
+
+ // TODO(erg): This only deals with the uniframe case.
+ Frame* main_frame = frame_tree_->root();
+ main_frame->Find(request_id, search_text);
+}
+
+void WebViewImpl::StopFinding() {
+ DCHECK(frame_tree_);
+
+ // TODO(erg): This only deals with the uniframe case.
+ Frame* main_frame = frame_tree_->root();
+ main_frame->StopFinding();
+}
+
void WebViewImpl::GoBack() {
if (!navigation_controller_.CanGoBack())
return;
@@ -203,6 +219,17 @@ void WebViewImpl::DidCommitProvisionalLoad(Frame* frame) {
navigation_controller_.FrameDidCommitProvisionalLoad(frame);
}
+void WebViewImpl::ReportFindInPageMatchCount(int32_t request_id,
+ int32_t count,
+ bool final_update) {
+ client_->ReportFindInPageMatchCount(request_id, count, final_update);
+}
+
+void WebViewImpl::ReportFindInPageSelection(int32_t request_id,
+ int32_t active_match_ordinal) {
+ client_->ReportFindInPageSelection(request_id, active_match_ordinal);
+}
+
////////////////////////////////////////////////////////////////////////////////
// WebViewImpl, FrameDevToolsAgentDelegate implementation:

Powered by Google App Engine
This is Rietveld 408576698