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

Unified Diff: chrome/browser/js_before_unload_handler_win.cc

Issue 39163: Make JavaScript alerts reflect the URL of the frame they came from, not the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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/js_before_unload_handler_win.h ('k') | chrome/browser/jsmessage_box_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/js_before_unload_handler_win.cc
===================================================================
--- chrome/browser/js_before_unload_handler_win.cc (revision 10892)
+++ chrome/browser/js_before_unload_handler_win.cc (working copy)
@@ -9,15 +9,16 @@
#include "chrome/views/message_box_view.h"
#include "grit/generated_resources.h"
-void RunBeforeUnloadDialog(
- WebContents* web_contents,
- const std::wstring& message_text,
- IPC::Message* reply_msg) {
+void RunBeforeUnloadDialog(WebContents* web_contents,
+ const GURL& frame_url,
+ const std::wstring& message_text,
+ IPC::Message* reply_msg) {
std::wstring full_message =
- message_text + L"\n\n" +
- l10n_util::GetString(IDS_BEFOREUNLOAD_MESSAGEBOX_FOOTER);
+ message_text + L"\n\n" +
+ l10n_util::GetString(IDS_BEFOREUNLOAD_MESSAGEBOX_FOOTER);
JavascriptBeforeUnloadHandler* handler =
- new JavascriptBeforeUnloadHandler(web_contents, full_message, reply_msg);
+ new JavascriptBeforeUnloadHandler(web_contents, frame_url, full_message,
+ reply_msg);
AppModalDialogQueue::AddDialog(handler);
}
@@ -25,12 +26,14 @@
JavascriptBeforeUnloadHandler::JavascriptBeforeUnloadHandler(
WebContents* web_contents,
+ const GURL& frame_url,
const std::wstring& message_text,
IPC::Message* reply_msg)
: JavascriptMessageBoxHandler(web_contents,
+ frame_url,
MessageBoxView::kIsJavascriptConfirm,
message_text,
- L"",
+ std::wstring(),
false,
reply_msg) {
}
« no previous file with comments | « chrome/browser/js_before_unload_handler_win.h ('k') | chrome/browser/jsmessage_box_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698