| OLD | NEW |
| 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 |
| 4 template <typename ImplRefTraits> |
| 3 class {{interface.name}}Stub; | 5 class {{interface.name}}Stub; |
| 4 | 6 |
| 5 class {{interface.name}}RequestValidator; | 7 class {{interface.name}}RequestValidator; |
| 6 {%- if interface|has_callbacks %} | 8 {%- if interface|has_callbacks %} |
| 7 class {{interface.name}}ResponseValidator; | 9 class {{interface.name}}ResponseValidator; |
| 8 {%- endif %} | 10 {%- endif %} |
| 9 | 11 |
| 10 class {{export_attribute}} {{interface.name}} | 12 class {{export_attribute}} {{interface.name}} |
| 11 : public {{interface.name}}InterfaceBase { | 13 : public {{interface.name}}InterfaceBase { |
| 12 public: | 14 public: |
| 13 static const char Name_[]; | 15 static const char Name_[]; |
| 14 static const uint32_t Version_ = {{interface.version}}; | 16 static const uint32_t Version_ = {{interface.version}}; |
| 15 static const bool PassesAssociatedKinds_ = {% if interface|passes_associated_k
inds %}true{% else %}false{% endif %}; | 17 static const bool PassesAssociatedKinds_ = {% if interface|passes_associated_k
inds %}true{% else %}false{% endif %}; |
| 16 static const bool HasSyncMethods_ = {% if interface|has_sync_methods %}true{%
else %}false{% endif %}; | 18 static const bool HasSyncMethods_ = {% if interface|has_sync_methods %}true{%
else %}false{% endif %}; |
| 17 | 19 |
| 18 using Proxy_ = {{interface.name}}Proxy; | 20 using Proxy_ = {{interface.name}}Proxy; |
| 19 using Stub_ = {{interface.name}}Stub; | 21 |
| 22 template <typename ImplRefTraits> |
| 23 using Stub_ = {{interface.name}}Stub<ImplRefTraits>; |
| 20 | 24 |
| 21 using RequestValidator_ = {{interface.name}}RequestValidator; | 25 using RequestValidator_ = {{interface.name}}RequestValidator; |
| 22 {%- if interface|has_callbacks %} | 26 {%- if interface|has_callbacks %} |
| 23 using ResponseValidator_ = {{interface.name}}ResponseValidator; | 27 using ResponseValidator_ = {{interface.name}}ResponseValidator; |
| 24 {%- else %} | 28 {%- else %} |
| 25 using ResponseValidator_ = mojo::PassThroughFilter; | 29 using ResponseValidator_ = mojo::PassThroughFilter; |
| 26 {%- endif %} | 30 {%- endif %} |
| 27 | 31 |
| 28 {#--- Enums #} | 32 {#--- Enums #} |
| 29 {%- for enum in interface.enums %} | 33 {%- for enum in interface.enums %} |
| (...skipping 19 matching lines...) Expand all Loading... |
| 49 // should implement the signature with callback below. | 53 // should implement the signature with callback below. |
| 50 virtual bool {{method.name}}({{interface_macros.declare_sync_method_params("",
method)}}); | 54 virtual bool {{method.name}}({{interface_macros.declare_sync_method_params("",
method)}}); |
| 51 {%- endif %} | 55 {%- endif %} |
| 52 | 56 |
| 53 using {{method.name}}Callback = {{interface_macros.declare_callback(method, | 57 using {{method.name}}Callback = {{interface_macros.declare_callback(method, |
| 54 for_blink, use_new_wrapper_types)}}; | 58 for_blink, use_new_wrapper_types)}}; |
| 55 {%- endif %} | 59 {%- endif %} |
| 56 virtual void {{method.name}}({{interface_macros.declare_request_params("", met
hod)}}) = 0; | 60 virtual void {{method.name}}({{interface_macros.declare_request_params("", met
hod)}}) = 0; |
| 57 {%- endfor %} | 61 {%- endfor %} |
| 58 }; | 62 }; |
| OLD | NEW |