| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/message_box_handler.h" | 5 #include "chrome/browser/message_box_handler.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/message_box_flags.h" | 8 #include "app/message_box_flags.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "chrome/browser/app_modal_dialog_queue.h" | 10 #include "chrome/browser/app_modal_dialog_queue.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 message_text + L"\n\n" + | 53 message_text + L"\n\n" + |
| 54 l10n_util::GetString(IDS_BEFOREUNLOAD_MESSAGEBOX_FOOTER); | 54 l10n_util::GetString(IDS_BEFOREUNLOAD_MESSAGEBOX_FOOTER); |
| 55 Singleton<AppModalDialogQueue>()->AddDialog(new JavaScriptAppModalDialog( | 55 Singleton<AppModalDialogQueue>()->AddDialog(new JavaScriptAppModalDialog( |
| 56 tab_contents, l10n_util::GetString(IDS_BEFOREUNLOAD_MESSAGEBOX_TITLE), | 56 tab_contents, l10n_util::GetString(IDS_BEFOREUNLOAD_MESSAGEBOX_TITLE), |
| 57 MessageBoxFlags::kIsJavascriptConfirm, MakeTextSafe(message_text), | 57 MessageBoxFlags::kIsJavascriptConfirm, MakeTextSafe(message_text), |
| 58 std::wstring(), false, true, reply_msg)); | 58 std::wstring(), false, true, reply_msg)); |
| 59 } | 59 } |
| 60 | 60 |
| 61 #if defined(OS_WIN) | 61 #if defined(OS_WIN) |
| 62 void RunCookiePrompt(TabContents* tab_contents, | 62 void RunCookiePrompt(TabContents* tab_contents, |
| 63 const std::string& host, | 63 const GURL& url, |
| 64 const std::string& cookie_line, | 64 const std::string& cookie_line, |
| 65 CookiePromptModalDialogDelegate* delegate) { | 65 CookiePromptModalDialogDelegate* delegate) { |
| 66 Singleton<AppModalDialogQueue>()->AddDialog( | 66 Singleton<AppModalDialogQueue>()->AddDialog( |
| 67 new CookiePromptModalDialog(tab_contents, host, cookie_line, delegate)); | 67 new CookiePromptModalDialog(tab_contents, url, cookie_line, delegate)); |
| 68 } | 68 } |
| 69 | 69 |
| 70 | 70 |
| 71 void RunLocalStoragePrompt( | 71 void RunLocalStoragePrompt( |
| 72 TabContents* tab_contents, | 72 TabContents* tab_contents, |
| 73 const BrowsingDataLocalStorageHelper::LocalStorageInfo& local_storage_info, | 73 const BrowsingDataLocalStorageHelper::LocalStorageInfo& local_storage_info, |
| 74 CookiePromptModalDialogDelegate* delegate) { | 74 CookiePromptModalDialogDelegate* delegate) { |
| 75 Singleton<AppModalDialogQueue>()->AddDialog( | 75 Singleton<AppModalDialogQueue>()->AddDialog( |
| 76 new CookiePromptModalDialog(tab_contents, local_storage_info, delegate)); | 76 new CookiePromptModalDialog(tab_contents, local_storage_info, delegate)); |
| 77 } | 77 } |
| 78 #endif | 78 #endif |
| 79 | 79 |
| OLD | NEW |