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

Side by Side Diff: chrome/browser/renderer_host/render_view_host.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, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/renderer_host/render_view_host.h" 5 #include "chrome/browser/renderer_host/render_view_host.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/gfx/native_widget_types.h" 10 #include "base/gfx/native_widget_types.h"
(...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 const std::wstring& default_file, 1081 const std::wstring& default_file,
1082 const std::wstring& filter) { 1082 const std::wstring& filter) {
1083 std::wstring real_filter = filter; 1083 std::wstring real_filter = filter;
1084 std::replace(real_filter.begin(), real_filter.end(), '|', '\0'); 1084 std::replace(real_filter.begin(), real_filter.end(), '|', '\0');
1085 delegate_->RunFileChooser(multiple_files, title, default_file, real_filter); 1085 delegate_->RunFileChooser(multiple_files, title, default_file, real_filter);
1086 } 1086 }
1087 1087
1088 void RenderViewHost::OnMsgRunJavaScriptMessage( 1088 void RenderViewHost::OnMsgRunJavaScriptMessage(
1089 const std::wstring& message, 1089 const std::wstring& message,
1090 const std::wstring& default_prompt, 1090 const std::wstring& default_prompt,
1091 const GURL& frame_url,
1091 const int flags, 1092 const int flags,
1092 IPC::Message* reply_msg) { 1093 IPC::Message* reply_msg) {
1093 StopHangMonitorTimeout(); 1094 StopHangMonitorTimeout();
1094 if (modal_dialog_count_++ == 0) 1095 if (modal_dialog_count_++ == 0)
1095 modal_dialog_event_->Signal(); 1096 modal_dialog_event_->Signal();
1096 delegate_->RunJavaScriptMessage(message, default_prompt, flags, reply_msg, 1097 delegate_->RunJavaScriptMessage(message, default_prompt, frame_url, flags,
1098 reply_msg,
1097 &are_javascript_messages_suppressed_); 1099 &are_javascript_messages_suppressed_);
1098 } 1100 }
1099 1101
1100 void RenderViewHost::OnMsgRunBeforeUnloadConfirm(const std::wstring& message, 1102 void RenderViewHost::OnMsgRunBeforeUnloadConfirm(const GURL& frame_url,
1103 const std::wstring& message,
1101 IPC::Message* reply_msg) { 1104 IPC::Message* reply_msg) {
1102 StopHangMonitorTimeout(); 1105 StopHangMonitorTimeout();
1103 if (modal_dialog_count_++ == 0) 1106 if (modal_dialog_count_++ == 0)
1104 modal_dialog_event_->Signal(); 1107 modal_dialog_event_->Signal();
1105 delegate_->RunBeforeUnloadConfirm(message, reply_msg); 1108 delegate_->RunBeforeUnloadConfirm(frame_url, message, reply_msg);
1106 } 1109 }
1107 1110
1108 void RenderViewHost::OnMsgShowModalHTMLDialog( 1111 void RenderViewHost::OnMsgShowModalHTMLDialog(
1109 const GURL& url, int width, int height, const std::string& json_arguments, 1112 const GURL& url, int width, int height, const std::string& json_arguments,
1110 IPC::Message* reply_msg) { 1113 IPC::Message* reply_msg) {
1111 StopHangMonitorTimeout(); 1114 StopHangMonitorTimeout();
1112 if (modal_dialog_count_++ == 0) 1115 if (modal_dialog_count_++ == 0)
1113 modal_dialog_event_->Signal(); 1116 modal_dialog_event_->Signal();
1114 delegate_->ShowModalHTMLDialog(url, width, height, json_arguments, reply_msg); 1117 delegate_->ShowModalHTMLDialog(url, width, height, json_arguments, reply_msg);
1115 } 1118 }
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1330 void RenderViewHost::RaisePersonalizationEvent(std::string event_name, 1333 void RenderViewHost::RaisePersonalizationEvent(std::string event_name,
1331 std::string event_arg) { 1334 std::string event_arg) {
1332 Send(new ViewMsg_PersonalizationEvent(routing_id(), event_name, event_arg)); 1335 Send(new ViewMsg_PersonalizationEvent(routing_id(), event_name, event_arg));
1333 } 1336 }
1334 #endif 1337 #endif
1335 1338
1336 void RenderViewHost::ForwardMessageFromExternalHost( 1339 void RenderViewHost::ForwardMessageFromExternalHost(
1337 const std::string& message) { 1340 const std::string& message) {
1338 Send(new ViewMsg_HandleMessageFromExternalHost(routing_id(), message)); 1341 Send(new ViewMsg_HandleMessageFromExternalHost(routing_id(), message));
1339 } 1342 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_view_host.h ('k') | chrome/browser/renderer_host/render_view_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698