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

Unified Diff: extensions/browser/guest_view/web_view/javascript_dialog_helper.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
« no previous file with comments | « extensions/browser/guest_view/web_view/javascript_dialog_helper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/guest_view/web_view/javascript_dialog_helper.cc
diff --git a/extensions/browser/guest_view/web_view/javascript_dialog_helper.cc b/extensions/browser/guest_view/web_view/javascript_dialog_helper.cc
index 200559ccf3e355879f9f9fedf704d70ed8df9960..e420cdc96f2a6fb25504622ffff2864df66b5d71 100644
--- a/extensions/browser/guest_view/web_view/javascript_dialog_helper.cc
+++ b/extensions/browser/guest_view/web_view/javascript_dialog_helper.cc
@@ -16,14 +16,14 @@ namespace extensions {
namespace {
-std::string JavaScriptMessageTypeToString(
- content::JavaScriptMessageType message_type) {
- switch (message_type) {
- case content::JAVASCRIPT_MESSAGE_TYPE_ALERT:
+std::string JavaScriptDialogTypeToString(
+ content::JavaScriptDialogType dialog_type) {
+ switch (dialog_type) {
+ case content::JAVASCRIPT_DIALOG_TYPE_ALERT:
return "alert";
- case content::JAVASCRIPT_MESSAGE_TYPE_CONFIRM:
+ case content::JAVASCRIPT_DIALOG_TYPE_CONFIRM:
return "confirm";
- case content::JAVASCRIPT_MESSAGE_TYPE_PROMPT:
+ case content::JAVASCRIPT_DIALOG_TYPE_PROMPT:
return "prompt";
default:
NOTREACHED() << "Unknown JavaScript Message Type.";
@@ -43,7 +43,7 @@ JavaScriptDialogHelper::~JavaScriptDialogHelper() {
void JavaScriptDialogHelper::RunJavaScriptDialog(
content::WebContents* web_contents,
const GURL& origin_url,
- content::JavaScriptMessageType javascript_message_type,
+ content::JavaScriptDialogType dialog_type,
const base::string16& message_text,
const base::string16& default_prompt_text,
const DialogClosedCallback& callback,
@@ -54,9 +54,9 @@ void JavaScriptDialogHelper::RunJavaScriptDialog(
new base::StringValue(base::UTF16ToUTF8(default_prompt_text)));
request_info.Set(webview::kMessageText,
new base::StringValue(base::UTF16ToUTF8(message_text)));
- request_info.Set(webview::kMessageType,
- new base::StringValue(
- JavaScriptMessageTypeToString(javascript_message_type)));
+ request_info.Set(
+ webview::kMessageType,
+ new base::StringValue(JavaScriptDialogTypeToString(dialog_type)));
request_info.Set(guest_view::kUrl, new base::StringValue(origin_url.spec()));
WebViewPermissionHelper* web_view_permission_helper =
WebViewPermissionHelper::FromWebContents(web_contents);
« no previous file with comments | « extensions/browser/guest_view/web_view/javascript_dialog_helper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698