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

Unified Diff: content/renderer/context_menu_params_builder.cc

Issue 2656043002: Use explicit WebString conversions in remaining content files (Closed)
Patch Set: build fix Created 3 years, 11 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/context_menu_params_builder.cc
diff --git a/content/renderer/context_menu_params_builder.cc b/content/renderer/context_menu_params_builder.cc
index 2a0f66d7bf4447dc5be571d7b4f89599075f19fa..a34477761fa618b7cebe56bf28e3eecf311f3ef6 100644
--- a/content/renderer/context_menu_params_builder.cc
+++ b/content/renderer/context_menu_params_builder.cc
@@ -28,9 +28,9 @@ ContextMenuParams ContextMenuParamsBuilder::Build(
params.keyword_url = data.keywordURL;
params.frame_url = data.frameURL;
params.media_flags = data.mediaFlags;
- params.selection_text = data.selectedText;
- params.title_text = data.titleText;
- params.misspelled_word = data.misspelledWord;
+ params.selection_text = data.selectedText.utf16();
+ params.title_text = data.titleText.utf16();
+ params.misspelled_word = data.misspelledWord.utf16();
params.misspelling_hash = data.misspellingHash;
params.spellcheck_enabled = data.isSpellCheckingEnabled;
params.is_editable = data.isEditable;
@@ -40,7 +40,7 @@ ContextMenuParams ContextMenuParamsBuilder::Build(
params.edit_flags = data.editFlags;
params.frame_charset = data.frameEncoding.utf8();
params.referrer_policy = data.referrerPolicy;
- params.suggested_filename = data.suggestedFilename;
+ params.suggested_filename = data.suggestedFilename.utf16();
params.input_field_type = data.inputFieldType;
if (!data.imageResponse.isNull()) {
@@ -49,7 +49,8 @@ ContextMenuParams ContextMenuParamsBuilder::Build(
}
for (size_t i = 0; i < data.dictionarySuggestions.size(); ++i)
- params.dictionary_suggestions.push_back(data.dictionarySuggestions[i]);
+ params.dictionary_suggestions.push_back(
+ data.dictionarySuggestions[i].utf16());
params.custom_context.is_pepper_menu = false;
for (size_t i = 0; i < data.customItems.size(); ++i)
@@ -60,7 +61,7 @@ ContextMenuParams ContextMenuParamsBuilder::Build(
SingleHistoryItemToPageState(data.frameHistoryItem);
}
- params.link_text = data.linkText;
+ params.link_text = data.linkText.utf16();
return params;
}

Powered by Google App Engine
This is Rietveld 408576698