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

Unified Diff: mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/rect.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/rect.mojom.dart
diff --git a/mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/rect.mojom.dart b/mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/rect.mojom.dart
index b9688b9a14af518d53a9ccf9da4bb68bbfa25a5e..259fc40c3d64a855396b78b5b6d85901b99c2eb3 100644
--- a/mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/rect.mojom.dart
+++ b/mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/rect.mojom.dart
@@ -5,9 +5,12 @@
library rect_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;
+
@@ -104,4 +107,49 @@ class Rect extends bindings.Struct {
}
}
+mojom_types.MojomStruct _rectRect() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'Rect'
+ ..fullIdentifier = 'mojo.test.Rect')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'X')
+ ..type = (new mojom_types.Type()
+ ..simpleType = mojom_types.SimpleType.int32),
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'Y')
+ ..type = (new mojom_types.Type()
+ ..simpleType = mojom_types.SimpleType.int32),
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'Width')
+ ..type = (new mojom_types.Type()
+ ..simpleType = mojom_types.SimpleType.int32),
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'Height')
+ ..type = (new mojom_types.Type()
+ ..simpleType = mojom_types.SimpleType.int32),];
+}
+
+
+
+Map<String, mojom_types.UserDefinedType> _initDescriptions() {
+ var map = new HashMap<String, mojom_types.UserDefinedType>();
+ map["rect_Rect__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _rectRect();
+ 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