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

Unified Diff: chrome/browser/ui/browser.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: content:: Created 4 years, 5 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.h ('k') | chrome/browser/ui/fast_unload_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 39519544c8df67a06252595604997d394b10d618..403711908cc6ff130510f078621e48fee6f43ee0 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1206,6 +1206,14 @@ bool Browser::CanOverscrollContent() const {
return true;
}
+bool Browser::ShouldSuppressDialogs(WebContents* source, bool before_unload) {
+ if (before_unload)
+ return false;
+
+ return exclusive_access_manager_->fullscreen_controller()
Matt Giuca 2016/08/02 01:42:20 optionally add a comment: // Do not show dialogs i
Avi (use Gerrit) 2016/08/02 03:53:30 That seems obvious enough from the code, though.
Matt Giuca 2016/08/02 04:23:50 Acknowledged, but see below because it's going to
+ ->IsControllerInitiatedFullscreen();
Matt Giuca 2016/08/02 03:34:56 Actually, I thought some more about this. I think
Avi (use Gerrit) 2016/08/02 03:53:30 That is a very reasonable approach, and I was thin
Matt Giuca 2016/08/02 04:23:50 Actually, I started doing this but I discovered th
Avi (use Gerrit) 2016/08/02 04:27:54 In that case, agreed, I'll clarify. How about: //
Matt Giuca 2016/08/02 04:28:52 SGTM.
+}
+
bool Browser::ShouldPreserveAbortedURLs(WebContents* source) {
// Allow failed URLs to stick around in the omnibox on the NTP, but not when
// other pages have committed.
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/fast_unload_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698