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

Unified Diff: content/shell/browser/shell_javascript_dialog_manager.h

Issue 1825523002: Do not reset navigation state when BeforeUnload is cancelled by a commit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + addressed nit Created 4 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: content/shell/browser/shell_javascript_dialog_manager.h
diff --git a/content/shell/browser/shell_javascript_dialog_manager.h b/content/shell/browser/shell_javascript_dialog_manager.h
index 42311042374f6ec14fadc8ee523650c5096a201f..9dee3a22b0e7bffb914c3283de10050c8ec8ae23 100644
--- a/content/shell/browser/shell_javascript_dialog_manager.h
+++ b/content/shell/browser/shell_javascript_dialog_manager.h
@@ -46,6 +46,9 @@ class ShellJavaScriptDialogManager : public JavaScriptDialogManager {
void set_dialog_request_callback(const base::Closure& callback) {
dialog_request_callback_ = callback;
}
+ void set_should_proceed_on_beforeunload(bool proceed) {
+ should_proceed_on_beforeunload_ = proceed;
+ }
private:
#if defined(OS_MACOSX) || defined(OS_WIN)
@@ -57,6 +60,12 @@ class ShellJavaScriptDialogManager : public JavaScriptDialogManager {
base::Closure dialog_request_callback_;
+ // Whether to automatically proceed when asked to display a BeforeUnload
+ // dialog.
+ bool should_proceed_on_beforeunload_;
+
+ DialogClosedCallback before_unload_callback_;
+
DISALLOW_COPY_AND_ASSIGN(ShellJavaScriptDialogManager);
};

Powered by Google App Engine
This is Rietveld 408576698