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

Unified Diff: content/browser/browser_plugin/browser_plugin_embedder.cc

Issue 1042743002: Make Edit>Speech>Speak Selection work for PDFs on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/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..cee9b435898a344f252c8e4796b5154931cbd146 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(
- web_contents(),
- base::Bind(&BrowserPluginEmbedder::StopFindingInGuest, action));
+BrowserPluginGuest* BrowserPluginEmbedder::GetFullPageGuest() {
+ WebContentsImpl* guest_contents = static_cast<WebContentsImpl*>(
+ GetBrowserPluginGuestManager()->GetFullPageGuest(web_contents()));
+ if (!guest_contents)
+ return nullptr;
+ return guest_contents->GetBrowserPluginGuest();
}
// static
@@ -209,29 +200,4 @@ bool BrowserPluginEmbedder::UnlockMouseIfNecessaryCallback(bool* mouse_unlocked,
return false;
}
-// 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.
- return true;
- }
- return false;
-}
-
} // namespace content
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_embedder.h ('k') | content/browser/renderer_host/render_widget_host_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698