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

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

Issue 2681203002: Add Browser::SkipCallBeforeUnload so that the browser windows can be closed regardless of beforeunl… (Closed)
Patch Set: rebase from master Created 3 years, 9 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/unload_controller_web_contents_delegate.cc
diff --git a/chrome/browser/ui/unload_controller_web_contents_delegate.cc b/chrome/browser/ui/unload_controller_web_contents_delegate.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a80f51cd7a773ec5b3bd4649c3c7bb871b9170d9
--- /dev/null
+++ b/chrome/browser/ui/unload_controller_web_contents_delegate.cc
@@ -0,0 +1,20 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/unload_controller_web_contents_delegate.h"
+
+#include "content/public/browser/web_contents.h"
+
+UnloadControllerWebContentsDelegate::UnloadControllerWebContentsDelegate() {}
+UnloadControllerWebContentsDelegate::~UnloadControllerWebContentsDelegate() {}
+
+bool UnloadControllerWebContentsDelegate::ShouldSuppressDialogs(
+ content::WebContents* source) {
+ return true;
+}
+
+void UnloadControllerWebContentsDelegate::CloseContents(
+ content::WebContents* source) {
+ delete source;
+}

Powered by Google App Engine
This is Rietveld 408576698