| Index: mojo/public/tools/bindings/generators/mojom_cpp_generator.py
|
| diff --git a/mojo/public/tools/bindings/generators/mojom_cpp_generator.py b/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
|
| index 03c9b6c97ba807c2c8dab357295ec8e477ebc51d..34bba30e69be34948f5bd666dc76fbfc94388e61 100644
|
| --- a/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
|
| +++ b/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
|
| @@ -283,9 +283,6 @@ def ShouldInlineStruct(struct):
|
| return False
|
| return True
|
|
|
| -def ShouldInlineUnion(union):
|
| - return not all(not mojom.IsMoveOnlyKind(field.kind) for field in union.fields)
|
| -
|
| def GetArrayValidateParams(kind):
|
| if (not mojom.IsArrayKind(kind) and not mojom.IsMapKind(kind) and
|
| not mojom.IsStringKind(kind)):
|
| @@ -337,7 +334,6 @@ class Generator(generator.Generator):
|
| "get_pad": pack.GetPad,
|
| "has_callbacks": mojom.HasCallbacks,
|
| "should_inline": ShouldInlineStruct,
|
| - "should_inline_union": ShouldInlineUnion,
|
| "is_array_kind": mojom.IsArrayKind,
|
| "is_cloneable_kind": mojom.IsCloneableKind,
|
| "is_enum_kind": mojom.IsEnumKind,
|
| @@ -351,13 +347,11 @@ class Generator(generator.Generator):
|
| "is_string_kind": mojom.IsStringKind,
|
| "is_struct_kind": mojom.IsStructKind,
|
| "is_struct_with_handles": IsStructWithHandles,
|
| - "is_union_kind": mojom.IsUnionKind,
|
| "struct_size": lambda ps: ps.GetTotalSize() + _HEADER_SIZE,
|
| "struct_from_method": generator.GetStructFromMethod,
|
| "response_struct_from_method": generator.GetResponseStructFromMethod,
|
| "stylize_method": generator.StudlyCapsToCamel,
|
| "to_all_caps": generator.CamelCaseToAllCaps,
|
| - "under_to_camel": generator.UnderToCamel,
|
| }
|
|
|
| def GetJinjaExports(self):
|
| @@ -369,7 +363,6 @@ class Generator(generator.Generator):
|
| "kinds": self.module.kinds,
|
| "enums": self.module.enums,
|
| "structs": self.GetStructs(),
|
| - "unions": self.module.unions,
|
| "interfaces": self.module.interfaces,
|
| }
|
|
|
|
|