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

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

Issue 1150843002: Dismiss browser plugin modal dialogs when the embedder needs to. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move test file Created 5 years, 7 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 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;
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_embedder.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698