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

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

Issue 2194243002: Suppress JavaScript dialogs when a tab puts itself into fullscreen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: switch fullscreen call Created 4 years, 4 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/fast_unload_controller.cc ('k') | content/public/browser/web_contents_delegate.h » ('j') | 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 19d9d26bb515dabebf7fc2b03b581dc393474d66..c0acb735688cdd43fbc1a4fcdfb5739b136768dc 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4092,10 +4092,9 @@ void WebContentsImpl::RunJavaScriptMessage(
// Suppress JavaScript dialogs when requested. Also suppress messages when
// showing an interstitial as it's shown over the previous page and we don't
// want the hidden page's dialogs to interfere with the interstitial.
- bool suppress_this_message =
- ShowingInterstitialPage() || !delegate_ ||
- delegate_->ShouldSuppressDialogs(this) ||
- !delegate_->GetJavaScriptDialogManager(this);
+ bool suppress_this_message = ShowingInterstitialPage() || !delegate_ ||
+ delegate_->ShouldSuppressDialogs(this, false) ||
+ !delegate_->GetJavaScriptDialogManager(this);
if (!suppress_this_message) {
dialog_manager_ = delegate_->GetJavaScriptDialogManager(this);
@@ -4128,11 +4127,10 @@ void WebContentsImpl::RunBeforeUnloadConfirm(
if (delegate_)
delegate_->WillRunBeforeUnloadConfirm();
- bool suppress_this_message =
- !rfhi->is_active() ||
- ShowingInterstitialPage() || !delegate_ ||
- delegate_->ShouldSuppressDialogs(this) ||
- !delegate_->GetJavaScriptDialogManager(this);
+ bool suppress_this_message = !rfhi->is_active() ||
+ ShowingInterstitialPage() || !delegate_ ||
+ delegate_->ShouldSuppressDialogs(this, true) ||
+ !delegate_->GetJavaScriptDialogManager(this);
if (suppress_this_message) {
rfhi->JavaScriptDialogClosed(reply_msg, true, base::string16(), true);
return;
« no previous file with comments | « chrome/browser/ui/fast_unload_controller.cc ('k') | content/public/browser/web_contents_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698