Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1290)

Unified Diff: mojo/public/tools/bindings/generators/mojom_cpp_generator.py

Issue 2863353002: Mojo code generator: change where to add computed data to mojom definitions (Closed)
Patch Set: . Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 d2930d1116f5a73a17582b924ea1f71e8653fcdc..7b55afc9b549f743c21dc4a9cbc9e1b7bb76ae80 100644
--- a/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
+++ b/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
@@ -278,12 +278,10 @@ class Generator(generator.Generator):
yield param.kind
def _GetJinjaExports(self):
- structs = self.GetStructs()
- interfaces = self.GetInterfaces()
all_enums = list(self.module.enums)
- for struct in structs:
+ for struct in self.module.structs:
all_enums.extend(struct.enums)
- for interface in interfaces:
+ for interface in self.module.interfaces:
all_enums.extend(interface.enums)
return {
@@ -294,9 +292,9 @@ class Generator(generator.Generator):
"kinds": self.module.kinds,
"enums": self.module.enums,
"all_enums": all_enums,
- "structs": structs,
- "unions": self.GetUnions(),
- "interfaces": interfaces,
+ "structs": self.module.structs,
+ "unions": self.module.unions,
+ "interfaces": self.module.interfaces,
"variant": self.variant,
"extra_traits_headers": self._GetExtraTraitsHeaders(),
"extra_public_headers": self._GetExtraPublicHeaders(),
@@ -356,7 +354,7 @@ class Generator(generator.Generator):
"is_union_kind": mojom.IsUnionKind,
"passes_associated_kinds": mojom.PassesAssociatedKinds,
"struct_constructors": self._GetStructConstructors,
- "under_to_camel": generator.UnderToCamel,
+ "under_to_camel": generator.ToCamel,
"unmapped_type_for_serializer": self._GetUnmappedTypeForSerializer,
"wtf_hash_fn_name_for_enum": GetWtfHashFnNameForEnum,
}

Powered by Google App Engine
This is Rietveld 408576698