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 223739da77c79ace516cfd4283db581e72262947..86ac2a300d1125e8ed03f782392cdf1a530fbd49 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -2451,6 +2451,12 @@ bool WebContentsImpl::IsSubframe() const { |
void WebContentsImpl::Find(int request_id, |
const base::string16& search_text, |
const blink::WebFindOptions& options) { |
+ // If the browser plugin guest is a top level frame then pass the find request |
+ // on to it. |
+ if (browser_plugin_embedder_) { |
+ browser_plugin_embedder_->Find(request_id, search_text, options); |
+ return; |
+ } |
Send(new ViewMsg_Find(GetRoutingID(), request_id, search_text, options)); |
} |
@@ -2914,17 +2920,6 @@ void WebContentsImpl::OnUnregisterProtocolHandler(const std::string& protocol, |
delegate_->UnregisterProtocolHandler(this, protocol, url, user_gesture); |
} |
-void WebContentsImpl::OnFindReply(int request_id, |
- int number_of_matches, |
- const gfx::Rect& selection_rect, |
- int active_match_ordinal, |
- bool final_update) { |
- if (delegate_) { |
- delegate_->FindReply(this, request_id, number_of_matches, selection_rect, |
- active_match_ordinal, final_update); |
- } |
-} |
- |
#if defined(OS_ANDROID) |
void WebContentsImpl::OnFindMatchRectsReply( |
int version, |
@@ -3234,6 +3229,24 @@ void WebContentsImpl::SelectRange(const gfx::Point& start, |
new InputMsg_SelectRange(focused_frame->GetRoutingID(), start, end)); |
} |
+void WebContentsImpl::OnFindReply(int request_id, |
+ int number_of_matches, |
+ const gfx::Rect& selection_rect, |
+ int active_match_ordinal, |
+ bool final_update) { |
+ // Pass the find reply to the browser plugin embedder. |
+ if (browser_plugin_guest_) { |
+ browser_plugin_guest_->OnFindReply(request_id, number_of_matches, |
+ selection_rect, active_match_ordinal, |
+ final_update); |
Fady Samuel
2014/09/25 10:41:29
This code is probably not necessary. If you look o
raymes
2014/09/29 05:01:34
Cool!
|
+ } |
+ |
+ if (delegate_) { |
+ delegate_->FindReply(this, request_id, number_of_matches, selection_rect, |
+ active_match_ordinal, final_update); |
+ } |
+} |
+ |
void WebContentsImpl::UpdateMaxPageIDIfNecessary(RenderViewHost* rvh) { |
// If we are creating a RVH for a restored controller, then we need to make |
// sure the RenderView starts with a next_page_id_ larger than the number |