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 cee9b435898a344f252c8e4796b5154931cbd146..e563df0cac88f784a1e73deecb108810427bce72 100644 |
--- a/content/browser/browser_plugin/browser_plugin_embedder.cc |
+++ b/content/browser/browser_plugin/browser_plugin_embedder.cc |
@@ -64,6 +64,20 @@ void BrowserPluginEmbedder::ScreenInfoChanged() { |
&BrowserPluginEmbedder::NotifyScreenInfoChanged)); |
} |
+// static |
+bool BrowserPluginEmbedder::CancelDialogs(WebContents* guest_web_contents) { |
+ static_cast<WebContentsImpl*>(guest_web_contents) |
+ ->CancelActiveAndPendingDialogs(); |
+ |
+ // Returns false to iterate over all guests. |
+ return false; |
+} |
+ |
+void BrowserPluginEmbedder::CancelGuestDialogs() { |
+ GetBrowserPluginGuestManager()->ForEachGuest( |
+ web_contents(), base::Bind(&BrowserPluginEmbedder::CancelDialogs)); |
+} |
+ |
void BrowserPluginEmbedder::StartDrag(BrowserPluginGuest* guest) { |
guest_started_drag_ = guest->AsWeakPtr(); |
guest_drag_ending_ = false; |