| Index: mojo/dart/packages/_mojo_for_test_only/lib/imported/sample_import2.mojom.dart
|
| diff --git a/mojo/dart/packages/_mojo_for_test_only/lib/imported/sample_import2.mojom.dart b/mojo/dart/packages/_mojo_for_test_only/lib/imported/sample_import2.mojom.dart
|
| index 459be6688ed513dcd3ba9c7e40726dff4249eed8..278442febd7bc10b802d8547625790e7465c3685 100644
|
| --- a/mojo/dart/packages/_mojo_for_test_only/lib/imported/sample_import2.mojom.dart
|
| +++ b/mojo/dart/packages/_mojo_for_test_only/lib/imported/sample_import2.mojom.dart
|
| @@ -8,6 +8,8 @@ import 'dart:async';
|
|
|
| import 'package:mojo/bindings.dart' as bindings;
|
| import 'package:mojo/core.dart' as core;
|
| +import 'package:mojo/mojo/mojom_types.mojom.dart' as mojom_types;
|
| +
|
| import 'package:_mojo_for_test_only/imported/sample_import.mojom.dart' as sample_import_mojom;
|
| class Color extends bindings.MojoEnum {
|
| static const RED = const Color._(0);
|
| @@ -53,12 +55,26 @@ class Color extends bindings.MojoEnum {
|
| return 'Color.RED';
|
| case BLACK:
|
| return 'Color.BLACK';
|
| + default:
|
| + return null;
|
| }
|
| }
|
|
|
| int toJson() => value;
|
| }
|
|
|
| +mojom_types.MojomEnum _sample_import2_Color__() {
|
| + return new mojom_types.MojomEnum()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = "Color")
|
| + ..values = <mojom_types.EnumValue>[new mojom_types.EnumValue()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = "RED")
|
| + ..enumTypeKey = '_sample_import2_Color__'
|
| + ..intValue = 0,new mojom_types.EnumValue()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = "BLACK")
|
| + ..enumTypeKey = '_sample_import2_Color__'
|
| + ..intValue = 1,];
|
| +}
|
| +
|
|
|
|
|
| class Size extends bindings.Struct {
|
| @@ -136,6 +152,20 @@ class Size extends bindings.Struct {
|
| }
|
| }
|
|
|
| +mojom_types.MojomStruct _sample_import2_Size__() {
|
| + return new mojom_types.MojomStruct()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = 'Size')
|
| + ..fields = <mojom_types.StructField>[
|
| + 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),
|
| + ];
|
| +}
|
| +
|
|
|
| class Thing extends bindings.Struct {
|
| static const List<bindings.StructDataHeader> kVersions = const [
|
| @@ -240,4 +270,97 @@ class Thing extends bindings.Struct {
|
| }
|
| }
|
|
|
| +mojom_types.MojomStruct _sample_import2_Thing__() {
|
| + return new mojom_types.MojomStruct()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = 'Thing')
|
| + ..fields = <mojom_types.StructField>[
|
| + new mojom_types.StructField()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = 'Shape')
|
| + ..type = (new mojom_types.Type()
|
| + ..typeReference = (new mojom_types.TypeReference()
|
| +
|
| + ..identifier = '_sample_import_Shape__'
|
| + ..typeKey = '_sample_import_Shape__'
|
| + )),
|
| +
|
| + new mojom_types.StructField()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = 'Color')
|
| + ..type = (new mojom_types.Type()
|
| + ..typeReference = (new mojom_types.TypeReference()
|
| +
|
| + ..identifier = '_sample_import2_Color__'
|
| + ..typeKey = '_sample_import2_Color__'
|
| + )),
|
| +
|
| + new mojom_types.StructField()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = 'Location')
|
| + ..type = (new mojom_types.Type()
|
| + ..typeReference = (new mojom_types.TypeReference()
|
| +
|
| + ..identifier = '_sample_import_Point__'
|
| + ..typeKey = '_sample_import_Point__'
|
| + )),
|
| +
|
| + new mojom_types.StructField()
|
| + ..declData = (new mojom_types.DeclarationData()..shortName = 'Size')
|
| + ..type = (new mojom_types.Type()
|
| + ..typeReference = (new mojom_types.TypeReference()
|
| +
|
| + ..identifier = '_sample_import2_Size__'
|
| + ..typeKey = '_sample_import2_Size__'
|
| + )),
|
| + ];
|
| +}
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +var _MojomDesc__ = _initDescriptions();
|
| +
|
| +Map<String, mojom_types.UserDefinedType> _initDescriptions() {
|
| + var map = new Map<String, mojom_types.UserDefinedType>();
|
| +
|
| + map["_sample_import2_Color__"] =
|
| + new mojom_types.UserDefinedType()
|
| + ..enumType = _sample_import2_Color__();
|
| +
|
| +
|
| + map["_sample_import2_Size__"] =
|
| + new mojom_types.UserDefinedType()
|
| + ..structType = _sample_import2_Size__();
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| + map["_sample_import2_Thing__"] =
|
| + new mojom_types.UserDefinedType()
|
| + ..structType = _sample_import2_Thing__();
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +sample_import_mojom.getAllMojomTypeDefinitions().forEach((String s, mojom_types.UserDefinedType udt) {
|
| + map[s] = udt;
|
| +});
|
| + return map;
|
| +}
|
| +
|
| +Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() {
|
| + return _MojomDesc__;
|
| +}
|
| +
|
|
|
|
|