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

Unified Diff: chrome/browser/jsmessage_box_handler_win.h

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/jsmessage_box_handler.h ('k') | chrome/browser/jsmessage_box_handler_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/jsmessage_box_handler_win.h
===================================================================
--- chrome/browser/jsmessage_box_handler_win.h (revision 10892)
+++ chrome/browser/jsmessage_box_handler_win.h (working copy)
@@ -10,6 +10,7 @@
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
#include "chrome/views/app_modal_dialog_delegate.h"
+#include "googleurl/src/gurl.h"
class MessageBoxView;
class WebContents;
@@ -23,6 +24,7 @@
public:
// Cross-platform code should use RunJavaScriptMessageBox.
JavascriptMessageBoxHandler(WebContents* web_contents,
+ const GURL& frame_url,
int dialog_flags,
const std::wstring& message_text,
const std::wstring& default_prompt_text,
@@ -64,6 +66,10 @@
// The associated WebContents. Used to send IPC messages to the renderer.
WebContents* web_contents_;
+ // The URL of the frame originating the dialog. It is important we display
+ // this so the user doesn't blame the enclosing site if a subframe alert()s.
+ GURL frame_url_;
+
// Stores flags defined in message_box_view.h which describe the dialog box.
int dialog_flags_;
« no previous file with comments | « chrome/browser/jsmessage_box_handler.h ('k') | chrome/browser/jsmessage_box_handler_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698