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

Unified Diff: third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl

Issue 883843002: Update mojo sdk to rev 126532ce21c5c3c55a1e1693731411cb60169efd (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to review 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: third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl
diff --git a/third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl b/third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl
index 30d20d8993e601f078e81340bba453341494eb4c..25c01bb987d3870d9565081b8e30f84fdc3316a7 100644
--- a/third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl
+++ b/third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl
@@ -14,19 +14,19 @@ class {{interface.name}} {
public:
static const char* Name_;
- typedef {{interface.name}}Proxy Proxy_;
- typedef {{interface.name}}Stub Stub_;
+ using Proxy_ = {{interface.name}}Proxy;
+ using Stub_ = {{interface.name}}Stub;
- typedef {{interface.name}}RequestValidator RequestValidator_;
+ using RequestValidator_ = {{interface.name}}RequestValidator;
{%- if interface|has_callbacks %}
- typedef {{interface.name}}ResponseValidator ResponseValidator_;
+ using ResponseValidator_ = {{interface.name}}ResponseValidator;
{%- else %}
- typedef mojo::PassThroughFilter ResponseValidator_;
+ using ResponseValidator_ = mojo::PassThroughFilter;
{%- endif %}
{% if interface.client %}
- typedef {{interface.client}} Client;
+ using Client = {{interface.client}};
{% else %}
- typedef mojo::NoInterface Client;
+ using Client = mojo::NoInterface;
{% endif %}
{#--- Constants #}
@@ -44,6 +44,9 @@ class {{interface.name}} {
virtual ~{{interface.name}}() {}
{%- for method in interface.methods %}
+{% if method.response_parameters != None %}
+ using {{method.name}}Callback = {{interface_macros.declare_callback(method)}};
+{%- endif %}
virtual void {{method.name}}({{interface_macros.declare_request_params("", method)}}) = 0;
{%- endfor %}
};

Powered by Google App Engine
This is Rietveld 408576698