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

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

Issue 901833002: Allow MimeHandlerViewGuest to be notified of StopFinding events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 8159b0d1ebc82f1ee005af767aab86cf55396037..5313268a62405ca70663c29dd504a43baa501847 100644
--- a/content/browser/browser_plugin/browser_plugin_embedder.cc
+++ b/content/browser/browser_plugin/browser_plugin_embedder.cc
@@ -174,6 +174,12 @@ bool BrowserPluginEmbedder::Find(int request_id,
options));
}
+bool BrowserPluginEmbedder::StopFinding(StopFindAction action) {
+ return GetBrowserPluginGuestManager()->ForEachGuest(
+ GetWebContents(),
+ base::Bind(&BrowserPluginEmbedder::StopFindingInGuest, action));
+}
+
// static
bool BrowserPluginEmbedder::UnlockMouseIfNecessaryCallback(bool* mouse_unlocked,
WebContents* guest) {
@@ -200,4 +206,15 @@ bool BrowserPluginEmbedder::FindInGuest(int request_id,
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/browser_plugin/browser_plugin_guest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698