| OLD | NEW |
| 1 {%- for method in interface.methods %} | 1 {%- for method in interface.methods %} |
| 2 const int _{{interface|name|lower_camel}}Method{{method|name|upper_camel}}Name =
{{method.ordinal}}; | 2 const int _{{interface|name|lower_camel}}Method{{method|name|upper_camel}}Name =
{{method.ordinal}}; |
| 3 {%- endfor %} | 3 {%- endfor %} |
| 4 | 4 |
| 5 {#--- Interface Enums #} | 5 {#--- Interface Enums #} |
| 6 {%- from "enum_definition.tmpl" import enum_def -%} | 6 {%- from "enum_definition.tmpl" import enum_def -%} |
| 7 {%- for enum in interface.enums %} | 7 {%- for enum in interface.enums %} |
| 8 {{ enum_def(enum, typepkg, package) }} | 8 {{ enum_def(enum, typepkg, package) }} |
| 9 {%- endfor %} | 9 {%- endfor %} |
| 10 | 10 |
| 11 class _{{interface|name}}ServiceDescription implements {{descpkg}}ServiceDescrip
tion { | 11 class _{{interface|name}}ServiceDescription implements {{descpkg}}ServiceDescrip
tion { |
| 12 {%- if should_gen_mojom_types and interface.service_name %} | 12 {%- if should_gen_mojom_types and interface.service_name %} |
| 13 dynamic getTopLevelInterface([Function responseFactory]){ | 13 dynamic getTopLevelInterface([Function responseFactory]){ |
| 14 var interfaceTypeKey = getRuntimeTypeInfo().servicesByName["{{interface.serv
ice_name}}"].topLevelInterface; | 14 var interfaceTypeKey = getRuntimeTypeInfo().services["{{interface.service_na
me}}"]; |
| 15 var userDefinedType = getAllMojomTypeDefinitions()[interfaceTypeKey]; | 15 var userDefinedType = getAllMojomTypeDefinitions()[interfaceTypeKey]; |
| 16 return responseFactory(userDefinedType.interfaceType); | 16 return responseFactory(userDefinedType.interfaceType); |
| 17 } | 17 } |
| 18 | 18 |
| 19 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 19 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
| 20 responseFactory(getAllMojomTypeDefinitions()[typeKey]); | 20 responseFactory(getAllMojomTypeDefinitions()[typeKey]); |
| 21 | 21 |
| 22 dynamic getAllTypeDefinitions([Function responseFactory]) => | 22 dynamic getAllTypeDefinitions([Function responseFactory]) => |
| 23 responseFactory(getAllMojomTypeDefinitions()); | 23 responseFactory(getAllMojomTypeDefinitions()); |
| 24 {%- else %} | 24 {%- else %} |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 int get version => {{interface.version}}; | 334 int get version => {{interface.version}}; |
| 335 | 335 |
| 336 static {{descpkg}}ServiceDescription _cachedServiceDescription; | 336 static {{descpkg}}ServiceDescription _cachedServiceDescription; |
| 337 static {{descpkg}}ServiceDescription get serviceDescription { | 337 static {{descpkg}}ServiceDescription get serviceDescription { |
| 338 if (_cachedServiceDescription == null) { | 338 if (_cachedServiceDescription == null) { |
| 339 _cachedServiceDescription = new _{{interface|name}}ServiceDescription(); | 339 _cachedServiceDescription = new _{{interface|name}}ServiceDescription(); |
| 340 } | 340 } |
| 341 return _cachedServiceDescription; | 341 return _cachedServiceDescription; |
| 342 } | 342 } |
| 343 } | 343 } |
| OLD | NEW |