| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 {%- if not use_response_flag -%} | 44 {%- if not use_response_flag -%} |
| 45 org.chromium.mojo.bindings.MessageHeader.NO_FLAG | 45 org.chromium.mojo.bindings.MessageHeader.NO_FLAG |
| 46 {%- elif is_request: -%} | 46 {%- elif is_request: -%} |
| 47 org.chromium.mojo.bindings.MessageHeader.MESSAGE_EXPECTS_RESPONSE_FLAG | 47 org.chromium.mojo.bindings.MessageHeader.MESSAGE_EXPECTS_RESPONSE_FLAG |
| 48 {%- else -%} | 48 {%- else -%} |
| 49 org.chromium.mojo.bindings.MessageHeader.MESSAGE_IS_RESPONSE_FLAG | 49 org.chromium.mojo.bindings.MessageHeader.MESSAGE_IS_RESPONSE_FLAG |
| 50 {%- endif -%} | 50 {%- endif -%} |
| 51 {%- endmacro -%} | 51 {%- endmacro -%} |
| 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 %}{% if in
terface.service_name %}Named{% endif %}Manager<{{interface|name}}, {{interface|n
ame}}.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 {% if interface.service_name %} |
| 60 | 61 |
| 61 public String getName() { | 62 public String getName() { |
| 62 return "{{namespace|replace(".","::")}}::{{interface.name}}"; | 63 return "{{interface.service_name}}"; |
| 63 } | 64 } |
| 65 {% endif %} |
| 64 | 66 |
| 65 public int getVersion() { | 67 public int getVersion() { |
| 66 return {{interface.version}}; | 68 return {{interface.version}}; |
| 67 } | 69 } |
| 68 | 70 |
| 69 public Proxy buildProxy(org.chromium.mojo.system.Core core, | 71 public Proxy buildProxy(org.chromium.mojo.system.Core core, |
| 70 org.chromium.mojo.bindings.MessageReceiverWithRespon
der messageReceiver) { | 72 org.chromium.mojo.bindings.MessageReceiverWithRespon
der messageReceiver) { |
| 71 return new Proxy(core, messageReceiver); | 73 return new Proxy(core, messageReceiver); |
| 72 } | 74 } |
| 73 | 75 |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 {{flags_for_method(method, False)}}, | 280 {{flags_for_method(method, False)}}, |
| 279 mRequestId)); | 281 mRequestId)); |
| 280 mMessageReceiver.accept(_message); | 282 mMessageReceiver.accept(_message); |
| 281 } | 283 } |
| 282 } | 284 } |
| 283 {% endif %} | 285 {% endif %} |
| 284 {% endfor %} | 286 {% endfor %} |
| 285 | 287 |
| 286 } | 288 } |
| 287 {% endmacro %} | 289 {% endmacro %} |
| OLD | NEW |