| {%- macro declare_params(prefix, parameters) %} |
| {%- for param in parameters -%} |
| {{param.kind|cpp_wrapper_param_type}} {{prefix}}{{param.name}} |
| {%- if not loop.last %}, {% endif %} |
| {%- endfor %} |
| {%- endmacro %} |
| |
| {%- macro declare_responder_params(prefix, parameters, for_blink) %} |
| {%- for param in parameters -%} |
| {{param.kind|cpp_wrapper_param_type}} {{prefix}}{{param.name}} |
| {%- if not loop.last %}, {% endif %} |
| {%- endfor %} |
| {%- endmacro %} |
| |
| {%- macro declare_callback(method, for_blink, use_once_callback) -%} |
| {%- if use_once_callback -%} |
| base::OnceCallback<void( |
| {%- else -%} |
| base::Callback<void( |
| {%- endif -%} |
| {%- for param in method.response_parameters -%} |
| {{param.kind|cpp_wrapper_param_type}} |
| {%- if not loop.last %}, {% endif %} |
| {%- endfor -%} |
| )> |
| {%- endmacro -%} |
| |
| {%- macro declare_request_params(prefix, method, use_once_callback) -%} |
| {{declare_params(prefix, method.parameters)}} |
| {%- if method.response_parameters != None -%} |
| {%- if method.parameters %}, {% endif -%} |
| {%- if use_once_callback -%} |
| {{method.name}}Callback callback |
| {%- else -%} |
| const {{method.name}}Callback& callback |
| {%- endif -%} |
| {%- endif -%} |
| {%- endmacro -%} |
| |
| {%- macro declare_sync_method_params(prefix, method) -%} |
| {{declare_params(prefix, method.parameters)}} |
| {%- if method.response_parameters %} |
| {%- if method.parameters %}, {% endif %} |
| {%- for param in method.response_parameters -%} |
| {{param.kind|cpp_wrapper_type}}* {{prefix}}{{param.name}} |
| {%- if not loop.last %}, {% endif %} |
| {%- endfor %} |
| {%- endif -%} |
| {%- endmacro -%} |