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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 24360011: Cancel JavaScript dialogs when an interstitial appears. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test Created 7 years, 3 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
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 5c51c153a666b65d41ff53407549e563c1b06a63..9c42e7c231561d0b913bac0799305fab369e1446 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1785,6 +1785,12 @@ void WebContentsImpl::AttachInterstitialPage(
InterstitialPageImpl* interstitial_page) {
DCHECK(interstitial_page);
render_manager_.set_interstitial_page(interstitial_page);
+
+ // Cancel any visible dialogs so that they don't interfere with the
+ // interstitial.
+ if (dialog_manager_)
+ dialog_manager_->CancelActiveAndPendingDialogs(this);
+
FOR_EACH_OBSERVER(WebContentsObserver, observers_,
DidAttachInterstitialPage());
}
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698