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

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: Created 4 years, 8 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 9512433473b7a625f4b34d7545c992ed58b4836f..87f9a1e50509dc5aff1f2787cc35a28d0e69f920 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -688,6 +688,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