| OLD | NEW |
| 1 {%- macro declare_params(prefix, parameters) %} | 1 {%- macro declare_params(prefix, parameters) %} |
| 2 {%- for param in parameters -%} | 2 {%- for param in parameters -%} |
| 3 {{param.kind|cpp_wrapper_param_type}} {{prefix}}{{param.name}} | 3 {{param.kind|cpp_wrapper_param_type}} {{prefix}}{{param.name}} |
| 4 {%- if not loop.last %}, {% endif %} | 4 {%- if not loop.last %}, {% endif %} |
| 5 {%- endfor %} | 5 {%- endfor %} |
| 6 {%- endmacro %} | 6 {%- endmacro %} |
| 7 | 7 |
| 8 {%- macro declare_responder_params(prefix, parameters, for_blink) %} | 8 {%- macro declare_responder_params(prefix, parameters, for_blink) %} |
| 9 {%- for param in parameters -%} | 9 {%- for param in parameters -%} |
| 10 {%- if (not param.kind|is_string_kind) or for_blink -%} | 10 {%- if (not param.kind|is_string_kind) or for_blink -%} |
| 11 {{param.kind|cpp_wrapper_param_type}} {{prefix}}{{param.name}} | 11 {{param.kind|cpp_wrapper_param_type}} {{prefix}}{{param.name}} |
| 12 {%- else %} | 12 {%- else %} |
| 13 mojo::String {{prefix}}{{param.name}} | 13 mojo::String {{prefix}}{{param.name}} |
| 14 {%- endif %} | 14 {%- endif %} |
| 15 {%- if not loop.last %}, {% endif %} | 15 {%- if not loop.last %}, {% endif %} |
| 16 {%- endfor %} | 16 {%- endfor %} |
| 17 {%- endmacro %} | 17 {%- endmacro %} |
| 18 | 18 |
| 19 {%- macro declare_callback(method, for_blink) -%} | 19 {%- macro declare_callback(method, for_blink) -%} |
| 20 base::Callback<void( | 20 mojo::Callback<void( |
| 21 {%- for param in method.response_parameters -%} | 21 {%- for param in method.response_parameters -%} |
| 22 {#- TODO(yzshen): For historical reasons, we use mojo::String here (instead of | 22 {#- TODO(yzshen): For historical reasons, we use mojo::String here (instead of |
| 23 const mojo::String&) inconsistently. Preserve the behavior temporarily. #} | 23 const mojo::String&) inconsistently. Preserve the behavior temporarily. #} |
| 24 {%- if (not param.kind|is_string_kind) or for_blink -%} | 24 {%- if (not param.kind|is_string_kind) or for_blink -%} |
| 25 {{param.kind|cpp_wrapper_param_type}} | 25 {{param.kind|cpp_wrapper_param_type}} |
| 26 {%- else -%} | 26 {%- else -%} |
| 27 mojo::String | 27 mojo::String |
| 28 {%- endif %} | 28 {%- endif %} |
| 29 {%- if not loop.last %}, {% endif %} | 29 {%- if not loop.last %}, {% endif %} |
| 30 {%- endfor -%} | 30 {%- endfor -%} |
| (...skipping 11 matching lines...) Expand all Loading... |
| 42 {%- macro declare_sync_method_params(prefix, method) -%} | 42 {%- macro declare_sync_method_params(prefix, method) -%} |
| 43 {{declare_params(prefix, method.parameters)}} | 43 {{declare_params(prefix, method.parameters)}} |
| 44 {%- if method.response_parameters %} | 44 {%- if method.response_parameters %} |
| 45 {%- if method.parameters %}, {% endif %} | 45 {%- if method.parameters %}, {% endif %} |
| 46 {%- for param in method.response_parameters -%} | 46 {%- for param in method.response_parameters -%} |
| 47 {{param.kind|cpp_wrapper_type}}* {{prefix}}{{param.name}} | 47 {{param.kind|cpp_wrapper_type}}* {{prefix}}{{param.name}} |
| 48 {%- if not loop.last %}, {% endif %} | 48 {%- if not loop.last %}, {% endif %} |
| 49 {%- endfor %} | 49 {%- endfor %} |
| 50 {%- endif -%} | 50 {%- endif -%} |
| 51 {%- endmacro -%} | 51 {%- endmacro -%} |
| OLD | NEW |