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

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

Issue 884043003: Cpp bindings: add typedef for callbacks. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: use using instead of typedef in cpp templates Created 5 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: 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 fbefce2d397192a0003377c120bca8d379184fc4..7644b2ef0440200b4b5d8844de69e55dbe9a9a8c 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/interface_macros.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/interface_macros.tmpl
@@ -17,7 +17,7 @@ mojo::Callback<void(
{%- macro declare_request_params(prefix, method) -%}
{{declare_params(prefix, method.parameters)}}
{%- if method.response_parameters != None -%}
-{%- if method.parameters %}, {% endif %}
-const {{declare_callback(method)}}& callback
+{%- if method.parameters %}, {% endif -%}
+const {{method.name}}Callback& callback
{%- endif -%}
{%- endmacro -%}

Powered by Google App Engine
This is Rietveld 408576698