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

Unified Diff: chrome/browser/ui/browser.cc

Issue 1931793002: Stop using nested message loop for alert() and other JS dialogs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated comment Created 4 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: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 40354c26444ca7b998fac5c2e1bb71c497fcbe9f..ada9d5e17b2ef1ca595dbfa58ecb0a210859e1b5 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -690,6 +690,20 @@ bool Browser::IsAttemptingToCloseBrowser() const {
return unload_controller_->is_attempting_to_close_browser();
}
+bool Browser::ShouldRunUnloadListenerBeforeClosing(
+ content::WebContents* web_contents) {
+ if (IsFastTabUnloadEnabled())
+ return fast_unload_controller_->ShouldRunUnloadEventsHelper(web_contents);
+ return unload_controller_->ShouldRunUnloadEventsHelper(web_contents);
+}
+
+bool Browser::RunUnloadListenerBeforeClosing(
+ content::WebContents* web_contents) {
+ if (IsFastTabUnloadEnabled())
+ return fast_unload_controller_->RunUnloadEventsHelper(web_contents);
+ return unload_controller_->RunUnloadEventsHelper(web_contents);
+}
+
void Browser::OnWindowClosing() {
if (!ShouldCloseWindow())
return;

Powered by Google App Engine
This is Rietveld 408576698