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

Unified Diff: chrome/browser/app_modal_dialog.cc

Issue 113932: Clean-up of the app modal dialog queue (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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 | « no previous file | chrome/browser/app_modal_dialog_queue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/app_modal_dialog.cc
===================================================================
--- chrome/browser/app_modal_dialog.cc (revision 17006)
+++ chrome/browser/app_modal_dialog.cc (working copy)
@@ -18,7 +18,8 @@
bool display_suppress_checkbox,
bool is_before_unload_dialog,
IPC::Message* reply_msg)
- : tab_contents_(tab_contents),
+ : dialog_(NULL),
+ tab_contents_(tab_contents),
title_(title),
dialog_flags_(dialog_flags),
message_text_(message_text),
@@ -62,7 +63,7 @@
// If the TabContents that created this dialog navigated away before this
// dialog became visible, simply show the next dialog if any.
if (!tab_contents_) {
- AppModalDialogQueue::ShowNextDialog();
+ Singleton<AppModalDialogQueue>()->ShowNextDialog();
delete this;
return;
}
@@ -78,7 +79,7 @@
// that were still open in the ModalDialogQueue, which would send activation
// back to this one. The framework should be improved to handle this, so this
// is a temporary workaround.
- AppModalDialogQueue::ShowNextDialog();
+ Singleton<AppModalDialogQueue>()->ShowNextDialog();
if (tab_contents_) {
tab_contents_->OnJavaScriptMessageBoxClosed(reply_msg_, false,
@@ -88,7 +89,7 @@
void AppModalDialog::OnAccept(const std::wstring& prompt_text,
bool suppress_js_messages) {
- AppModalDialogQueue::ShowNextDialog();
+ Singleton<AppModalDialogQueue>()->ShowNextDialog();
if (tab_contents_) {
tab_contents_->OnJavaScriptMessageBoxClosed(reply_msg_, true,
« no previous file with comments | « no previous file | chrome/browser/app_modal_dialog_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698