| 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 634e03855ffea086871ee682c035e4d29f221389..21aa4126d9207f0b44ad61387bfeb58f5b6b08d1 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
|
| @@ -5,11 +5,13 @@
|
| library sample_import2_mojom;
|
|
|
| import 'dart:async';
|
| +import 'dart:collection';
|
|
|
| import 'package:mojo/bindings.dart' as bindings;
|
| import 'package:mojo/core.dart' as core;
|
| -import 'package:_mojo_for_test_only/imported/sample_import.mojom.dart' as sample_import_mojom;
|
| +import 'package:mojo/mojo/bindings/types/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 Color red = const Color._(0);
|
| static const Color black = const Color._(1);
|
| @@ -54,12 +56,28 @@ class Color extends bindings.MojoEnum {
|
| return 'Color.red';
|
| case black:
|
| return 'Color.black';
|
| + default:
|
| + return null;
|
| }
|
| }
|
|
|
| int toJson() => mojoEnumValue;
|
| }
|
|
|
| +mojom_types.MojomEnum _sample_import2_Color__() {
|
| + return new mojom_types.MojomEnum()
|
| + ..declData = (new mojom_types.DeclarationData()
|
| + ..shortName = 'Color'
|
| + ..fullIdentifier = 'imported.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 +154,21 @@ class Size extends bindings.Struct {
|
| return map;
|
| }
|
| }
|
| +mojom_types.MojomStruct _sample_import2_Size__() {
|
| + return new mojom_types.MojomStruct()
|
| + ..declData = (new mojom_types.DeclarationData()
|
| + ..shortName = 'Size'
|
| + ..fullIdentifier = 'imported.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 {
|
| @@ -240,5 +273,80 @@ class Thing extends bindings.Struct {
|
| return map;
|
| }
|
| }
|
| +mojom_types.MojomStruct _sample_import2_Thing__() {
|
| + return new mojom_types.MojomStruct()
|
| + ..declData = (new mojom_types.DeclarationData()
|
| + ..shortName = 'Thing'
|
| + ..fullIdentifier = 'imported.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__'
|
| + )),
|
| + ];
|
| +}
|
|
|
|
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +Map<String, mojom_types.UserDefinedType> _initDescriptions() {
|
| + var map = new HashMap<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;
|
| +}
|
| +
|
| +var _MojomDesc;
|
| +Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() {
|
| + if (_MojomDesc == null) {
|
| + _MojomDesc = _initDescriptions();
|
| + }
|
| + return _MojomDesc;
|
| +}
|
| +
|
|
|