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

Unified Diff: mojo/public/tools/bindings/generators/cpp_templates/interface_macros.tmpl

Issue 1751563002: Mojo C++ bindings: support mapping mojo string to WTF::String. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync & rebase Created 4 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 side-by-side diff with in-line comments
Download patch
Index: mojo/public/tools/bindings/generators/cpp_templates/interface_macros.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/interface_macros.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/interface_macros.tmpl
index b00b1dad5adcd1fda91a0319aa661e32b653a288..f6056e80e05413055daf44ef9861af57ae6dee43 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/interface_macros.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/interface_macros.tmpl
@@ -5,13 +5,13 @@
{%- endfor %}
{%- endmacro %}
-{%- macro declare_callback(method) -%}
+{%- macro declare_callback(method, for_blink) -%}
mojo::Callback<void(
{%- for param in method.response_parameters -%}
{#- TODO(yzshen): Previously |cpp_result_type| is used here incorrectly.
The outcome is we will use mojo::String instead of const mojo::String&.
Preserve the behavior temporarily. #}
-{%- if not param.kind|is_string_kind -%}
+{%- if (not param.kind|is_string_kind) or for_blink -%}
{{param.kind|cpp_const_wrapper_type}}
{%- else -%}
mojo::String

Powered by Google App Engine
This is Rietveld 408576698