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

Unified Diff: mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_included_unions.mojom.dart

Issue 1539673003: Generate Mojom Types in Dart (Take 2) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Merge with master Created 4 years, 11 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/dart/packages/_mojo_for_test_only/lib/mojo/test/test_included_unions.mojom.dart
diff --git a/mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_included_unions.mojom.dart b/mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_included_unions.mojom.dart
index 71cb13463c40ae24bf4b061967904e8839c68fcc..35e0e76e30e1e38b30617366c32949786c7e7f1d 100644
--- a/mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_included_unions.mojom.dart
+++ b/mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_included_unions.mojom.dart
@@ -5,9 +5,12 @@
library test_included_unions_mojom;
import 'dart:async';
+import 'dart:collection';
import 'package:mojo/bindings.dart' as bindings;
import 'package:mojo/core.dart' as core;
+import 'package:mojo/mojo/bindings/types/mojom_types.mojom.dart' as mojom_types;
+
@@ -91,3 +94,34 @@ class IncludedUnion extends bindings.Union {
}
}
+mojom_types.MojomUnion _testIncludedUnionsIncludedUnion() {
+ return new mojom_types.MojomUnion()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'IncludedUnion'
+ ..fullIdentifier = 'mojo.test.IncludedUnion')
+ ..fields = <mojom_types.UnionField>[
+ new mojom_types.UnionField()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'A')
+ ..type = (new mojom_types.Type()
+ ..simpleType = mojom_types.SimpleType.int8)
+ ..tag = 0,];
+}
+
+
+Map<String, mojom_types.UserDefinedType> _initDescriptions() {
+ var map = new HashMap<String, mojom_types.UserDefinedType>();
+ map["test_included_unions_IncludedUnion__"] =
+ new mojom_types.UserDefinedType()
+ ..unionType = _testIncludedUnionsIncludedUnion();
+ return map;
+}
+
+var _mojomDesc;
+Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() {
+ if (_mojomDesc == null) {
+ _mojomDesc = _initDescriptions();
+ }
+ return _mojomDesc;
+}
+

Powered by Google App Engine
This is Rietveld 408576698