| OLD | NEW | 
|---|
|  | (Empty) | 
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |  | 
| 2 // Use of this source code is governed by a BSD-style license that can be |  | 
| 3 // found in the LICENSE file. |  | 
| 4 |  | 
| 5 {%- macro registerType(mapping, typepkg, pkg, type) -%} |  | 
| 6 {%- if type|is_enum_kind -%} |  | 
| 7   {{mapping}}["{{type|mojom_type_identifier}}"] = |  | 
| 8     new {{typepkg}}UserDefinedType() |  | 
| 9       ..enumType = _{{type|mojom_type_identifier|lower_camel}}(); |  | 
| 10 {%- elif type|is_struct_kind -%} |  | 
| 11   {{mapping}}["{{type|mojom_type_identifier}}"] = |  | 
| 12     new {{typepkg}}UserDefinedType() |  | 
| 13       ..structType = _{{type|mojom_type_identifier|lower_camel}}(); |  | 
| 14   {%- for enum in type.enums %} |  | 
| 15     {{ registerType(mapping, typepkg, pkg, enum) }} |  | 
| 16   {%-  endfor %} |  | 
| 17 {%- elif type|is_union_kind -%} |  | 
| 18   {{mapping}}["{{type|mojom_type_identifier}}"] = |  | 
| 19     new {{typepkg}}UserDefinedType() |  | 
| 20       ..unionType = _{{type|mojom_type_identifier|lower_camel}}(); |  | 
| 21 {%- elif type|is_interface_kind -%} |  | 
| 22   {{mapping}}["{{type|mojom_type_identifier}}"] = |  | 
| 23     new {{typepkg}}UserDefinedType() |  | 
| 24       ..interfaceType = _{{type|mojom_type_identifier|lower_camel}}(); |  | 
| 25   {%- for enum in type.enums %} |  | 
| 26     {{ registerType(mapping, typepkg, pkg, enum) }} |  | 
| 27   {%-  endfor %} |  | 
| 28 {%- else -%} |  | 
| 29   {# Simple kinds, arrays, maps, and handles do not need to be registered. #} |  | 
| 30 {%- endif -%} |  | 
| 31 {%- endmacro -%} |  | 
| OLD | NEW | 
|---|