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

Unified Diff: chrome/browser/message_box_handler.cc

Issue 560030: Refactored out JS specific part of modal dialog stack into its own class, exp... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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/message_box_handler.h ('k') | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/message_box_handler.cc
===================================================================
--- chrome/browser/message_box_handler.cc (revision 38012)
+++ chrome/browser/message_box_handler.cc (working copy)
@@ -1,14 +1,18 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/jsmessage_box_handler.h"
+#include "chrome/browser/message_box_handler.h"
#include "app/l10n_util.h"
#include "app/message_box_flags.h"
#include "build/build_config.h"
#include "chrome/browser/app_modal_dialog_queue.h"
+#include "chrome/browser/browsing_data_local_storage_helper.h"
+#include "chrome/browser/cookie_modal_dialog.h"
+#include "chrome/browser/cookie_prompt_modal_dialog_delegate.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/js_modal_dialog.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "googleurl/src/gurl.h"
#include "grit/generated_resources.h"
@@ -37,10 +41,9 @@
std::wstring title = client->GetMessageBoxTitle(frame_url,
(dialog_flags == MessageBoxFlags::kIsJavascriptAlert));
Singleton<AppModalDialogQueue>()->AddDialog(
- new AppModalDialog(client, title,
- dialog_flags, MakeTextSafe(message_text),
- default_prompt_text, display_suppress_checkbox,
- false, reply_msg));
+ new JavaScriptAppModalDialog(client, title, dialog_flags,
+ MakeTextSafe(message_text), default_prompt_text,
+ display_suppress_checkbox, false, reply_msg));
}
void RunBeforeUnloadDialog(TabContents* tab_contents,
@@ -49,8 +52,28 @@
std::wstring full_message =
message_text + L"\n\n" +
l10n_util::GetString(IDS_BEFOREUNLOAD_MESSAGEBOX_FOOTER);
- Singleton<AppModalDialogQueue>()->AddDialog(new AppModalDialog(
+ Singleton<AppModalDialogQueue>()->AddDialog(new JavaScriptAppModalDialog(
tab_contents, l10n_util::GetString(IDS_BEFOREUNLOAD_MESSAGEBOX_TITLE),
MessageBoxFlags::kIsJavascriptConfirm, MakeTextSafe(message_text),
std::wstring(), false, true, reply_msg));
}
+
+#if defined(OS_WIN)
+void RunCookiePrompt(TabContents* tab_contents,
+ const GURL& url,
+ const std::string& cookie_line,
+ CookiePromptModalDialogDelegate* delegate) {
+ Singleton<AppModalDialogQueue>()->AddDialog(
+ new CookiePromptModalDialog(tab_contents, url, cookie_line, delegate));
+}
+
+
+void RunLocalStoragePrompt(
+ TabContents* tab_contents,
+ const BrowsingDataLocalStorageHelper::LocalStorageInfo& local_storage_info,
+ CookiePromptModalDialogDelegate* delegate) {
+ Singleton<AppModalDialogQueue>()->AddDialog(
+ new CookiePromptModalDialog(tab_contents, local_storage_info, delegate));
+}
+#endif
+
« no previous file with comments | « chrome/browser/message_box_handler.h ('k') | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698