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

Unified Diff: chrome/browser/jsmessage_box_handler.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 | « chrome/browser/automation/automation_provider.cc ('k') | chrome/browser/views/frame/browser_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/jsmessage_box_handler.cc
===================================================================
--- chrome/browser/jsmessage_box_handler.cc (revision 17006)
+++ chrome/browser/jsmessage_box_handler.cc (working copy)
@@ -68,9 +68,11 @@
bool display_suppress_checkbox,
IPC::Message* reply_msg) {
std::wstring title = GetWindowTitle(tab_contents, frame_url, dialog_flags);
- AppModalDialogQueue::AddDialog(new AppModalDialog(tab_contents, title,
- dialog_flags, MakeTextSafe(message_text), default_prompt_text,
- display_suppress_checkbox, false, reply_msg));
+ Singleton<AppModalDialogQueue>()->AddDialog(
+ new AppModalDialog(tab_contents, title,
+ dialog_flags, MakeTextSafe(message_text),
+ default_prompt_text, display_suppress_checkbox,
+ false, reply_msg));
}
void RunBeforeUnloadDialog(TabContents* tab_contents,
@@ -79,7 +81,7 @@
std::wstring full_message =
message_text + L"\n\n" +
l10n_util::GetString(IDS_BEFOREUNLOAD_MESSAGEBOX_FOOTER);
- AppModalDialogQueue::AddDialog(new AppModalDialog(
+ Singleton<AppModalDialogQueue>()->AddDialog(new AppModalDialog(
tab_contents, l10n_util::GetString(IDS_BEFOREUNLOAD_MESSAGEBOX_TITLE),
MessageBoxFlags::kIsJavascriptConfirm, MakeTextSafe(message_text),
std::wstring(), false, true, reply_msg));
« no previous file with comments | « chrome/browser/automation/automation_provider.cc ('k') | chrome/browser/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698