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

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: 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..e7138c6bcefe36cc9bdd88b5df6bb4494f3bfdb4 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_proceed_beforeunload_default(bool proceed) {
+ proceed_beforeunload_default_ = proceed;
+ }
private:
#if defined(OS_MACOSX) || defined(OS_WIN)
@@ -56,6 +59,8 @@ class ShellJavaScriptDialogManager : public JavaScriptDialogManager {
#endif
base::Closure dialog_request_callback_;
+ bool proceed_beforeunload_default_;
+ DialogClosedCallback before_unload_callback_;
DISALLOW_COPY_AND_ASSIGN(ShellJavaScriptDialogManager);
};

Powered by Google App Engine
This is Rietveld 408576698