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

Side by Side Diff: mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl

Issue 2259283003: Mojo C++ bindings: share DataView class between chromium and blink variants. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@92_change_traits_param
Patch Set: . Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 {%- import "interface_macros.tmpl" as interface_macros %} 1 {%- import "interface_macros.tmpl" as interface_macros %}
2 class {{interface.name}}Proxy; 2 class {{interface.name}}Proxy;
3 class {{interface.name}}Stub; 3 class {{interface.name}}Stub;
4 4
5 class {{interface.name}}RequestValidator; 5 class {{interface.name}}RequestValidator;
6 {%- if interface|has_callbacks %} 6 {%- if interface|has_callbacks %}
7 class {{interface.name}}ResponseValidator; 7 class {{interface.name}}ResponseValidator;
8 {%- endif %} 8 {%- endif %}
9 9
10 class {{export_attribute}} {{interface.name}} { 10 class {{export_attribute}} {{interface.name}}
11 : public {{interface.name}}InterfaceBase {
11 public: 12 public:
12 static const char Name_[]; 13 static const char Name_[];
13 static const uint32_t Version_ = {{interface.version}}; 14 static const uint32_t Version_ = {{interface.version}};
14 static const bool PassesAssociatedKinds_ = {% if interface|passes_associated_k inds %}true{% else %}false{% endif %}; 15 static const bool PassesAssociatedKinds_ = {% if interface|passes_associated_k inds %}true{% else %}false{% endif %};
15 static const bool HasSyncMethods_ = {% if interface|has_sync_methods %}true{% else %}false{% endif %}; 16 static const bool HasSyncMethods_ = {% if interface|has_sync_methods %}true{% else %}false{% endif %};
16 17
17 using Proxy_ = {{interface.name}}Proxy; 18 using Proxy_ = {{interface.name}}Proxy;
18 using Stub_ = {{interface.name}}Stub; 19 using Stub_ = {{interface.name}}Stub;
19 20
20 using RequestValidator_ = {{interface.name}}RequestValidator; 21 using RequestValidator_ = {{interface.name}}RequestValidator;
(...skipping 27 matching lines...) Expand all
48 // should implement the signature with callback below. 49 // should implement the signature with callback below.
49 virtual bool {{method.name}}({{interface_macros.declare_sync_method_params("", method)}}); 50 virtual bool {{method.name}}({{interface_macros.declare_sync_method_params("", method)}});
50 {%- endif %} 51 {%- endif %}
51 52
52 using {{method.name}}Callback = {{interface_macros.declare_callback(method, 53 using {{method.name}}Callback = {{interface_macros.declare_callback(method,
53 for_blink, use_new_wrapper_types)}}; 54 for_blink, use_new_wrapper_types)}};
54 {%- endif %} 55 {%- endif %}
55 virtual void {{method.name}}({{interface_macros.declare_request_params("", met hod)}}) = 0; 56 virtual void {{method.name}}({{interface_macros.declare_request_params("", met hod)}}) = 0;
56 {%- endfor %} 57 {%- endfor %}
57 }; 58 };
OLDNEW
« no previous file with comments | « mojo/public/tools/bindings/BUILD.gn ('k') | mojo/public/tools/bindings/generators/cpp_templates/module-shared.h.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698