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

Unified Diff: chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc

Issue 2412843002: Simplify the JavaScriptDialogManager. (Closed)
Patch Set: braces 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: chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc
diff --git a/chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc b/chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc
index 9f55898589b88c1c90e3bfc3e408c36792e01483..4abd35a0aff6e0b6d4d828970a122d7070a912f3 100644
--- a/chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc
+++ b/chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc
@@ -145,19 +145,15 @@ bool JavaScriptDialogTabHelper::HandleJavaScriptDialog(
return false;
}
-void JavaScriptDialogTabHelper::CancelActiveAndPendingDialogs(
- content::WebContents* web_contents) {
+void JavaScriptDialogTabHelper::CancelDialogs(
+ content::WebContents* web_contents,
+ bool suppress_callbacks,
+ bool reset_state) {
// Cancel any app-modal dialogs that may be going.
- AppModalDialogManager()->CancelActiveAndPendingDialogs(web_contents);
-
- // More work here for the auto-dismissing dialogs.
-}
-
-void JavaScriptDialogTabHelper::ResetDialogState(
- content::WebContents* web_contents) {
- // Reset any app-modal dialog state that may exist.
- if (!IsEnabled())
- return AppModalDialogManager()->ResetDialogState(web_contents);
+ if (!IsEnabled()) {
+ return AppModalDialogManager()->CancelDialogs(
+ web_contents, suppress_callbacks, reset_state);
+ }
// More work here for the auto-dismissing dialogs.
}
« no previous file with comments | « chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.h ('k') | components/app_modal/app_modal_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698