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

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

Issue 2384813002: Don't wait to close tabs waiting for JavaScript dialogs. (Closed)
Patch Set: remove code no longer needed 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 6e0a94fd7fa738f9143c4512187efca87c3c6807..dea63ab0658e12887f32e8f489cb9f1e94a2ff84 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2383,6 +2383,10 @@ bool WebContentsImpl::IsOverridingUserAgent() {
GetController().GetVisibleEntry()->GetIsOverridingUserAgent();
}
+bool WebContentsImpl::IsJavaScriptDialogShowing() const {
+ return is_showing_javascript_dialog_;
+}
+
AccessibilityMode WebContentsImpl::GetAccessibilityMode() const {
return accessibility_mode_;
}
@@ -4130,6 +4134,7 @@ void WebContentsImpl::RunJavaScriptMessage(
!delegate_->GetJavaScriptDialogManager(this);
if (!suppress_this_message) {
+ is_showing_javascript_dialog_ = true;
dialog_manager_ = delegate_->GetJavaScriptDialogManager(this);
dialog_manager_->RunJavaScriptDialog(
this, frame_url, javascript_message_type, message, default_prompt,
@@ -5045,6 +5050,7 @@ void WebContentsImpl::OnDialogClosed(int render_process_id,
BeforeUnloadDialogCancelled());
}
+ is_showing_javascript_dialog_ = false;
is_showing_before_unload_dialog_ = false;
if (rfh) {
rfh->JavaScriptDialogClosed(reply_msg, success, user_input,
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698