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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2684093002: Rename JavaScript "messages" to "dialogs". (Closed)
Patch Set: win fox Created 3 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
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index ee0bba950d62619d2df6489e946e1addbccecdfb..97718e8e3c90b9ef9ecaada00e324e5f8c001bde 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -2322,11 +2322,11 @@ void RenderFrameImpl::OnFocusedFormFieldDataRequest(int request_id) {
field));
}
-bool RenderFrameImpl::RunJavaScriptMessage(JavaScriptMessageType type,
- const base::string16& message,
- const base::string16& default_value,
- const GURL& frame_url,
- base::string16* result) {
+bool RenderFrameImpl::RunJavaScriptDialog(JavaScriptDialogType type,
+ const base::string16& message,
+ const base::string16& default_value,
+ const GURL& frame_url,
+ base::string16* result) {
// Don't allow further dialogs if we are waiting to swap out, since the
// ScopedPageLoadDeferrer in our stack prevents it.
if (suppress_further_dialogs_)
@@ -2346,8 +2346,8 @@ bool RenderFrameImpl::RunJavaScriptMessage(JavaScriptMessageType type,
if (!result)
result = &result_temp;
- Send(new FrameHostMsg_RunJavaScriptMessage(
- routing_id_, message, default_value, frame_url, type, &success, result));
+ Send(new FrameHostMsg_RunJavaScriptDialog(routing_id_, message, default_value,
+ frame_url, type, &success, result));
return success;
}
@@ -4098,13 +4098,13 @@ blink::WebColorChooser* RenderFrameImpl::createColorChooser(
}
void RenderFrameImpl::runModalAlertDialog(const blink::WebString& message) {
- RunJavaScriptMessage(JAVASCRIPT_MESSAGE_TYPE_ALERT, message.utf16(),
- base::string16(), frame_->document().url(), NULL);
+ RunJavaScriptDialog(JAVASCRIPT_DIALOG_TYPE_ALERT, message.utf16(),
+ base::string16(), frame_->document().url(), NULL);
}
bool RenderFrameImpl::runModalConfirmDialog(const blink::WebString& message) {
- return RunJavaScriptMessage(JAVASCRIPT_MESSAGE_TYPE_CONFIRM, message.utf16(),
- base::string16(), frame_->document().url(), NULL);
+ return RunJavaScriptDialog(JAVASCRIPT_DIALOG_TYPE_CONFIRM, message.utf16(),
+ base::string16(), frame_->document().url(), NULL);
}
bool RenderFrameImpl::runModalPromptDialog(
@@ -4112,9 +4112,9 @@ bool RenderFrameImpl::runModalPromptDialog(
const blink::WebString& default_value,
blink::WebString* actual_value) {
base::string16 result;
- bool ok = RunJavaScriptMessage(JAVASCRIPT_MESSAGE_TYPE_PROMPT,
- message.utf16(), default_value.utf16(),
- frame_->document().url(), &result);
+ bool ok = RunJavaScriptDialog(JAVASCRIPT_DIALOG_TYPE_PROMPT, message.utf16(),
+ default_value.utf16(), frame_->document().url(),
+ &result);
if (ok)
actual_value->assign(WebString::fromUTF16(result));
return ok;
@@ -4128,7 +4128,7 @@ bool RenderFrameImpl::runModalBeforeUnloadDialog(bool is_reload) {
bool success = false;
// This is an ignored return value, but is included so we can accept the same
- // response as RunJavaScriptMessage.
+ // response as RunJavaScriptDialog.
base::string16 ignored_result;
Send(new FrameHostMsg_RunBeforeUnloadConfirm(
routing_id_, frame_->document().url(), is_reload, &success,
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/shell/browser/layout_test/layout_test_javascript_dialog_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698