| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 {%- macro accept_body(interface, with_response) -%} | 84 {%- macro accept_body(interface, with_response) -%} |
| 85 try { | 85 try { |
| 86 org.chromium.mojo.bindings.ServiceMessage messageWithHeader = | 86 org.chromium.mojo.bindings.ServiceMessage messageWithHeader = |
| 87 message.asServiceMessage(); | 87 message.asServiceMessage(); |
| 88 org.chromium.mojo.bindings.MessageHeader header = messageWithHeader.getHeade
r(); | 88 org.chromium.mojo.bindings.MessageHeader header = messageWithHeader.getHeade
r(); |
| 89 if (!header.validateHeader({{flags(with_response, True)}})) { | 89 if (!header.validateHeader({{flags(with_response, True)}})) { |
| 90 return false; | 90 return false; |
| 91 } | 91 } |
| 92 switch(header.getType()) { | 92 switch(header.getType()) { |
| 93 {% if with_response %} | 93 {% if with_response %} |
| 94 case org.chromium.mojo.bindings.InterfaceControlMessagesConstants.RUN_ME
SSAGE_ID: | 94 case org.chromium.mojo.bindings.interfacecontrol.InterfaceControlMessage
sConstants.RUN_MESSAGE_ID: |
| 95 return org.chromium.mojo.bindings.InterfaceControlMessagesHelper.han
dleRun( | 95 return org.chromium.mojo.bindings.InterfaceControlMessagesHelper.han
dleRun( |
| 96 getCore(), {{interface|name}}_Internal.MANAGER, messageWithH
eader, receiver); | 96 getCore(), {{interface|name}}_Internal.MANAGER, messageWithH
eader, receiver); |
| 97 {% else %} | 97 {% else %} |
| 98 case org.chromium.mojo.bindings.InterfaceControlMessagesConstants.RUN_OR
_CLOSE_PIPE_MESSAGE_ID: | 98 case org.chromium.mojo.bindings.interfacecontrol.InterfaceControlMessage
sConstants.RUN_OR_CLOSE_PIPE_MESSAGE_ID: |
| 99 return org.chromium.mojo.bindings.InterfaceControlMessagesHelper.han
dleRunOrClosePipe( | 99 return org.chromium.mojo.bindings.InterfaceControlMessagesHelper.han
dleRunOrClosePipe( |
| 100 {{interface|name}}_Internal.MANAGER, messageWithHeader); | 100 {{interface|name}}_Internal.MANAGER, messageWithHeader); |
| 101 {% endif %} | 101 {% endif %} |
| 102 {% for method in interface.methods %} | 102 {% for method in interface.methods %} |
| 103 {% if (with_response and method.response_parameters != None) or | 103 {% if (with_response and method.response_parameters != None) or |
| 104 (not with_response and method.response_parameters == None) %} | 104 (not with_response and method.response_parameters == None) %} |
| 105 {% set request_struct = method.param_struct %} | 105 {% set request_struct = method.param_struct %} |
| 106 {% if with_response %} | 106 {% if with_response %} |
| 107 {% set response_struct = method.response_param_struct %} | 107 {% set response_struct = method.response_param_struct %} |
| 108 {% endif %} | 108 {% endif %} |
| (...skipping 169 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 |