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

Unified Diff: content/browser/web_contents/web_contents_impl.h

Issue 2384813002: Don't wait to close tabs waiting for JavaScript dialogs. (Closed)
Patch Set: now a bit on webcontents, no timer fiddling Created 4 years, 2 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/browser/web_contents/web_contents_impl.h
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 7b0429de7aa84e4f648b0ec4c4a686fe11e8b93f..a79dff3fffca57087c49a51dc1964f3145004e18 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -466,6 +466,7 @@ class CONTENT_EXPORT WebContentsImpl
void RunBeforeUnloadConfirm(RenderFrameHost* render_frame_host,
bool is_reload,
IPC::Message* reply_msg) override;
+ bool IsJavaScriptDialogShowing() const override;
void RunFileChooser(RenderFrameHost* render_frame_host,
const FileChooserParams& params) override;
void DidAccessInitialDocument() override;
@@ -1295,6 +1296,9 @@ class CONTENT_EXPORT WebContentsImpl
// delegate of this WebContentsImpl is nulled before its destructor is called.
JavaScriptDialogManager* dialog_manager_;
+ // Set to true when there is an active JavaScript dialog showing.
+ bool is_showing_javascript_dialog_ = false;
+
// Set to true when there is an active "before unload" dialog. When true,
// we've forced the throbber to start in Navigate, and we need to remember to
// turn it off in OnJavaScriptMessageBoxClosed if the navigation is canceled.

Powered by Google App Engine
This is Rietveld 408576698