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

Unified Diff: chrome/browser/ui/app_modal_dialogs/js_modal_dialog.cc

Issue 5548001: It turns out the Cleanup() method in JsModalDialog is not (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month 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 | « chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_modal_dialogs/js_modal_dialog.cc
diff --git a/chrome/browser/ui/app_modal_dialogs/js_modal_dialog.cc b/chrome/browser/ui/app_modal_dialogs/js_modal_dialog.cc
index a1c72f0e8e3dec5a2ef9cd946f2efa57c3d6753b..47d4b82cab0a14d628231dd8923b3a12d9062b07 100644
--- a/chrome/browser/ui/app_modal_dialogs/js_modal_dialog.cc
+++ b/chrome/browser/ui/app_modal_dialogs/js_modal_dialog.cc
@@ -115,8 +115,6 @@ void JavaScriptAppModalDialog::OnCancel(bool suppress_js_messages) {
if (suppress_js_messages)
delegate_->SetSuppressMessageBoxes(true);
}
-
- Cleanup();
}
void JavaScriptAppModalDialog::OnAccept(const std::wstring& prompt_text,
@@ -128,28 +126,12 @@ void JavaScriptAppModalDialog::OnAccept(const std::wstring& prompt_text,
if (suppress_js_messages)
delegate_->SetSuppressMessageBoxes(true);
}
-
- Cleanup();
}
void JavaScriptAppModalDialog::OnClose() {
- Cleanup();
-}
-
-void JavaScriptAppModalDialog::Cleanup() {
- if (skip_this_dialog_) {
- // We can't use the |delegate_|, because we might be in the process of
- // destroying it.
- if (tab_contents_)
- tab_contents_->OnMessageBoxClosed(reply_msg_, false, L"");
-// The extension_host_ will always be a dirty pointer on OS X because the alert
-// window will cause the extension popup to close since it is resigning its key
-// state, destroying the host. http://crbug.com/29355
-#if !defined(OS_MACOSX)
- else if (extension_host_)
- extension_host_->OnMessageBoxClosed(reply_msg_, false, L"");
- else
- NOTREACHED();
-#endif
+ if (!skip_this_dialog_) {
+ delegate_->OnMessageBoxClosed(reply_msg_, true, L"");
+ // TODO(aa): It would be good to handle supress here, too, but we need to
+ // get passed the bit.
}
}
« no previous file with comments | « chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698