Index: content/browser/browser_plugin/browser_plugin_embedder.cc |
diff --git a/content/browser/browser_plugin/browser_plugin_embedder.cc b/content/browser/browser_plugin/browser_plugin_embedder.cc |
index 28aa57f750411bea773b3c6385ca946841de70c2..e724e43faf8e38bced0692283650b600657de6ef 100644 |
--- a/content/browser/browser_plugin/browser_plugin_embedder.cc |
+++ b/content/browser/browser_plugin/browser_plugin_embedder.cc |
@@ -180,21 +180,12 @@ bool BrowserPluginEmbedder::HandleKeyboardEvent( |
return event_consumed; |
} |
-bool BrowserPluginEmbedder::Find(int request_id, |
- const base::string16& search_text, |
- const blink::WebFindOptions& options) { |
- return GetBrowserPluginGuestManager()->ForEachGuest( |
- web_contents(), |
- base::Bind(&BrowserPluginEmbedder::FindInGuest, |
- request_id, |
- search_text, |
- options)); |
-} |
- |
-bool BrowserPluginEmbedder::StopFinding(StopFindAction action) { |
- return GetBrowserPluginGuestManager()->ForEachGuest( |
+BrowserPluginGuest* BrowserPluginEmbedder::GetFullPageGuest() { |
+ BrowserPluginGuest* result = nullptr; |
+ GetBrowserPluginGuestManager()->ForEachGuest( |
web_contents(), |
- base::Bind(&BrowserPluginEmbedder::StopFindingInGuest, action)); |
+ base::Bind(&BrowserPluginEmbedder::GetFullPageGuestHelper, &result)); |
+ return result; |
} |
// static |
@@ -210,25 +201,13 @@ bool BrowserPluginEmbedder::UnlockMouseIfNecessaryCallback(bool* mouse_unlocked, |
} |
// static |
-bool BrowserPluginEmbedder::FindInGuest(int request_id, |
- const base::string16& search_text, |
- const blink::WebFindOptions& options, |
- WebContents* guest) { |
- if (static_cast<WebContentsImpl*>(guest)->GetBrowserPluginGuest()->Find( |
- request_id, search_text, options)) { |
- // There can only ever currently be one browser plugin that handles find so |
- // we can break the iteration at this point. |
- return true; |
- } |
- return false; |
-} |
- |
-bool BrowserPluginEmbedder::StopFindingInGuest(StopFindAction action, |
- WebContents* guest) { |
- if (static_cast<WebContentsImpl*>(guest)->GetBrowserPluginGuest() |
- ->StopFinding(action)) { |
- // There can only ever currently be one browser plugin that handles find so |
- // we can break the iteration at this point. |
+bool BrowserPluginEmbedder::GetFullPageGuestHelper( |
+ BrowserPluginGuest** result, |
+ WebContents* guest_web_contents) { |
+ BrowserPluginGuest* guest = static_cast<WebContentsImpl*>( |
+ guest_web_contents)->GetBrowserPluginGuest(); |
+ if (guest->is_full_page_plugin()) { |
+ *result = guest; |
return true; |
} |
return false; |