| OLD | NEW |
| 1 {% from "constant_definition.tmpl" import constant_def %} | 1 {% from "constant_definition.tmpl" import constant_def %} |
| 2 {% from "enum_definition.tmpl" import enum_def %} | 2 {% from "enum_definition.tmpl" import enum_def %} |
| 3 {% from "data_types_definition.tmpl" import struct_def %} | 3 {% from "data_types_definition.tmpl" import struct_def %} |
| 4 | 4 |
| 5 {%- macro declare_params(parameters, boxed=false) %} | 5 {%- macro declare_params(parameters, boxed=false) %} |
| 6 {%- for param in parameters -%} | 6 {%- for param in parameters -%} |
| 7 {{param.kind|java_type(boxed)}} {{param|name}} | 7 {{param.kind|java_type(boxed)}} {{param|name}} |
| 8 {%- if not loop.last %}, {% endif %} | 8 {%- if not loop.last %}, {% endif %} |
| 9 {%- endfor %} | 9 {%- endfor %} |
| 10 {%- endmacro %} | 10 {%- endmacro %} |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 {%- macro manager_class(interface, fully_qualified=False) -%} | 53 {%- macro manager_class(interface, fully_qualified=False) -%} |
| 54 {% if fully_qualified %}org.chromium.mojo.bindings.Interface.{% endif %}Manager<
{{interface|name}}, {{interface|name}}.Proxy> | 54 {% if fully_qualified %}org.chromium.mojo.bindings.Interface.{% endif %}Manager<
{{interface|name}}, {{interface|name}}.Proxy> |
| 55 {%- endmacro -%} | 55 {%- endmacro -%} |
| 56 | 56 |
| 57 {%- macro manager_def(interface) -%} | 57 {%- macro manager_def(interface) -%} |
| 58 public static final {{manager_class(interface, True)}} MANAGER = | 58 public static final {{manager_class(interface, True)}} MANAGER = |
| 59 new {{manager_class(interface, True)}}() { | 59 new {{manager_class(interface, True)}}() { |
| 60 | 60 |
| 61 public String getName() { | 61 public String getName() { |
| 62 return "{{namespace}}.{{interface.name}}"; | 62 return "{{namespace|replace(".","::")}}::{{interface.name}}"; |
| 63 } | 63 } |
| 64 | 64 |
| 65 public int getVersion() { | 65 public int getVersion() { |
| 66 return {{interface.version}}; | 66 return {{interface.version}}; |
| 67 } | 67 } |
| 68 | 68 |
| 69 public Proxy buildProxy(org.chromium.mojo.system.Core core, | 69 public Proxy buildProxy(org.chromium.mojo.system.Core core, |
| 70 org.chromium.mojo.bindings.MessageReceiverWithRespon
der messageReceiver) { | 70 org.chromium.mojo.bindings.MessageReceiverWithRespon
der messageReceiver) { |
| 71 return new Proxy(core, messageReceiver); | 71 return new Proxy(core, messageReceiver); |
| 72 } | 72 } |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 {{flags_for_method(method, False)}}, | 278 {{flags_for_method(method, False)}}, |
| 279 mRequestId)); | 279 mRequestId)); |
| 280 mMessageReceiver.accept(_message); | 280 mMessageReceiver.accept(_message); |
| 281 } | 281 } |
| 282 } | 282 } |
| 283 {% endif %} | 283 {% endif %} |
| 284 {% endfor %} | 284 {% endfor %} |
| 285 | 285 |
| 286 } | 286 } |
| 287 {% endmacro %} | 287 {% endmacro %} |
| OLD | NEW |