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

Unified Diff: mojo/dart/packages/mojo/lib/mojo/mojom_types.mojom.dart

Issue 1433183002: Generate Mojom Types for Dart (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Simplify identifier_store for Go and Dart Created 5 years, 1 month 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/lib/mojo/mojom_types.mojom.dart
diff --git a/mojo/dart/packages/mojo/lib/mojo/mojom_types.mojom.dart b/mojo/dart/packages/mojo/lib/mojo/mojom_types.mojom.dart
new file mode 100644
index 0000000000000000000000000000000000000000..307d0dd860a54471b9093b539d594c6c019b3812
--- /dev/null
+++ b/mojo/dart/packages/mojo/lib/mojo/mojom_types.mojom.dart
@@ -0,0 +1,4667 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+library mojom_types_mojom;
+
+import 'dart:async';
+
+import 'package:mojo/bindings.dart' as bindings;
+import 'package:mojo/core.dart' as core;
+
+
+class SimpleType extends bindings.MojoEnum {
+ static const BOOL = const SimpleType._(0);
+ static const DOUBLE = const SimpleType._(1);
+ static const FLOAT = const SimpleType._(2);
+ static const INT8 = const SimpleType._(3);
+ static const INT16 = const SimpleType._(4);
+ static const INT32 = const SimpleType._(5);
+ static const INT64 = const SimpleType._(6);
+ static const UINT8 = const SimpleType._(7);
+ static const UINT16 = const SimpleType._(8);
+ static const UINT32 = const SimpleType._(9);
+ static const UINT64 = const SimpleType._(10);
+
+ const SimpleType._(int v) : super(v);
+
+ static const Map<String, SimpleType> valuesMap = const {
+ "BOOL": BOOL,
+ "DOUBLE": DOUBLE,
+ "FLOAT": FLOAT,
+ "INT8": INT8,
+ "INT16": INT16,
+ "INT32": INT32,
+ "INT64": INT64,
+ "UINT8": UINT8,
+ "UINT16": UINT16,
+ "UINT32": UINT32,
+ "UINT64": UINT64,
+ };
+ static const List<SimpleType> values = const [
+ BOOL,
+ DOUBLE,
+ FLOAT,
+ INT8,
+ INT16,
+ INT32,
+ INT64,
+ UINT8,
+ UINT16,
+ UINT32,
+ UINT64,
+ ];
+
+ static SimpleType valueOf(String name) => valuesMap[name];
+
+ factory SimpleType(int v) {
+ switch (v) {
+ case 0:
+ return BOOL;
+ case 1:
+ return DOUBLE;
+ case 2:
+ return FLOAT;
+ case 3:
+ return INT8;
+ case 4:
+ return INT16;
+ case 5:
+ return INT32;
+ case 6:
+ return INT64;
+ case 7:
+ return UINT8;
+ case 8:
+ return UINT16;
+ case 9:
+ return UINT32;
+ case 10:
+ return UINT64;
+ default:
+ return null;
+ }
+ }
+
+ static SimpleType decode(bindings.Decoder decoder0, int offset) {
+ int v = decoder0.decodeUint32(offset);
+ SimpleType result = new SimpleType(v);
+ if (result == null) {
+ throw new bindings.MojoCodecError(
+ 'Bad value $v for enum SimpleType.');
+ }
+ return result;
+ }
+
+ String toString() {
+ switch(this) {
+ case BOOL:
+ return 'SimpleType.BOOL';
+ case DOUBLE:
+ return 'SimpleType.DOUBLE';
+ case FLOAT:
+ return 'SimpleType.FLOAT';
+ case INT8:
+ return 'SimpleType.INT8';
+ case INT16:
+ return 'SimpleType.INT16';
+ case INT32:
+ return 'SimpleType.INT32';
+ case INT64:
+ return 'SimpleType.INT64';
+ case UINT8:
+ return 'SimpleType.UINT8';
+ case UINT16:
+ return 'SimpleType.UINT16';
+ case UINT32:
+ return 'SimpleType.UINT32';
+ case UINT64:
+ return 'SimpleType.UINT64';
+ default:
+ return null;
+ }
+ }
+
+ int toJson() => value;
+}
+
+MojomEnum _mojom_types_SimpleType__() {
+ return new MojomEnum()
+ ..declData = (new DeclarationData()..shortName = "SimpleType")
+ ..values = <EnumValue>[new EnumValue()
+ ..declData = (new DeclarationData()..shortName = "BOOL")
+ ..enumTypeKey = '_mojom_types_SimpleType__'
+ ..intValue = 0,new EnumValue()
+ ..declData = (new DeclarationData()..shortName = "DOUBLE")
+ ..enumTypeKey = '_mojom_types_SimpleType__'
+ ..intValue = 1,new EnumValue()
+ ..declData = (new DeclarationData()..shortName = "FLOAT")
+ ..enumTypeKey = '_mojom_types_SimpleType__'
+ ..intValue = 2,new EnumValue()
+ ..declData = (new DeclarationData()..shortName = "IN_T8")
+ ..enumTypeKey = '_mojom_types_SimpleType__'
+ ..intValue = 3,new EnumValue()
+ ..declData = (new DeclarationData()..shortName = "IN_T16")
+ ..enumTypeKey = '_mojom_types_SimpleType__'
+ ..intValue = 4,new EnumValue()
+ ..declData = (new DeclarationData()..shortName = "IN_T32")
+ ..enumTypeKey = '_mojom_types_SimpleType__'
+ ..intValue = 5,new EnumValue()
+ ..declData = (new DeclarationData()..shortName = "IN_T64")
+ ..enumTypeKey = '_mojom_types_SimpleType__'
+ ..intValue = 6,new EnumValue()
+ ..declData = (new DeclarationData()..shortName = "UIN_T8")
+ ..enumTypeKey = '_mojom_types_SimpleType__'
+ ..intValue = 7,new EnumValue()
+ ..declData = (new DeclarationData()..shortName = "UIN_T16")
+ ..enumTypeKey = '_mojom_types_SimpleType__'
+ ..intValue = 8,new EnumValue()
+ ..declData = (new DeclarationData()..shortName = "UIN_T32")
+ ..enumTypeKey = '_mojom_types_SimpleType__'
+ ..intValue = 9,new EnumValue()
+ ..declData = (new DeclarationData()..shortName = "UIN_T64")
+ ..enumTypeKey = '_mojom_types_SimpleType__'
+ ..intValue = 10,];
+}
+class BuiltinConstantValue extends bindings.MojoEnum {
+ static const DOUBLE_INFINITY = const BuiltinConstantValue._(0);
+ static const DOUBLE_NEGATIVE_INFINITY = const BuiltinConstantValue._(1);
+ static const DOUBLE_NAN = const BuiltinConstantValue._(2);
+ static const FLOAT_INFINITY = const BuiltinConstantValue._(3);
+ static const FLOAT_NEGATIVE_INFINITY = const BuiltinConstantValue._(4);
+ static const FLOAT_NAN = const BuiltinConstantValue._(5);
+
+ const BuiltinConstantValue._(int v) : super(v);
+
+ static const Map<String, BuiltinConstantValue> valuesMap = const {
+ "DOUBLE_INFINITY": DOUBLE_INFINITY,
+ "DOUBLE_NEGATIVE_INFINITY": DOUBLE_NEGATIVE_INFINITY,
+ "DOUBLE_NAN": DOUBLE_NAN,
+ "FLOAT_INFINITY": FLOAT_INFINITY,
+ "FLOAT_NEGATIVE_INFINITY": FLOAT_NEGATIVE_INFINITY,
+ "FLOAT_NAN": FLOAT_NAN,
+ };
+ static const List<BuiltinConstantValue> values = const [
+ DOUBLE_INFINITY,
+ DOUBLE_NEGATIVE_INFINITY,
+ DOUBLE_NAN,
+ FLOAT_INFINITY,
+ FLOAT_NEGATIVE_INFINITY,
+ FLOAT_NAN,
+ ];
+
+ static BuiltinConstantValue valueOf(String name) => valuesMap[name];
+
+ factory BuiltinConstantValue(int v) {
+ switch (v) {
+ case 0:
+ return DOUBLE_INFINITY;
+ case 1:
+ return DOUBLE_NEGATIVE_INFINITY;
+ case 2:
+ return DOUBLE_NAN;
+ case 3:
+ return FLOAT_INFINITY;
+ case 4:
+ return FLOAT_NEGATIVE_INFINITY;
+ case 5:
+ return FLOAT_NAN;
+ default:
+ return null;
+ }
+ }
+
+ static BuiltinConstantValue decode(bindings.Decoder decoder0, int offset) {
+ int v = decoder0.decodeUint32(offset);
+ BuiltinConstantValue result = new BuiltinConstantValue(v);
+ if (result == null) {
+ throw new bindings.MojoCodecError(
+ 'Bad value $v for enum BuiltinConstantValue.');
+ }
+ return result;
+ }
+
+ String toString() {
+ switch(this) {
+ case DOUBLE_INFINITY:
+ return 'BuiltinConstantValue.DOUBLE_INFINITY';
+ case DOUBLE_NEGATIVE_INFINITY:
+ return 'BuiltinConstantValue.DOUBLE_NEGATIVE_INFINITY';
+ case DOUBLE_NAN:
+ return 'BuiltinConstantValue.DOUBLE_NAN';
+ case FLOAT_INFINITY:
+ return 'BuiltinConstantValue.FLOAT_INFINITY';
+ case FLOAT_NEGATIVE_INFINITY:
+ return 'BuiltinConstantValue.FLOAT_NEGATIVE_INFINITY';
+ case FLOAT_NAN:
+ return 'BuiltinConstantValue.FLOAT_NAN';
+ default:
+ return null;
+ }
+ }
+
+ int toJson() => value;
+}
+
+MojomEnum _mojom_types_BuiltinConstantValue__() {
+ return new MojomEnum()
+ ..declData = (new DeclarationData()..shortName = "BuiltinConstantValue")
+ ..values = <EnumValue>[new EnumValue()
+ ..declData = (new DeclarationData()..shortName = "DOUBLE_INFINITY")
+ ..enumTypeKey = '_mojom_types_BuiltinConstantValue__'
+ ..intValue = 0,new EnumValue()
+ ..declData = (new DeclarationData()..shortName = "DOUBLE_NEGATIVE_INFINITY")
+ ..enumTypeKey = '_mojom_types_BuiltinConstantValue__'
+ ..intValue = 1,new EnumValue()
+ ..declData = (new DeclarationData()..shortName = "DOUBLE_NAN")
+ ..enumTypeKey = '_mojom_types_BuiltinConstantValue__'
+ ..intValue = 2,new EnumValue()
+ ..declData = (new DeclarationData()..shortName = "FLOAT_INFINITY")
+ ..enumTypeKey = '_mojom_types_BuiltinConstantValue__'
+ ..intValue = 3,new EnumValue()
+ ..declData = (new DeclarationData()..shortName = "FLOAT_NEGATIVE_INFINITY")
+ ..enumTypeKey = '_mojom_types_BuiltinConstantValue__'
+ ..intValue = 4,new EnumValue()
+ ..declData = (new DeclarationData()..shortName = "FLOAT_NAN")
+ ..enumTypeKey = '_mojom_types_BuiltinConstantValue__'
+ ..intValue = 5,];
+}
+
+
+
+class StringType extends bindings.Struct {
+ static const List<bindings.StructDataHeader> kVersions = const [
+ const bindings.StructDataHeader(16, 0)
+ ];
+ bool nullable = false;
+
+ StringType() : super(kVersions.last.size);
+
+ static StringType deserialize(bindings.Message message) {
+ var decoder = new bindings.Decoder(message);
+ var result = decode(decoder);
+ if (decoder.excessHandles != null) {
+ decoder.excessHandles.forEach((h) => h.close());
+ }
+ return result;
+ }
+
+ static StringType decode(bindings.Decoder decoder0) {
+ if (decoder0 == null) {
+ return null;
+ }
+ StringType result = new StringType();
+
+ var mainDataHeader = decoder0.decodeStructDataHeader();
+ if (mainDataHeader.version <= kVersions.last.version) {
+ // Scan in reverse order to optimize for more recent versions.
+ for (int i = kVersions.length - 1; i >= 0; --i) {
+ if (mainDataHeader.version >= kVersions[i].version) {
+ if (mainDataHeader.size == kVersions[i].size) {
+ // Found a match.
+ break;
+ }
+ throw new bindings.MojoCodecError(
+ 'Header size doesn\'t correspond to known version size.');
+ }
+ }
+ } else if (mainDataHeader.size < kVersions.last.size) {
+ throw new bindings.MojoCodecError(
+ 'Message newer than the last known version cannot be shorter than '
+ 'required by the last known version.');
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.nullable = decoder0.decodeBool(8, 0);
+ }
+ return result;
+ }
+
+ void encode(bindings.Encoder encoder) {
+ var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
+
+ encoder0.encodeBool(nullable, 8, 0);
+ }
+
+ String toString() {
+ return "StringType("
+ "nullable: $nullable" ")";
+ }
+
+ Map toJson() {
+ Map map = new Map();
+ map["nullable"] = nullable;
+ return map;
+ }
+}
+
+MojomStruct _mojom_types_StringType__() {
+ return new MojomStruct()
+ ..declData = (new DeclarationData()..shortName = 'StringType')
+ ..fields = <StructField>[
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'Nullable')
+ ..type = (new Type()..simpleType = SimpleType.BOOL),
+ ];
+}
+
+class HandleTypeKind extends bindings.MojoEnum {
+ static const UNSPECIFIED = const HandleTypeKind._(0);
+ static const MESSAGE_PIPE = const HandleTypeKind._(1);
+ static const DATA_PIPE_CONSUMER = const HandleTypeKind._(2);
+ static const DATA_PIPE_PRODUCER = const HandleTypeKind._(3);
+ static const SHARED_BUFFER = const HandleTypeKind._(4);
+
+ const HandleTypeKind._(int v) : super(v);
+
+ static const Map<String, HandleTypeKind> valuesMap = const {
+ "UNSPECIFIED": UNSPECIFIED,
+ "MESSAGE_PIPE": MESSAGE_PIPE,
+ "DATA_PIPE_CONSUMER": DATA_PIPE_CONSUMER,
+ "DATA_PIPE_PRODUCER": DATA_PIPE_PRODUCER,
+ "SHARED_BUFFER": SHARED_BUFFER,
+ };
+ static const List<HandleTypeKind> values = const [
+ UNSPECIFIED,
+ MESSAGE_PIPE,
+ DATA_PIPE_CONSUMER,
+ DATA_PIPE_PRODUCER,
+ SHARED_BUFFER,
+ ];
+
+ static HandleTypeKind valueOf(String name) => valuesMap[name];
+
+ factory HandleTypeKind(int v) {
+ switch (v) {
+ case 0:
+ return UNSPECIFIED;
+ case 1:
+ return MESSAGE_PIPE;
+ case 2:
+ return DATA_PIPE_CONSUMER;
+ case 3:
+ return DATA_PIPE_PRODUCER;
+ case 4:
+ return SHARED_BUFFER;
+ default:
+ return null;
+ }
+ }
+
+ static HandleTypeKind decode(bindings.Decoder decoder0, int offset) {
+ int v = decoder0.decodeUint32(offset);
+ HandleTypeKind result = new HandleTypeKind(v);
+ if (result == null) {
+ throw new bindings.MojoCodecError(
+ 'Bad value $v for enum HandleTypeKind.');
+ }
+ return result;
+ }
+
+ String toString() {
+ switch(this) {
+ case UNSPECIFIED:
+ return 'HandleTypeKind.UNSPECIFIED';
+ case MESSAGE_PIPE:
+ return 'HandleTypeKind.MESSAGE_PIPE';
+ case DATA_PIPE_CONSUMER:
+ return 'HandleTypeKind.DATA_PIPE_CONSUMER';
+ case DATA_PIPE_PRODUCER:
+ return 'HandleTypeKind.DATA_PIPE_PRODUCER';
+ case SHARED_BUFFER:
+ return 'HandleTypeKind.SHARED_BUFFER';
+ default:
+ return null;
+ }
+ }
+
+ int toJson() => value;
+}
+
+MojomEnum _mojom_types_Kind__() {
+ return new MojomEnum()
+ ..declData = (new DeclarationData()..shortName = "HandleTypeKind")
+ ..values = <EnumValue>[new EnumValue()
+ ..declData = (new DeclarationData()..shortName = "UNSPECIFIED")
+ ..enumTypeKey = '_mojom_types_Kind__'
+ ..intValue = 0,new EnumValue()
+ ..declData = (new DeclarationData()..shortName = "MESSAGE_PIPE")
+ ..enumTypeKey = '_mojom_types_Kind__'
+ ..intValue = 1,new EnumValue()
+ ..declData = (new DeclarationData()..shortName = "DATA_PIPE_CONSUMER")
+ ..enumTypeKey = '_mojom_types_Kind__'
+ ..intValue = 2,new EnumValue()
+ ..declData = (new DeclarationData()..shortName = "DATA_PIPE_PRODUCER")
+ ..enumTypeKey = '_mojom_types_Kind__'
+ ..intValue = 3,new EnumValue()
+ ..declData = (new DeclarationData()..shortName = "SHARED_BUFFER")
+ ..enumTypeKey = '_mojom_types_Kind__'
+ ..intValue = 4,];
+}
+
+class HandleType extends bindings.Struct {
+ static const List<bindings.StructDataHeader> kVersions = const [
+ const bindings.StructDataHeader(16, 0)
+ ];
+ bool nullable = false;
+ HandleTypeKind kind = new HandleTypeKind(0);
+
+ HandleType() : super(kVersions.last.size);
+
+ static HandleType deserialize(bindings.Message message) {
+ var decoder = new bindings.Decoder(message);
+ var result = decode(decoder);
+ if (decoder.excessHandles != null) {
+ decoder.excessHandles.forEach((h) => h.close());
+ }
+ return result;
+ }
+
+ static HandleType decode(bindings.Decoder decoder0) {
+ if (decoder0 == null) {
+ return null;
+ }
+ HandleType result = new HandleType();
+
+ var mainDataHeader = decoder0.decodeStructDataHeader();
+ if (mainDataHeader.version <= kVersions.last.version) {
+ // Scan in reverse order to optimize for more recent versions.
+ for (int i = kVersions.length - 1; i >= 0; --i) {
+ if (mainDataHeader.version >= kVersions[i].version) {
+ if (mainDataHeader.size == kVersions[i].size) {
+ // Found a match.
+ break;
+ }
+ throw new bindings.MojoCodecError(
+ 'Header size doesn\'t correspond to known version size.');
+ }
+ }
+ } else if (mainDataHeader.size < kVersions.last.size) {
+ throw new bindings.MojoCodecError(
+ 'Message newer than the last known version cannot be shorter than '
+ 'required by the last known version.');
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.nullable = decoder0.decodeBool(8, 0);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.kind = HandleTypeKind.decode(decoder0, 12);
+ if (result.kind == null) {
+ throw new bindings.MojoCodecError(
+ 'Trying to decode null union for non-nullable HandleTypeKind.');
+ }
+ }
+ return result;
+ }
+
+ void encode(bindings.Encoder encoder) {
+ var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
+
+ encoder0.encodeBool(nullable, 8, 0);
+
+ encoder0.encodeEnum(kind, 12);
+ }
+
+ String toString() {
+ return "HandleType("
+ "nullable: $nullable" ", "
+ "kind: $kind" ")";
+ }
+
+ Map toJson() {
+ Map map = new Map();
+ map["nullable"] = nullable;
+ map["kind"] = kind;
+ return map;
+ }
+}
+
+MojomStruct _mojom_types_HandleType__() {
+ return new MojomStruct()
+ ..declData = (new DeclarationData()..shortName = 'HandleType')
+ ..fields = <StructField>[
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'Nullable')
+ ..type = (new Type()..simpleType = SimpleType.BOOL),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'Kind')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_Kind__'
+ ..typeKey = '_mojom_types_Kind__'
+ )),
+ ];
+}
+
+
+class ArrayType extends bindings.Struct {
+ static const List<bindings.StructDataHeader> kVersions = const [
+ const bindings.StructDataHeader(32, 0)
+ ];
+ bool nullable = false;
+ int fixedLength = -1;
+ Type elementType = null;
+
+ ArrayType() : super(kVersions.last.size);
+
+ static ArrayType deserialize(bindings.Message message) {
+ var decoder = new bindings.Decoder(message);
+ var result = decode(decoder);
+ if (decoder.excessHandles != null) {
+ decoder.excessHandles.forEach((h) => h.close());
+ }
+ return result;
+ }
+
+ static ArrayType decode(bindings.Decoder decoder0) {
+ if (decoder0 == null) {
+ return null;
+ }
+ ArrayType result = new ArrayType();
+
+ var mainDataHeader = decoder0.decodeStructDataHeader();
+ if (mainDataHeader.version <= kVersions.last.version) {
+ // Scan in reverse order to optimize for more recent versions.
+ for (int i = kVersions.length - 1; i >= 0; --i) {
+ if (mainDataHeader.version >= kVersions[i].version) {
+ if (mainDataHeader.size == kVersions[i].size) {
+ // Found a match.
+ break;
+ }
+ throw new bindings.MojoCodecError(
+ 'Header size doesn\'t correspond to known version size.');
+ }
+ }
+ } else if (mainDataHeader.size < kVersions.last.size) {
+ throw new bindings.MojoCodecError(
+ 'Message newer than the last known version cannot be shorter than '
+ 'required by the last known version.');
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.nullable = decoder0.decodeBool(8, 0);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.fixedLength = decoder0.decodeInt32(12);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.elementType = Type.decode(decoder0, 16);
+ if (result.elementType == null) {
+ throw new bindings.MojoCodecError(
+ 'Trying to decode null union for non-nullable Type.');
+ }
+ }
+ return result;
+ }
+
+ void encode(bindings.Encoder encoder) {
+ var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
+
+ encoder0.encodeBool(nullable, 8, 0);
+
+ encoder0.encodeInt32(fixedLength, 12);
+
+ encoder0.encodeUnion(elementType, 16, false);
+ }
+
+ String toString() {
+ return "ArrayType("
+ "nullable: $nullable" ", "
+ "fixedLength: $fixedLength" ", "
+ "elementType: $elementType" ")";
+ }
+
+ Map toJson() {
+ Map map = new Map();
+ map["nullable"] = nullable;
+ map["fixedLength"] = fixedLength;
+ map["elementType"] = elementType;
+ return map;
+ }
+}
+
+MojomStruct _mojom_types_ArrayType__() {
+ return new MojomStruct()
+ ..declData = (new DeclarationData()..shortName = 'ArrayType')
+ ..fields = <StructField>[
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'Nullable')
+ ..type = (new Type()..simpleType = SimpleType.BOOL),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'FixedLength')
+ ..type = (new Type()..simpleType = SimpleType.INT32),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'ElementType')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_Type__'
+ ..typeKey = '_mojom_types_Type__'
+ )),
+ ];
+}
+
+
+class MapType extends bindings.Struct {
+ static const List<bindings.StructDataHeader> kVersions = const [
+ const bindings.StructDataHeader(48, 0)
+ ];
+ bool nullable = false;
+ Type keyType = null;
+ Type valueType = null;
+
+ MapType() : super(kVersions.last.size);
+
+ static MapType deserialize(bindings.Message message) {
+ var decoder = new bindings.Decoder(message);
+ var result = decode(decoder);
+ if (decoder.excessHandles != null) {
+ decoder.excessHandles.forEach((h) => h.close());
+ }
+ return result;
+ }
+
+ static MapType decode(bindings.Decoder decoder0) {
+ if (decoder0 == null) {
+ return null;
+ }
+ MapType result = new MapType();
+
+ var mainDataHeader = decoder0.decodeStructDataHeader();
+ if (mainDataHeader.version <= kVersions.last.version) {
+ // Scan in reverse order to optimize for more recent versions.
+ for (int i = kVersions.length - 1; i >= 0; --i) {
+ if (mainDataHeader.version >= kVersions[i].version) {
+ if (mainDataHeader.size == kVersions[i].size) {
+ // Found a match.
+ break;
+ }
+ throw new bindings.MojoCodecError(
+ 'Header size doesn\'t correspond to known version size.');
+ }
+ }
+ } else if (mainDataHeader.size < kVersions.last.size) {
+ throw new bindings.MojoCodecError(
+ 'Message newer than the last known version cannot be shorter than '
+ 'required by the last known version.');
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.nullable = decoder0.decodeBool(8, 0);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.keyType = Type.decode(decoder0, 16);
+ if (result.keyType == null) {
+ throw new bindings.MojoCodecError(
+ 'Trying to decode null union for non-nullable Type.');
+ }
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.valueType = Type.decode(decoder0, 32);
+ if (result.valueType == null) {
+ throw new bindings.MojoCodecError(
+ 'Trying to decode null union for non-nullable Type.');
+ }
+ }
+ return result;
+ }
+
+ void encode(bindings.Encoder encoder) {
+ var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
+
+ encoder0.encodeBool(nullable, 8, 0);
+
+ encoder0.encodeUnion(keyType, 16, false);
+
+ encoder0.encodeUnion(valueType, 32, false);
+ }
+
+ String toString() {
+ return "MapType("
+ "nullable: $nullable" ", "
+ "keyType: $keyType" ", "
+ "valueType: $valueType" ")";
+ }
+
+ Map toJson() {
+ Map map = new Map();
+ map["nullable"] = nullable;
+ map["keyType"] = keyType;
+ map["valueType"] = valueType;
+ return map;
+ }
+}
+
+MojomStruct _mojom_types_MapType__() {
+ return new MojomStruct()
+ ..declData = (new DeclarationData()..shortName = 'MapType')
+ ..fields = <StructField>[
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'Nullable')
+ ..type = (new Type()..simpleType = SimpleType.BOOL),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'KeyType')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_Type__'
+ ..typeKey = '_mojom_types_Type__'
+ )),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'ValueType')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_Type__'
+ ..typeKey = '_mojom_types_Type__'
+ )),
+ ];
+}
+
+
+class TypeReference extends bindings.Struct {
+ static const List<bindings.StructDataHeader> kVersions = const [
+ const bindings.StructDataHeader(32, 0)
+ ];
+ bool nullable = false;
+ bool isInterfaceRequest = false;
+ String identifier = null;
+ String typeKey = null;
+
+ TypeReference() : super(kVersions.last.size);
+
+ static TypeReference deserialize(bindings.Message message) {
+ var decoder = new bindings.Decoder(message);
+ var result = decode(decoder);
+ if (decoder.excessHandles != null) {
+ decoder.excessHandles.forEach((h) => h.close());
+ }
+ return result;
+ }
+
+ static TypeReference decode(bindings.Decoder decoder0) {
+ if (decoder0 == null) {
+ return null;
+ }
+ TypeReference result = new TypeReference();
+
+ var mainDataHeader = decoder0.decodeStructDataHeader();
+ if (mainDataHeader.version <= kVersions.last.version) {
+ // Scan in reverse order to optimize for more recent versions.
+ for (int i = kVersions.length - 1; i >= 0; --i) {
+ if (mainDataHeader.version >= kVersions[i].version) {
+ if (mainDataHeader.size == kVersions[i].size) {
+ // Found a match.
+ break;
+ }
+ throw new bindings.MojoCodecError(
+ 'Header size doesn\'t correspond to known version size.');
+ }
+ }
+ } else if (mainDataHeader.size < kVersions.last.size) {
+ throw new bindings.MojoCodecError(
+ 'Message newer than the last known version cannot be shorter than '
+ 'required by the last known version.');
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.nullable = decoder0.decodeBool(8, 0);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.isInterfaceRequest = decoder0.decodeBool(8, 1);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.identifier = decoder0.decodeString(16, true);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.typeKey = decoder0.decodeString(24, true);
+ }
+ return result;
+ }
+
+ void encode(bindings.Encoder encoder) {
+ var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
+
+ encoder0.encodeBool(nullable, 8, 0);
+
+ encoder0.encodeBool(isInterfaceRequest, 8, 1);
+
+ encoder0.encodeString(identifier, 16, true);
+
+ encoder0.encodeString(typeKey, 24, true);
+ }
+
+ String toString() {
+ return "TypeReference("
+ "nullable: $nullable" ", "
+ "isInterfaceRequest: $isInterfaceRequest" ", "
+ "identifier: $identifier" ", "
+ "typeKey: $typeKey" ")";
+ }
+
+ Map toJson() {
+ Map map = new Map();
+ map["nullable"] = nullable;
+ map["isInterfaceRequest"] = isInterfaceRequest;
+ map["identifier"] = identifier;
+ map["typeKey"] = typeKey;
+ return map;
+ }
+}
+
+MojomStruct _mojom_types_TypeReference__() {
+ return new MojomStruct()
+ ..declData = (new DeclarationData()..shortName = 'TypeReference')
+ ..fields = <StructField>[
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'Nullable')
+ ..type = (new Type()..simpleType = SimpleType.BOOL),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'IsInterfaceRequest')
+ ..type = (new Type()..simpleType = SimpleType.BOOL),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'Identifier')
+ ..type = (new Type()
+..stringType = (new StringType()..nullable = true)),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'TypeKey')
+ ..type = (new Type()
+..stringType = (new StringType()..nullable = true)),
+ ];
+}
+
+
+class StructField extends bindings.Struct {
+ static const List<bindings.StructDataHeader> kVersions = const [
+ const bindings.StructDataHeader(56, 0)
+ ];
+ DeclarationData declData = null;
+ Type type = null;
+ DefaultFieldValue defaultValue = null;
+ int offset = 0;
+
+ StructField() : super(kVersions.last.size);
+
+ static StructField deserialize(bindings.Message message) {
+ var decoder = new bindings.Decoder(message);
+ var result = decode(decoder);
+ if (decoder.excessHandles != null) {
+ decoder.excessHandles.forEach((h) => h.close());
+ }
+ return result;
+ }
+
+ static StructField decode(bindings.Decoder decoder0) {
+ if (decoder0 == null) {
+ return null;
+ }
+ StructField result = new StructField();
+
+ var mainDataHeader = decoder0.decodeStructDataHeader();
+ if (mainDataHeader.version <= kVersions.last.version) {
+ // Scan in reverse order to optimize for more recent versions.
+ for (int i = kVersions.length - 1; i >= 0; --i) {
+ if (mainDataHeader.version >= kVersions[i].version) {
+ if (mainDataHeader.size == kVersions[i].size) {
+ // Found a match.
+ break;
+ }
+ throw new bindings.MojoCodecError(
+ 'Header size doesn\'t correspond to known version size.');
+ }
+ }
+ } else if (mainDataHeader.size < kVersions.last.size) {
+ throw new bindings.MojoCodecError(
+ 'Message newer than the last known version cannot be shorter than '
+ 'required by the last known version.');
+ }
+ if (mainDataHeader.version >= 0) {
+
+ var decoder1 = decoder0.decodePointer(8, true);
+ result.declData = DeclarationData.decode(decoder1);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.type = Type.decode(decoder0, 16);
+ if (result.type == null) {
+ throw new bindings.MojoCodecError(
+ 'Trying to decode null union for non-nullable Type.');
+ }
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.defaultValue = DefaultFieldValue.decode(decoder0, 32);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.offset = decoder0.decodeInt32(48);
+ }
+ return result;
+ }
+
+ void encode(bindings.Encoder encoder) {
+ var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
+
+ encoder0.encodeStruct(declData, 8, true);
+
+ encoder0.encodeUnion(type, 16, false);
+
+ encoder0.encodeUnion(defaultValue, 32, true);
+
+ encoder0.encodeInt32(offset, 48);
+ }
+
+ String toString() {
+ return "StructField("
+ "declData: $declData" ", "
+ "type: $type" ", "
+ "defaultValue: $defaultValue" ", "
+ "offset: $offset" ")";
+ }
+
+ Map toJson() {
+ Map map = new Map();
+ map["declData"] = declData;
+ map["type"] = type;
+ map["defaultValue"] = defaultValue;
+ map["offset"] = offset;
+ return map;
+ }
+}
+
+MojomStruct _mojom_types_StructField__() {
+ return new MojomStruct()
+ ..declData = (new DeclarationData()..shortName = 'StructField')
+ ..fields = <StructField>[
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'DeclData')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+ ..nullable = true
+
+
+ ..identifier = '_mojom_types_DeclarationData__'
+ ..typeKey = '_mojom_types_DeclarationData__'
+ )),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'Type')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_Type__'
+ ..typeKey = '_mojom_types_Type__'
+ )),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'DefaultValue')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+ ..nullable = true
+
+
+ ..identifier = '_mojom_types_DefaultFieldValue__'
+ ..typeKey = '_mojom_types_DefaultFieldValue__'
+ )),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'Offset')
+ ..type = (new Type()..simpleType = SimpleType.INT32),
+ ];
+}
+
+
+class DefaultKeyword extends bindings.Struct {
+ static const List<bindings.StructDataHeader> kVersions = const [
+ const bindings.StructDataHeader(8, 0)
+ ];
+
+ DefaultKeyword() : super(kVersions.last.size);
+
+ static DefaultKeyword deserialize(bindings.Message message) {
+ var decoder = new bindings.Decoder(message);
+ var result = decode(decoder);
+ if (decoder.excessHandles != null) {
+ decoder.excessHandles.forEach((h) => h.close());
+ }
+ return result;
+ }
+
+ static DefaultKeyword decode(bindings.Decoder decoder0) {
+ if (decoder0 == null) {
+ return null;
+ }
+ DefaultKeyword result = new DefaultKeyword();
+
+ var mainDataHeader = decoder0.decodeStructDataHeader();
+ if (mainDataHeader.version <= kVersions.last.version) {
+ // Scan in reverse order to optimize for more recent versions.
+ for (int i = kVersions.length - 1; i >= 0; --i) {
+ if (mainDataHeader.version >= kVersions[i].version) {
+ if (mainDataHeader.size == kVersions[i].size) {
+ // Found a match.
+ break;
+ }
+ throw new bindings.MojoCodecError(
+ 'Header size doesn\'t correspond to known version size.');
+ }
+ }
+ } else if (mainDataHeader.size < kVersions.last.size) {
+ throw new bindings.MojoCodecError(
+ 'Message newer than the last known version cannot be shorter than '
+ 'required by the last known version.');
+ }
+ return result;
+ }
+
+ void encode(bindings.Encoder encoder) {
+ encoder.getStructEncoderAtOffset(kVersions.last);
+ }
+
+ String toString() {
+ return "DefaultKeyword("")";
+ }
+
+ Map toJson() {
+ Map map = new Map();
+ return map;
+ }
+}
+
+MojomStruct _mojom_types_DefaultKeyword__() {
+ return new MojomStruct()
+ ..declData = (new DeclarationData()..shortName = 'DefaultKeyword')
+ ..fields = <StructField>[];
+}
+
+
+class StructVersion extends bindings.Struct {
+ static const List<bindings.StructDataHeader> kVersions = const [
+ const bindings.StructDataHeader(24, 0)
+ ];
+ int versionNumber = 0;
+ int numFields = 0;
+ int numBytes = 0;
+
+ StructVersion() : super(kVersions.last.size);
+
+ static StructVersion deserialize(bindings.Message message) {
+ var decoder = new bindings.Decoder(message);
+ var result = decode(decoder);
+ if (decoder.excessHandles != null) {
+ decoder.excessHandles.forEach((h) => h.close());
+ }
+ return result;
+ }
+
+ static StructVersion decode(bindings.Decoder decoder0) {
+ if (decoder0 == null) {
+ return null;
+ }
+ StructVersion result = new StructVersion();
+
+ var mainDataHeader = decoder0.decodeStructDataHeader();
+ if (mainDataHeader.version <= kVersions.last.version) {
+ // Scan in reverse order to optimize for more recent versions.
+ for (int i = kVersions.length - 1; i >= 0; --i) {
+ if (mainDataHeader.version >= kVersions[i].version) {
+ if (mainDataHeader.size == kVersions[i].size) {
+ // Found a match.
+ break;
+ }
+ throw new bindings.MojoCodecError(
+ 'Header size doesn\'t correspond to known version size.');
+ }
+ }
+ } else if (mainDataHeader.size < kVersions.last.size) {
+ throw new bindings.MojoCodecError(
+ 'Message newer than the last known version cannot be shorter than '
+ 'required by the last known version.');
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.versionNumber = decoder0.decodeUint32(8);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.numFields = decoder0.decodeUint32(12);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.numBytes = decoder0.decodeUint32(16);
+ }
+ return result;
+ }
+
+ void encode(bindings.Encoder encoder) {
+ var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
+
+ encoder0.encodeUint32(versionNumber, 8);
+
+ encoder0.encodeUint32(numFields, 12);
+
+ encoder0.encodeUint32(numBytes, 16);
+ }
+
+ String toString() {
+ return "StructVersion("
+ "versionNumber: $versionNumber" ", "
+ "numFields: $numFields" ", "
+ "numBytes: $numBytes" ")";
+ }
+
+ Map toJson() {
+ Map map = new Map();
+ map["versionNumber"] = versionNumber;
+ map["numFields"] = numFields;
+ map["numBytes"] = numBytes;
+ return map;
+ }
+}
+
+MojomStruct _mojom_types_StructVersion__() {
+ return new MojomStruct()
+ ..declData = (new DeclarationData()..shortName = 'StructVersion')
+ ..fields = <StructField>[
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'VersionNumber')
+ ..type = (new Type()..simpleType = SimpleType.UINT32),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'NumFields')
+ ..type = (new Type()..simpleType = SimpleType.UINT32),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'NumBytes')
+ ..type = (new Type()..simpleType = SimpleType.UINT32),
+ ];
+}
+
+
+class MojomStruct extends bindings.Struct {
+ static const List<bindings.StructDataHeader> kVersions = const [
+ const bindings.StructDataHeader(32, 0)
+ ];
+ DeclarationData declData = null;
+ List<StructField> fields = null;
+ List<StructVersion> versionInfo = null;
+
+ MojomStruct() : super(kVersions.last.size);
+
+ static MojomStruct deserialize(bindings.Message message) {
+ var decoder = new bindings.Decoder(message);
+ var result = decode(decoder);
+ if (decoder.excessHandles != null) {
+ decoder.excessHandles.forEach((h) => h.close());
+ }
+ return result;
+ }
+
+ static MojomStruct decode(bindings.Decoder decoder0) {
+ if (decoder0 == null) {
+ return null;
+ }
+ MojomStruct result = new MojomStruct();
+
+ var mainDataHeader = decoder0.decodeStructDataHeader();
+ if (mainDataHeader.version <= kVersions.last.version) {
+ // Scan in reverse order to optimize for more recent versions.
+ for (int i = kVersions.length - 1; i >= 0; --i) {
+ if (mainDataHeader.version >= kVersions[i].version) {
+ if (mainDataHeader.size == kVersions[i].size) {
+ // Found a match.
+ break;
+ }
+ throw new bindings.MojoCodecError(
+ 'Header size doesn\'t correspond to known version size.');
+ }
+ }
+ } else if (mainDataHeader.size < kVersions.last.size) {
+ throw new bindings.MojoCodecError(
+ 'Message newer than the last known version cannot be shorter than '
+ 'required by the last known version.');
+ }
+ if (mainDataHeader.version >= 0) {
+
+ var decoder1 = decoder0.decodePointer(8, true);
+ result.declData = DeclarationData.decode(decoder1);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ var decoder1 = decoder0.decodePointer(16, false);
+ {
+ var si1 = decoder1.decodeDataHeaderForPointerArray(bindings.kUnspecifiedArrayLength);
+ result.fields = new List<StructField>(si1.numElements);
+ for (int i1 = 0; i1 < si1.numElements; ++i1) {
+
+ var decoder2 = decoder1.decodePointer(bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize * i1, false);
+ result.fields[i1] = StructField.decode(decoder2);
+ }
+ }
+ }
+ if (mainDataHeader.version >= 0) {
+
+ var decoder1 = decoder0.decodePointer(24, true);
+ if (decoder1 == null) {
+ result.versionInfo = null;
+ } else {
+ var si1 = decoder1.decodeDataHeaderForPointerArray(bindings.kUnspecifiedArrayLength);
+ result.versionInfo = new List<StructVersion>(si1.numElements);
+ for (int i1 = 0; i1 < si1.numElements; ++i1) {
+
+ var decoder2 = decoder1.decodePointer(bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize * i1, false);
+ result.versionInfo[i1] = StructVersion.decode(decoder2);
+ }
+ }
+ }
+ return result;
+ }
+
+ void encode(bindings.Encoder encoder) {
+ var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
+
+ encoder0.encodeStruct(declData, 8, true);
+
+ if (fields == null) {
+ encoder0.encodeNullPointer(16, false);
+ } else {
+ var encoder1 = encoder0.encodePointerArray(fields.length, 16, bindings.kUnspecifiedArrayLength);
+ for (int i0 = 0; i0 < fields.length; ++i0) {
+
+ encoder1.encodeStruct(fields[i0], bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize * i0, false);
+ }
+ }
+
+ if (versionInfo == null) {
+ encoder0.encodeNullPointer(24, true);
+ } else {
+ var encoder1 = encoder0.encodePointerArray(versionInfo.length, 24, bindings.kUnspecifiedArrayLength);
+ for (int i0 = 0; i0 < versionInfo.length; ++i0) {
+
+ encoder1.encodeStruct(versionInfo[i0], bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize * i0, false);
+ }
+ }
+ }
+
+ String toString() {
+ return "MojomStruct("
+ "declData: $declData" ", "
+ "fields: $fields" ", "
+ "versionInfo: $versionInfo" ")";
+ }
+
+ Map toJson() {
+ Map map = new Map();
+ map["declData"] = declData;
+ map["fields"] = fields;
+ map["versionInfo"] = versionInfo;
+ return map;
+ }
+}
+
+MojomStruct _mojom_types_MojomStruct__() {
+ return new MojomStruct()
+ ..declData = (new DeclarationData()..shortName = 'MojomStruct')
+ ..fields = <StructField>[
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'DeclData')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+ ..nullable = true
+
+
+ ..identifier = '_mojom_types_DeclarationData__'
+ ..typeKey = '_mojom_types_DeclarationData__'
+ )),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'Fields')
+ ..type = (new Type()..arrayType = (new ArrayType()
+ ..elementType = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_StructField__'
+ ..typeKey = '_mojom_types_StructField__'
+ )))),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'VersionInfo')
+ ..type = (new Type()..arrayType = (new ArrayType()
+ ..nullable = true
+
+ ..elementType = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_StructVersion__'
+ ..typeKey = '_mojom_types_StructVersion__'
+ )))),
+ ];
+}
+
+
+class UnionField extends bindings.Struct {
+ static const List<bindings.StructDataHeader> kVersions = const [
+ const bindings.StructDataHeader(40, 0)
+ ];
+ DeclarationData declData = null;
+ Type type = null;
+ int tag = 0;
+
+ UnionField() : super(kVersions.last.size);
+
+ static UnionField deserialize(bindings.Message message) {
+ var decoder = new bindings.Decoder(message);
+ var result = decode(decoder);
+ if (decoder.excessHandles != null) {
+ decoder.excessHandles.forEach((h) => h.close());
+ }
+ return result;
+ }
+
+ static UnionField decode(bindings.Decoder decoder0) {
+ if (decoder0 == null) {
+ return null;
+ }
+ UnionField result = new UnionField();
+
+ var mainDataHeader = decoder0.decodeStructDataHeader();
+ if (mainDataHeader.version <= kVersions.last.version) {
+ // Scan in reverse order to optimize for more recent versions.
+ for (int i = kVersions.length - 1; i >= 0; --i) {
+ if (mainDataHeader.version >= kVersions[i].version) {
+ if (mainDataHeader.size == kVersions[i].size) {
+ // Found a match.
+ break;
+ }
+ throw new bindings.MojoCodecError(
+ 'Header size doesn\'t correspond to known version size.');
+ }
+ }
+ } else if (mainDataHeader.size < kVersions.last.size) {
+ throw new bindings.MojoCodecError(
+ 'Message newer than the last known version cannot be shorter than '
+ 'required by the last known version.');
+ }
+ if (mainDataHeader.version >= 0) {
+
+ var decoder1 = decoder0.decodePointer(8, true);
+ result.declData = DeclarationData.decode(decoder1);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.type = Type.decode(decoder0, 16);
+ if (result.type == null) {
+ throw new bindings.MojoCodecError(
+ 'Trying to decode null union for non-nullable Type.');
+ }
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.tag = decoder0.decodeUint32(32);
+ }
+ return result;
+ }
+
+ void encode(bindings.Encoder encoder) {
+ var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
+
+ encoder0.encodeStruct(declData, 8, true);
+
+ encoder0.encodeUnion(type, 16, false);
+
+ encoder0.encodeUint32(tag, 32);
+ }
+
+ String toString() {
+ return "UnionField("
+ "declData: $declData" ", "
+ "type: $type" ", "
+ "tag: $tag" ")";
+ }
+
+ Map toJson() {
+ Map map = new Map();
+ map["declData"] = declData;
+ map["type"] = type;
+ map["tag"] = tag;
+ return map;
+ }
+}
+
+MojomStruct _mojom_types_UnionField__() {
+ return new MojomStruct()
+ ..declData = (new DeclarationData()..shortName = 'UnionField')
+ ..fields = <StructField>[
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'DeclData')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+ ..nullable = true
+
+
+ ..identifier = '_mojom_types_DeclarationData__'
+ ..typeKey = '_mojom_types_DeclarationData__'
+ )),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'Type')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_Type__'
+ ..typeKey = '_mojom_types_Type__'
+ )),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'Tag')
+ ..type = (new Type()..simpleType = SimpleType.UINT32),
+ ];
+}
+
+
+class MojomUnion extends bindings.Struct {
+ static const List<bindings.StructDataHeader> kVersions = const [
+ const bindings.StructDataHeader(24, 0)
+ ];
+ DeclarationData declData = null;
+ List<UnionField> fields = null;
+
+ MojomUnion() : super(kVersions.last.size);
+
+ static MojomUnion deserialize(bindings.Message message) {
+ var decoder = new bindings.Decoder(message);
+ var result = decode(decoder);
+ if (decoder.excessHandles != null) {
+ decoder.excessHandles.forEach((h) => h.close());
+ }
+ return result;
+ }
+
+ static MojomUnion decode(bindings.Decoder decoder0) {
+ if (decoder0 == null) {
+ return null;
+ }
+ MojomUnion result = new MojomUnion();
+
+ var mainDataHeader = decoder0.decodeStructDataHeader();
+ if (mainDataHeader.version <= kVersions.last.version) {
+ // Scan in reverse order to optimize for more recent versions.
+ for (int i = kVersions.length - 1; i >= 0; --i) {
+ if (mainDataHeader.version >= kVersions[i].version) {
+ if (mainDataHeader.size == kVersions[i].size) {
+ // Found a match.
+ break;
+ }
+ throw new bindings.MojoCodecError(
+ 'Header size doesn\'t correspond to known version size.');
+ }
+ }
+ } else if (mainDataHeader.size < kVersions.last.size) {
+ throw new bindings.MojoCodecError(
+ 'Message newer than the last known version cannot be shorter than '
+ 'required by the last known version.');
+ }
+ if (mainDataHeader.version >= 0) {
+
+ var decoder1 = decoder0.decodePointer(8, true);
+ result.declData = DeclarationData.decode(decoder1);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ var decoder1 = decoder0.decodePointer(16, false);
+ {
+ var si1 = decoder1.decodeDataHeaderForPointerArray(bindings.kUnspecifiedArrayLength);
+ result.fields = new List<UnionField>(si1.numElements);
+ for (int i1 = 0; i1 < si1.numElements; ++i1) {
+
+ var decoder2 = decoder1.decodePointer(bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize * i1, false);
+ result.fields[i1] = UnionField.decode(decoder2);
+ }
+ }
+ }
+ return result;
+ }
+
+ void encode(bindings.Encoder encoder) {
+ var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
+
+ encoder0.encodeStruct(declData, 8, true);
+
+ if (fields == null) {
+ encoder0.encodeNullPointer(16, false);
+ } else {
+ var encoder1 = encoder0.encodePointerArray(fields.length, 16, bindings.kUnspecifiedArrayLength);
+ for (int i0 = 0; i0 < fields.length; ++i0) {
+
+ encoder1.encodeStruct(fields[i0], bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize * i0, false);
+ }
+ }
+ }
+
+ String toString() {
+ return "MojomUnion("
+ "declData: $declData" ", "
+ "fields: $fields" ")";
+ }
+
+ Map toJson() {
+ Map map = new Map();
+ map["declData"] = declData;
+ map["fields"] = fields;
+ return map;
+ }
+}
+
+MojomStruct _mojom_types_MojomUnion__() {
+ return new MojomStruct()
+ ..declData = (new DeclarationData()..shortName = 'MojomUnion')
+ ..fields = <StructField>[
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'DeclData')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+ ..nullable = true
+
+
+ ..identifier = '_mojom_types_DeclarationData__'
+ ..typeKey = '_mojom_types_DeclarationData__'
+ )),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'Fields')
+ ..type = (new Type()..arrayType = (new ArrayType()
+ ..elementType = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_UnionField__'
+ ..typeKey = '_mojom_types_UnionField__'
+ )))),
+ ];
+}
+
+
+class EnumValue extends bindings.Struct {
+ static const List<bindings.StructDataHeader> kVersions = const [
+ const bindings.StructDataHeader(48, 0)
+ ];
+ DeclarationData declData = null;
+ String enumTypeKey = null;
+ Value initializerValue = null;
+ int intValue = 0;
+
+ EnumValue() : super(kVersions.last.size);
+
+ static EnumValue deserialize(bindings.Message message) {
+ var decoder = new bindings.Decoder(message);
+ var result = decode(decoder);
+ if (decoder.excessHandles != null) {
+ decoder.excessHandles.forEach((h) => h.close());
+ }
+ return result;
+ }
+
+ static EnumValue decode(bindings.Decoder decoder0) {
+ if (decoder0 == null) {
+ return null;
+ }
+ EnumValue result = new EnumValue();
+
+ var mainDataHeader = decoder0.decodeStructDataHeader();
+ if (mainDataHeader.version <= kVersions.last.version) {
+ // Scan in reverse order to optimize for more recent versions.
+ for (int i = kVersions.length - 1; i >= 0; --i) {
+ if (mainDataHeader.version >= kVersions[i].version) {
+ if (mainDataHeader.size == kVersions[i].size) {
+ // Found a match.
+ break;
+ }
+ throw new bindings.MojoCodecError(
+ 'Header size doesn\'t correspond to known version size.');
+ }
+ }
+ } else if (mainDataHeader.size < kVersions.last.size) {
+ throw new bindings.MojoCodecError(
+ 'Message newer than the last known version cannot be shorter than '
+ 'required by the last known version.');
+ }
+ if (mainDataHeader.version >= 0) {
+
+ var decoder1 = decoder0.decodePointer(8, true);
+ result.declData = DeclarationData.decode(decoder1);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.enumTypeKey = decoder0.decodeString(16, false);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.initializerValue = Value.decode(decoder0, 24);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.intValue = decoder0.decodeInt32(40);
+ }
+ return result;
+ }
+
+ void encode(bindings.Encoder encoder) {
+ var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
+
+ encoder0.encodeStruct(declData, 8, true);
+
+ encoder0.encodeString(enumTypeKey, 16, false);
+
+ encoder0.encodeUnion(initializerValue, 24, true);
+
+ encoder0.encodeInt32(intValue, 40);
+ }
+
+ String toString() {
+ return "EnumValue("
+ "declData: $declData" ", "
+ "enumTypeKey: $enumTypeKey" ", "
+ "initializerValue: $initializerValue" ", "
+ "intValue: $intValue" ")";
+ }
+
+ Map toJson() {
+ Map map = new Map();
+ map["declData"] = declData;
+ map["enumTypeKey"] = enumTypeKey;
+ map["initializerValue"] = initializerValue;
+ map["intValue"] = intValue;
+ return map;
+ }
+}
+
+MojomStruct _mojom_types_EnumValue__() {
+ return new MojomStruct()
+ ..declData = (new DeclarationData()..shortName = 'EnumValue')
+ ..fields = <StructField>[
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'DeclData')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+ ..nullable = true
+
+
+ ..identifier = '_mojom_types_DeclarationData__'
+ ..typeKey = '_mojom_types_DeclarationData__'
+ )),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'EnumTypeKey')
+ ..type = (new Type()
+..stringType = (new StringType()..nullable = false)),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'InitializerValue')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+ ..nullable = true
+
+
+ ..identifier = '_mojom_types_Value__'
+ ..typeKey = '_mojom_types_Value__'
+ )),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'IntValue')
+ ..type = (new Type()..simpleType = SimpleType.INT32),
+ ];
+}
+
+
+class MojomEnum extends bindings.Struct {
+ static const List<bindings.StructDataHeader> kVersions = const [
+ const bindings.StructDataHeader(24, 0)
+ ];
+ DeclarationData declData = null;
+ List<EnumValue> values = null;
+
+ MojomEnum() : super(kVersions.last.size);
+
+ static MojomEnum deserialize(bindings.Message message) {
+ var decoder = new bindings.Decoder(message);
+ var result = decode(decoder);
+ if (decoder.excessHandles != null) {
+ decoder.excessHandles.forEach((h) => h.close());
+ }
+ return result;
+ }
+
+ static MojomEnum decode(bindings.Decoder decoder0) {
+ if (decoder0 == null) {
+ return null;
+ }
+ MojomEnum result = new MojomEnum();
+
+ var mainDataHeader = decoder0.decodeStructDataHeader();
+ if (mainDataHeader.version <= kVersions.last.version) {
+ // Scan in reverse order to optimize for more recent versions.
+ for (int i = kVersions.length - 1; i >= 0; --i) {
+ if (mainDataHeader.version >= kVersions[i].version) {
+ if (mainDataHeader.size == kVersions[i].size) {
+ // Found a match.
+ break;
+ }
+ throw new bindings.MojoCodecError(
+ 'Header size doesn\'t correspond to known version size.');
+ }
+ }
+ } else if (mainDataHeader.size < kVersions.last.size) {
+ throw new bindings.MojoCodecError(
+ 'Message newer than the last known version cannot be shorter than '
+ 'required by the last known version.');
+ }
+ if (mainDataHeader.version >= 0) {
+
+ var decoder1 = decoder0.decodePointer(8, true);
+ result.declData = DeclarationData.decode(decoder1);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ var decoder1 = decoder0.decodePointer(16, false);
+ {
+ var si1 = decoder1.decodeDataHeaderForPointerArray(bindings.kUnspecifiedArrayLength);
+ result.values = new List<EnumValue>(si1.numElements);
+ for (int i1 = 0; i1 < si1.numElements; ++i1) {
+
+ var decoder2 = decoder1.decodePointer(bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize * i1, false);
+ result.values[i1] = EnumValue.decode(decoder2);
+ }
+ }
+ }
+ return result;
+ }
+
+ void encode(bindings.Encoder encoder) {
+ var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
+
+ encoder0.encodeStruct(declData, 8, true);
+
+ if (values == null) {
+ encoder0.encodeNullPointer(16, false);
+ } else {
+ var encoder1 = encoder0.encodePointerArray(values.length, 16, bindings.kUnspecifiedArrayLength);
+ for (int i0 = 0; i0 < values.length; ++i0) {
+
+ encoder1.encodeStruct(values[i0], bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize * i0, false);
+ }
+ }
+ }
+
+ String toString() {
+ return "MojomEnum("
+ "declData: $declData" ", "
+ "values: $values" ")";
+ }
+
+ Map toJson() {
+ Map map = new Map();
+ map["declData"] = declData;
+ map["values"] = values;
+ return map;
+ }
+}
+
+MojomStruct _mojom_types_MojomEnum__() {
+ return new MojomStruct()
+ ..declData = (new DeclarationData()..shortName = 'MojomEnum')
+ ..fields = <StructField>[
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'DeclData')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+ ..nullable = true
+
+
+ ..identifier = '_mojom_types_DeclarationData__'
+ ..typeKey = '_mojom_types_DeclarationData__'
+ )),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'Values')
+ ..type = (new Type()..arrayType = (new ArrayType()
+ ..elementType = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_EnumValue__'
+ ..typeKey = '_mojom_types_EnumValue__'
+ )))),
+ ];
+}
+
+
+class MojomMethod extends bindings.Struct {
+ static const List<bindings.StructDataHeader> kVersions = const [
+ const bindings.StructDataHeader(40, 0)
+ ];
+ DeclarationData declData = null;
+ MojomStruct parameters = null;
+ MojomStruct responseParams = null;
+ int ordinal = 0;
+
+ MojomMethod() : super(kVersions.last.size);
+
+ static MojomMethod deserialize(bindings.Message message) {
+ var decoder = new bindings.Decoder(message);
+ var result = decode(decoder);
+ if (decoder.excessHandles != null) {
+ decoder.excessHandles.forEach((h) => h.close());
+ }
+ return result;
+ }
+
+ static MojomMethod decode(bindings.Decoder decoder0) {
+ if (decoder0 == null) {
+ return null;
+ }
+ MojomMethod result = new MojomMethod();
+
+ var mainDataHeader = decoder0.decodeStructDataHeader();
+ if (mainDataHeader.version <= kVersions.last.version) {
+ // Scan in reverse order to optimize for more recent versions.
+ for (int i = kVersions.length - 1; i >= 0; --i) {
+ if (mainDataHeader.version >= kVersions[i].version) {
+ if (mainDataHeader.size == kVersions[i].size) {
+ // Found a match.
+ break;
+ }
+ throw new bindings.MojoCodecError(
+ 'Header size doesn\'t correspond to known version size.');
+ }
+ }
+ } else if (mainDataHeader.size < kVersions.last.size) {
+ throw new bindings.MojoCodecError(
+ 'Message newer than the last known version cannot be shorter than '
+ 'required by the last known version.');
+ }
+ if (mainDataHeader.version >= 0) {
+
+ var decoder1 = decoder0.decodePointer(8, true);
+ result.declData = DeclarationData.decode(decoder1);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ var decoder1 = decoder0.decodePointer(16, false);
+ result.parameters = MojomStruct.decode(decoder1);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ var decoder1 = decoder0.decodePointer(24, true);
+ result.responseParams = MojomStruct.decode(decoder1);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.ordinal = decoder0.decodeUint32(32);
+ }
+ return result;
+ }
+
+ void encode(bindings.Encoder encoder) {
+ var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
+
+ encoder0.encodeStruct(declData, 8, true);
+
+ encoder0.encodeStruct(parameters, 16, false);
+
+ encoder0.encodeStruct(responseParams, 24, true);
+
+ encoder0.encodeUint32(ordinal, 32);
+ }
+
+ String toString() {
+ return "MojomMethod("
+ "declData: $declData" ", "
+ "parameters: $parameters" ", "
+ "responseParams: $responseParams" ", "
+ "ordinal: $ordinal" ")";
+ }
+
+ Map toJson() {
+ Map map = new Map();
+ map["declData"] = declData;
+ map["parameters"] = parameters;
+ map["responseParams"] = responseParams;
+ map["ordinal"] = ordinal;
+ return map;
+ }
+}
+
+MojomStruct _mojom_types_MojomMethod__() {
+ return new MojomStruct()
+ ..declData = (new DeclarationData()..shortName = 'MojomMethod')
+ ..fields = <StructField>[
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'DeclData')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+ ..nullable = true
+
+
+ ..identifier = '_mojom_types_DeclarationData__'
+ ..typeKey = '_mojom_types_DeclarationData__'
+ )),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'Parameters')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_MojomStruct__'
+ ..typeKey = '_mojom_types_MojomStruct__'
+ )),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'ResponseParams')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+ ..nullable = true
+
+
+ ..identifier = '_mojom_types_MojomStruct__'
+ ..typeKey = '_mojom_types_MojomStruct__'
+ )),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'Ordinal')
+ ..type = (new Type()..simpleType = SimpleType.UINT32),
+ ];
+}
+
+
+class MojomInterface extends bindings.Struct {
+ static const List<bindings.StructDataHeader> kVersions = const [
+ const bindings.StructDataHeader(32, 0)
+ ];
+ DeclarationData declData = null;
+ String interfaceName = null;
+ Map<int, MojomMethod> methods = null;
+
+ MojomInterface() : super(kVersions.last.size);
+
+ static MojomInterface deserialize(bindings.Message message) {
+ var decoder = new bindings.Decoder(message);
+ var result = decode(decoder);
+ if (decoder.excessHandles != null) {
+ decoder.excessHandles.forEach((h) => h.close());
+ }
+ return result;
+ }
+
+ static MojomInterface decode(bindings.Decoder decoder0) {
+ if (decoder0 == null) {
+ return null;
+ }
+ MojomInterface result = new MojomInterface();
+
+ var mainDataHeader = decoder0.decodeStructDataHeader();
+ if (mainDataHeader.version <= kVersions.last.version) {
+ // Scan in reverse order to optimize for more recent versions.
+ for (int i = kVersions.length - 1; i >= 0; --i) {
+ if (mainDataHeader.version >= kVersions[i].version) {
+ if (mainDataHeader.size == kVersions[i].size) {
+ // Found a match.
+ break;
+ }
+ throw new bindings.MojoCodecError(
+ 'Header size doesn\'t correspond to known version size.');
+ }
+ }
+ } else if (mainDataHeader.size < kVersions.last.size) {
+ throw new bindings.MojoCodecError(
+ 'Message newer than the last known version cannot be shorter than '
+ 'required by the last known version.');
+ }
+ if (mainDataHeader.version >= 0) {
+
+ var decoder1 = decoder0.decodePointer(8, true);
+ result.declData = DeclarationData.decode(decoder1);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.interfaceName = decoder0.decodeString(16, false);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ var decoder1 = decoder0.decodePointer(24, false);
+ {
+ decoder1.decodeDataHeaderForMap();
+ List<int> keys0;
+ List<MojomMethod> values0;
+ {
+
+ keys0 = decoder1.decodeUint32Array(bindings.ArrayDataHeader.kHeaderSize, bindings.kNothingNullable, bindings.kUnspecifiedArrayLength);
+ }
+ {
+
+ var decoder2 = decoder1.decodePointer(bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize, false);
+ {
+ var si2 = decoder2.decodeDataHeaderForPointerArray(keys0.length);
+ values0 = new List<MojomMethod>(si2.numElements);
+ for (int i2 = 0; i2 < si2.numElements; ++i2) {
+
+ var decoder3 = decoder2.decodePointer(bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize * i2, false);
+ values0[i2] = MojomMethod.decode(decoder3);
+ }
+ }
+ }
+ result.methods = new Map<int, MojomMethod>.fromIterables(
+ keys0, values0);
+ }
+ }
+ return result;
+ }
+
+ void encode(bindings.Encoder encoder) {
+ var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
+
+ encoder0.encodeStruct(declData, 8, true);
+
+ encoder0.encodeString(interfaceName, 16, false);
+
+ if (methods == null) {
+ encoder0.encodeNullPointer(24, false);
+ } else {
+ var encoder1 = encoder0.encoderForMap(24);
+ int size0 = methods.length;
+ var keys0 = methods.keys.toList();
+ var values0 = methods.values.toList();
+
+ encoder1.encodeUint32Array(keys0, bindings.ArrayDataHeader.kHeaderSize, bindings.kNothingNullable, bindings.kUnspecifiedArrayLength);
+
+ {
+ var encoder2 = encoder1.encodePointerArray(values0.length, bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize, bindings.kUnspecifiedArrayLength);
+ for (int i1 = 0; i1 < values0.length; ++i1) {
+
+ encoder2.encodeStruct(values0[i1], bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize * i1, false);
+ }
+ }
+ }
+ }
+
+ String toString() {
+ return "MojomInterface("
+ "declData: $declData" ", "
+ "interfaceName: $interfaceName" ", "
+ "methods: $methods" ")";
+ }
+
+ Map toJson() {
+ Map map = new Map();
+ map["declData"] = declData;
+ map["interfaceName"] = interfaceName;
+ map["methods"] = methods;
+ return map;
+ }
+}
+
+MojomStruct _mojom_types_MojomInterface__() {
+ return new MojomStruct()
+ ..declData = (new DeclarationData()..shortName = 'MojomInterface')
+ ..fields = <StructField>[
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'DeclData')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+ ..nullable = true
+
+
+ ..identifier = '_mojom_types_DeclarationData__'
+ ..typeKey = '_mojom_types_DeclarationData__'
+ )),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'InterfaceName')
+ ..type = (new Type()
+..stringType = (new StringType()..nullable = false)),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'Methods')
+ ..type = (new Type()..mapType = (new MapType()
+ ..keyType = (new Type()..simpleType = SimpleType.UINT32)
+ ..valueType = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_MojomMethod__'
+ ..typeKey = '_mojom_types_MojomMethod__'
+ )))),
+ ];
+}
+
+
+class UserValueReference extends bindings.Struct {
+ static const List<bindings.StructDataHeader> kVersions = const [
+ const bindings.StructDataHeader(40, 0)
+ ];
+ String identifier = null;
+ String valueKey = null;
+ Value resolvedConcreteValue = null;
+
+ UserValueReference() : super(kVersions.last.size);
+
+ static UserValueReference deserialize(bindings.Message message) {
+ var decoder = new bindings.Decoder(message);
+ var result = decode(decoder);
+ if (decoder.excessHandles != null) {
+ decoder.excessHandles.forEach((h) => h.close());
+ }
+ return result;
+ }
+
+ static UserValueReference decode(bindings.Decoder decoder0) {
+ if (decoder0 == null) {
+ return null;
+ }
+ UserValueReference result = new UserValueReference();
+
+ var mainDataHeader = decoder0.decodeStructDataHeader();
+ if (mainDataHeader.version <= kVersions.last.version) {
+ // Scan in reverse order to optimize for more recent versions.
+ for (int i = kVersions.length - 1; i >= 0; --i) {
+ if (mainDataHeader.version >= kVersions[i].version) {
+ if (mainDataHeader.size == kVersions[i].size) {
+ // Found a match.
+ break;
+ }
+ throw new bindings.MojoCodecError(
+ 'Header size doesn\'t correspond to known version size.');
+ }
+ }
+ } else if (mainDataHeader.size < kVersions.last.size) {
+ throw new bindings.MojoCodecError(
+ 'Message newer than the last known version cannot be shorter than '
+ 'required by the last known version.');
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.identifier = decoder0.decodeString(8, false);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.valueKey = decoder0.decodeString(16, true);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.resolvedConcreteValue = Value.decode(decoder0, 24);
+ }
+ return result;
+ }
+
+ void encode(bindings.Encoder encoder) {
+ var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
+
+ encoder0.encodeString(identifier, 8, false);
+
+ encoder0.encodeString(valueKey, 16, true);
+
+ encoder0.encodeUnion(resolvedConcreteValue, 24, true);
+ }
+
+ String toString() {
+ return "UserValueReference("
+ "identifier: $identifier" ", "
+ "valueKey: $valueKey" ", "
+ "resolvedConcreteValue: $resolvedConcreteValue" ")";
+ }
+
+ Map toJson() {
+ Map map = new Map();
+ map["identifier"] = identifier;
+ map["valueKey"] = valueKey;
+ map["resolvedConcreteValue"] = resolvedConcreteValue;
+ return map;
+ }
+}
+
+MojomStruct _mojom_types_UserValueReference__() {
+ return new MojomStruct()
+ ..declData = (new DeclarationData()..shortName = 'UserValueReference')
+ ..fields = <StructField>[
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'Identifier')
+ ..type = (new Type()
+..stringType = (new StringType()..nullable = false)),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'ValueKey')
+ ..type = (new Type()
+..stringType = (new StringType()..nullable = true)),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'ResolvedConcreteValue')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+ ..nullable = true
+
+
+ ..identifier = '_mojom_types_Value__'
+ ..typeKey = '_mojom_types_Value__'
+ )),
+ ];
+}
+
+
+class DeclaredConstant extends bindings.Struct {
+ static const List<bindings.StructDataHeader> kVersions = const [
+ const bindings.StructDataHeader(48, 0)
+ ];
+ DeclarationData declData = null;
+ Type type = null;
+ Value value = null;
+
+ DeclaredConstant() : super(kVersions.last.size);
+
+ static DeclaredConstant deserialize(bindings.Message message) {
+ var decoder = new bindings.Decoder(message);
+ var result = decode(decoder);
+ if (decoder.excessHandles != null) {
+ decoder.excessHandles.forEach((h) => h.close());
+ }
+ return result;
+ }
+
+ static DeclaredConstant decode(bindings.Decoder decoder0) {
+ if (decoder0 == null) {
+ return null;
+ }
+ DeclaredConstant result = new DeclaredConstant();
+
+ var mainDataHeader = decoder0.decodeStructDataHeader();
+ if (mainDataHeader.version <= kVersions.last.version) {
+ // Scan in reverse order to optimize for more recent versions.
+ for (int i = kVersions.length - 1; i >= 0; --i) {
+ if (mainDataHeader.version >= kVersions[i].version) {
+ if (mainDataHeader.size == kVersions[i].size) {
+ // Found a match.
+ break;
+ }
+ throw new bindings.MojoCodecError(
+ 'Header size doesn\'t correspond to known version size.');
+ }
+ }
+ } else if (mainDataHeader.size < kVersions.last.size) {
+ throw new bindings.MojoCodecError(
+ 'Message newer than the last known version cannot be shorter than '
+ 'required by the last known version.');
+ }
+ if (mainDataHeader.version >= 0) {
+
+ var decoder1 = decoder0.decodePointer(8, false);
+ result.declData = DeclarationData.decode(decoder1);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.type = Type.decode(decoder0, 16);
+ if (result.type == null) {
+ throw new bindings.MojoCodecError(
+ 'Trying to decode null union for non-nullable Type.');
+ }
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.value = Value.decode(decoder0, 32);
+ if (result.value == null) {
+ throw new bindings.MojoCodecError(
+ 'Trying to decode null union for non-nullable Value.');
+ }
+ }
+ return result;
+ }
+
+ void encode(bindings.Encoder encoder) {
+ var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
+
+ encoder0.encodeStruct(declData, 8, false);
+
+ encoder0.encodeUnion(type, 16, false);
+
+ encoder0.encodeUnion(value, 32, false);
+ }
+
+ String toString() {
+ return "DeclaredConstant("
+ "declData: $declData" ", "
+ "type: $type" ", "
+ "value: $value" ")";
+ }
+
+ Map toJson() {
+ Map map = new Map();
+ map["declData"] = declData;
+ map["type"] = type;
+ map["value"] = value;
+ return map;
+ }
+}
+
+MojomStruct _mojom_types_DeclaredConstant__() {
+ return new MojomStruct()
+ ..declData = (new DeclarationData()..shortName = 'DeclaredConstant')
+ ..fields = <StructField>[
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'DeclData')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_DeclarationData__'
+ ..typeKey = '_mojom_types_DeclarationData__'
+ )),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'Type')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_Type__'
+ ..typeKey = '_mojom_types_Type__'
+ )),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'Value')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_Value__'
+ ..typeKey = '_mojom_types_Value__'
+ )),
+ ];
+}
+
+
+class DeclarationData extends bindings.Struct {
+ static const List<bindings.StructDataHeader> kVersions = const [
+ const bindings.StructDataHeader(72, 0)
+ ];
+ List<Attribute> attributes = null;
+ int minVersion = -1;
+ int declaredOrdinal = -1;
+ String shortName = null;
+ String fullIdentifier = null;
+ int declarationOrder = -1;
+ SourceFileInfo sourceFileInfo = null;
+ ContainedDeclarations containedDeclarations = null;
+ String containerTypeKey = null;
+
+ DeclarationData() : super(kVersions.last.size);
+
+ static DeclarationData deserialize(bindings.Message message) {
+ var decoder = new bindings.Decoder(message);
+ var result = decode(decoder);
+ if (decoder.excessHandles != null) {
+ decoder.excessHandles.forEach((h) => h.close());
+ }
+ return result;
+ }
+
+ static DeclarationData decode(bindings.Decoder decoder0) {
+ if (decoder0 == null) {
+ return null;
+ }
+ DeclarationData result = new DeclarationData();
+
+ var mainDataHeader = decoder0.decodeStructDataHeader();
+ if (mainDataHeader.version <= kVersions.last.version) {
+ // Scan in reverse order to optimize for more recent versions.
+ for (int i = kVersions.length - 1; i >= 0; --i) {
+ if (mainDataHeader.version >= kVersions[i].version) {
+ if (mainDataHeader.size == kVersions[i].size) {
+ // Found a match.
+ break;
+ }
+ throw new bindings.MojoCodecError(
+ 'Header size doesn\'t correspond to known version size.');
+ }
+ }
+ } else if (mainDataHeader.size < kVersions.last.size) {
+ throw new bindings.MojoCodecError(
+ 'Message newer than the last known version cannot be shorter than '
+ 'required by the last known version.');
+ }
+ if (mainDataHeader.version >= 0) {
+
+ var decoder1 = decoder0.decodePointer(8, true);
+ if (decoder1 == null) {
+ result.attributes = null;
+ } else {
+ var si1 = decoder1.decodeDataHeaderForPointerArray(bindings.kUnspecifiedArrayLength);
+ result.attributes = new List<Attribute>(si1.numElements);
+ for (int i1 = 0; i1 < si1.numElements; ++i1) {
+
+ var decoder2 = decoder1.decodePointer(bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize * i1, false);
+ result.attributes[i1] = Attribute.decode(decoder2);
+ }
+ }
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.minVersion = decoder0.decodeInt32(16);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.declaredOrdinal = decoder0.decodeInt32(20);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.shortName = decoder0.decodeString(24, true);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.fullIdentifier = decoder0.decodeString(32, true);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.declarationOrder = decoder0.decodeInt32(40);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ var decoder1 = decoder0.decodePointer(48, true);
+ result.sourceFileInfo = SourceFileInfo.decode(decoder1);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ var decoder1 = decoder0.decodePointer(56, true);
+ result.containedDeclarations = ContainedDeclarations.decode(decoder1);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.containerTypeKey = decoder0.decodeString(64, true);
+ }
+ return result;
+ }
+
+ void encode(bindings.Encoder encoder) {
+ var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
+
+ if (attributes == null) {
+ encoder0.encodeNullPointer(8, true);
+ } else {
+ var encoder1 = encoder0.encodePointerArray(attributes.length, 8, bindings.kUnspecifiedArrayLength);
+ for (int i0 = 0; i0 < attributes.length; ++i0) {
+
+ encoder1.encodeStruct(attributes[i0], bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize * i0, false);
+ }
+ }
+
+ encoder0.encodeInt32(minVersion, 16);
+
+ encoder0.encodeInt32(declaredOrdinal, 20);
+
+ encoder0.encodeString(shortName, 24, true);
+
+ encoder0.encodeString(fullIdentifier, 32, true);
+
+ encoder0.encodeInt32(declarationOrder, 40);
+
+ encoder0.encodeStruct(sourceFileInfo, 48, true);
+
+ encoder0.encodeStruct(containedDeclarations, 56, true);
+
+ encoder0.encodeString(containerTypeKey, 64, true);
+ }
+
+ String toString() {
+ return "DeclarationData("
+ "attributes: $attributes" ", "
+ "minVersion: $minVersion" ", "
+ "declaredOrdinal: $declaredOrdinal" ", "
+ "shortName: $shortName" ", "
+ "fullIdentifier: $fullIdentifier" ", "
+ "declarationOrder: $declarationOrder" ", "
+ "sourceFileInfo: $sourceFileInfo" ", "
+ "containedDeclarations: $containedDeclarations" ", "
+ "containerTypeKey: $containerTypeKey" ")";
+ }
+
+ Map toJson() {
+ Map map = new Map();
+ map["attributes"] = attributes;
+ map["minVersion"] = minVersion;
+ map["declaredOrdinal"] = declaredOrdinal;
+ map["shortName"] = shortName;
+ map["fullIdentifier"] = fullIdentifier;
+ map["declarationOrder"] = declarationOrder;
+ map["sourceFileInfo"] = sourceFileInfo;
+ map["containedDeclarations"] = containedDeclarations;
+ map["containerTypeKey"] = containerTypeKey;
+ return map;
+ }
+}
+
+MojomStruct _mojom_types_DeclarationData__() {
+ return new MojomStruct()
+ ..declData = (new DeclarationData()..shortName = 'DeclarationData')
+ ..fields = <StructField>[
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'Attributes')
+ ..type = (new Type()..arrayType = (new ArrayType()
+ ..nullable = true
+
+ ..elementType = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_Attribute__'
+ ..typeKey = '_mojom_types_Attribute__'
+ )))),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'MinVersion')
+ ..type = (new Type()..simpleType = SimpleType.INT32),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'ShortName')
+ ..type = (new Type()
+..stringType = (new StringType()..nullable = true)),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'FullIdentifier')
+ ..type = (new Type()
+..stringType = (new StringType()..nullable = true)),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'DeclaredOrdinal')
+ ..type = (new Type()..simpleType = SimpleType.INT32),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'DeclarationOrder')
+ ..type = (new Type()..simpleType = SimpleType.INT32),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'SourceFileInfo')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+ ..nullable = true
+
+
+ ..identifier = '_mojom_types_SourceFileInfo__'
+ ..typeKey = '_mojom_types_SourceFileInfo__'
+ )),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'ContainedDeclarations')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+ ..nullable = true
+
+
+ ..identifier = '_mojom_types_ContainedDeclarations__'
+ ..typeKey = '_mojom_types_ContainedDeclarations__'
+ )),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'ContainerTypeKey')
+ ..type = (new Type()
+..stringType = (new StringType()..nullable = true)),
+ ];
+}
+
+
+class SourceFileInfo extends bindings.Struct {
+ static const List<bindings.StructDataHeader> kVersions = const [
+ const bindings.StructDataHeader(24, 0)
+ ];
+ String fileName = null;
+ int lineNumber = 0;
+ int columnNumber = 0;
+
+ SourceFileInfo() : super(kVersions.last.size);
+
+ static SourceFileInfo deserialize(bindings.Message message) {
+ var decoder = new bindings.Decoder(message);
+ var result = decode(decoder);
+ if (decoder.excessHandles != null) {
+ decoder.excessHandles.forEach((h) => h.close());
+ }
+ return result;
+ }
+
+ static SourceFileInfo decode(bindings.Decoder decoder0) {
+ if (decoder0 == null) {
+ return null;
+ }
+ SourceFileInfo result = new SourceFileInfo();
+
+ var mainDataHeader = decoder0.decodeStructDataHeader();
+ if (mainDataHeader.version <= kVersions.last.version) {
+ // Scan in reverse order to optimize for more recent versions.
+ for (int i = kVersions.length - 1; i >= 0; --i) {
+ if (mainDataHeader.version >= kVersions[i].version) {
+ if (mainDataHeader.size == kVersions[i].size) {
+ // Found a match.
+ break;
+ }
+ throw new bindings.MojoCodecError(
+ 'Header size doesn\'t correspond to known version size.');
+ }
+ }
+ } else if (mainDataHeader.size < kVersions.last.size) {
+ throw new bindings.MojoCodecError(
+ 'Message newer than the last known version cannot be shorter than '
+ 'required by the last known version.');
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.fileName = decoder0.decodeString(8, false);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.lineNumber = decoder0.decodeUint32(16);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.columnNumber = decoder0.decodeUint32(20);
+ }
+ return result;
+ }
+
+ void encode(bindings.Encoder encoder) {
+ var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
+
+ encoder0.encodeString(fileName, 8, false);
+
+ encoder0.encodeUint32(lineNumber, 16);
+
+ encoder0.encodeUint32(columnNumber, 20);
+ }
+
+ String toString() {
+ return "SourceFileInfo("
+ "fileName: $fileName" ", "
+ "lineNumber: $lineNumber" ", "
+ "columnNumber: $columnNumber" ")";
+ }
+
+ Map toJson() {
+ Map map = new Map();
+ map["fileName"] = fileName;
+ map["lineNumber"] = lineNumber;
+ map["columnNumber"] = columnNumber;
+ return map;
+ }
+}
+
+MojomStruct _mojom_types_SourceFileInfo__() {
+ return new MojomStruct()
+ ..declData = (new DeclarationData()..shortName = 'SourceFileInfo')
+ ..fields = <StructField>[
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'FileName')
+ ..type = (new Type()
+..stringType = (new StringType()..nullable = false)),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'LineNumber')
+ ..type = (new Type()..simpleType = SimpleType.UINT32),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'ColumnNumber')
+ ..type = (new Type()..simpleType = SimpleType.UINT32),
+ ];
+}
+
+
+class ContainedDeclarations extends bindings.Struct {
+ static const List<bindings.StructDataHeader> kVersions = const [
+ const bindings.StructDataHeader(24, 0)
+ ];
+ List<String> enums = null;
+ List<String> constants = null;
+
+ ContainedDeclarations() : super(kVersions.last.size);
+
+ static ContainedDeclarations deserialize(bindings.Message message) {
+ var decoder = new bindings.Decoder(message);
+ var result = decode(decoder);
+ if (decoder.excessHandles != null) {
+ decoder.excessHandles.forEach((h) => h.close());
+ }
+ return result;
+ }
+
+ static ContainedDeclarations decode(bindings.Decoder decoder0) {
+ if (decoder0 == null) {
+ return null;
+ }
+ ContainedDeclarations result = new ContainedDeclarations();
+
+ var mainDataHeader = decoder0.decodeStructDataHeader();
+ if (mainDataHeader.version <= kVersions.last.version) {
+ // Scan in reverse order to optimize for more recent versions.
+ for (int i = kVersions.length - 1; i >= 0; --i) {
+ if (mainDataHeader.version >= kVersions[i].version) {
+ if (mainDataHeader.size == kVersions[i].size) {
+ // Found a match.
+ break;
+ }
+ throw new bindings.MojoCodecError(
+ 'Header size doesn\'t correspond to known version size.');
+ }
+ }
+ } else if (mainDataHeader.size < kVersions.last.size) {
+ throw new bindings.MojoCodecError(
+ 'Message newer than the last known version cannot be shorter than '
+ 'required by the last known version.');
+ }
+ if (mainDataHeader.version >= 0) {
+
+ var decoder1 = decoder0.decodePointer(8, true);
+ if (decoder1 == null) {
+ result.enums = null;
+ } else {
+ var si1 = decoder1.decodeDataHeaderForPointerArray(bindings.kUnspecifiedArrayLength);
+ result.enums = new List<String>(si1.numElements);
+ for (int i1 = 0; i1 < si1.numElements; ++i1) {
+
+ result.enums[i1] = decoder1.decodeString(bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize * i1, false);
+ }
+ }
+ }
+ if (mainDataHeader.version >= 0) {
+
+ var decoder1 = decoder0.decodePointer(16, true);
+ if (decoder1 == null) {
+ result.constants = null;
+ } else {
+ var si1 = decoder1.decodeDataHeaderForPointerArray(bindings.kUnspecifiedArrayLength);
+ result.constants = new List<String>(si1.numElements);
+ for (int i1 = 0; i1 < si1.numElements; ++i1) {
+
+ result.constants[i1] = decoder1.decodeString(bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize * i1, false);
+ }
+ }
+ }
+ return result;
+ }
+
+ void encode(bindings.Encoder encoder) {
+ var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
+
+ if (enums == null) {
+ encoder0.encodeNullPointer(8, true);
+ } else {
+ var encoder1 = encoder0.encodePointerArray(enums.length, 8, bindings.kUnspecifiedArrayLength);
+ for (int i0 = 0; i0 < enums.length; ++i0) {
+
+ encoder1.encodeString(enums[i0], bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize * i0, false);
+ }
+ }
+
+ if (constants == null) {
+ encoder0.encodeNullPointer(16, true);
+ } else {
+ var encoder1 = encoder0.encodePointerArray(constants.length, 16, bindings.kUnspecifiedArrayLength);
+ for (int i0 = 0; i0 < constants.length; ++i0) {
+
+ encoder1.encodeString(constants[i0], bindings.ArrayDataHeader.kHeaderSize + bindings.kPointerSize * i0, false);
+ }
+ }
+ }
+
+ String toString() {
+ return "ContainedDeclarations("
+ "enums: $enums" ", "
+ "constants: $constants" ")";
+ }
+
+ Map toJson() {
+ Map map = new Map();
+ map["enums"] = enums;
+ map["constants"] = constants;
+ return map;
+ }
+}
+
+MojomStruct _mojom_types_ContainedDeclarations__() {
+ return new MojomStruct()
+ ..declData = (new DeclarationData()..shortName = 'ContainedDeclarations')
+ ..fields = <StructField>[
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'Enums')
+ ..type = (new Type()..arrayType = (new ArrayType()
+ ..nullable = true
+
+ ..elementType = (new Type()
+..stringType = (new StringType()..nullable = false)))),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'Constants')
+ ..type = (new Type()..arrayType = (new ArrayType()
+ ..nullable = true
+
+ ..elementType = (new Type()
+..stringType = (new StringType()..nullable = false)))),
+ ];
+}
+
+
+class Attribute extends bindings.Struct {
+ static const List<bindings.StructDataHeader> kVersions = const [
+ const bindings.StructDataHeader(24, 0)
+ ];
+ String key = null;
+ String value = null;
+
+ Attribute() : super(kVersions.last.size);
+
+ static Attribute deserialize(bindings.Message message) {
+ var decoder = new bindings.Decoder(message);
+ var result = decode(decoder);
+ if (decoder.excessHandles != null) {
+ decoder.excessHandles.forEach((h) => h.close());
+ }
+ return result;
+ }
+
+ static Attribute decode(bindings.Decoder decoder0) {
+ if (decoder0 == null) {
+ return null;
+ }
+ Attribute result = new Attribute();
+
+ var mainDataHeader = decoder0.decodeStructDataHeader();
+ if (mainDataHeader.version <= kVersions.last.version) {
+ // Scan in reverse order to optimize for more recent versions.
+ for (int i = kVersions.length - 1; i >= 0; --i) {
+ if (mainDataHeader.version >= kVersions[i].version) {
+ if (mainDataHeader.size == kVersions[i].size) {
+ // Found a match.
+ break;
+ }
+ throw new bindings.MojoCodecError(
+ 'Header size doesn\'t correspond to known version size.');
+ }
+ }
+ } else if (mainDataHeader.size < kVersions.last.size) {
+ throw new bindings.MojoCodecError(
+ 'Message newer than the last known version cannot be shorter than '
+ 'required by the last known version.');
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.key = decoder0.decodeString(8, false);
+ }
+ if (mainDataHeader.version >= 0) {
+
+ result.value = decoder0.decodeString(16, false);
+ }
+ return result;
+ }
+
+ void encode(bindings.Encoder encoder) {
+ var encoder0 = encoder.getStructEncoderAtOffset(kVersions.last);
+
+ encoder0.encodeString(key, 8, false);
+
+ encoder0.encodeString(value, 16, false);
+ }
+
+ String toString() {
+ return "Attribute("
+ "key: $key" ", "
+ "value: $value" ")";
+ }
+
+ Map toJson() {
+ Map map = new Map();
+ map["key"] = key;
+ map["value"] = value;
+ return map;
+ }
+}
+
+MojomStruct _mojom_types_Attribute__() {
+ return new MojomStruct()
+ ..declData = (new DeclarationData()..shortName = 'Attribute')
+ ..fields = <StructField>[
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'Key')
+ ..type = (new Type()
+..stringType = (new StringType()..nullable = false)),
+
+ new StructField()
+ ..declData = (new DeclarationData()..shortName = 'Value')
+ ..type = (new Type()
+..stringType = (new StringType()..nullable = false)),
+ ];
+}
+
+
+
+enum TypeTag {
+ simpleType,
+ stringType,
+ arrayType,
+ mapType,
+ handleType,
+ typeReference,
+ unknown
+}
+
+class Type extends bindings.Union {
+ static final _tag_to_int = const {
+ TypeTag.simpleType: 0,
+ TypeTag.stringType: 1,
+ TypeTag.arrayType: 2,
+ TypeTag.mapType: 3,
+ TypeTag.handleType: 4,
+ TypeTag.typeReference: 5,
+ };
+
+ static final _int_to_tag = const {
+ 0: TypeTag.simpleType,
+ 1: TypeTag.stringType,
+ 2: TypeTag.arrayType,
+ 3: TypeTag.mapType,
+ 4: TypeTag.handleType,
+ 5: TypeTag.typeReference,
+ };
+
+ var _data;
+ TypeTag _tag = TypeTag.unknown;
+
+ TypeTag get tag => _tag;
+ SimpleType get simpleType {
+ if (_tag != TypeTag.simpleType) {
+ throw new bindings.UnsetUnionTagError(_tag, TypeTag.simpleType);
+ }
+ return _data;
+ }
+
+ set simpleType(SimpleType value) {
+ _tag = TypeTag.simpleType;
+ _data = value;
+ }
+ StringType get stringType {
+ if (_tag != TypeTag.stringType) {
+ throw new bindings.UnsetUnionTagError(_tag, TypeTag.stringType);
+ }
+ return _data;
+ }
+
+ set stringType(StringType value) {
+ _tag = TypeTag.stringType;
+ _data = value;
+ }
+ ArrayType get arrayType {
+ if (_tag != TypeTag.arrayType) {
+ throw new bindings.UnsetUnionTagError(_tag, TypeTag.arrayType);
+ }
+ return _data;
+ }
+
+ set arrayType(ArrayType value) {
+ _tag = TypeTag.arrayType;
+ _data = value;
+ }
+ MapType get mapType {
+ if (_tag != TypeTag.mapType) {
+ throw new bindings.UnsetUnionTagError(_tag, TypeTag.mapType);
+ }
+ return _data;
+ }
+
+ set mapType(MapType value) {
+ _tag = TypeTag.mapType;
+ _data = value;
+ }
+ HandleType get handleType {
+ if (_tag != TypeTag.handleType) {
+ throw new bindings.UnsetUnionTagError(_tag, TypeTag.handleType);
+ }
+ return _data;
+ }
+
+ set handleType(HandleType value) {
+ _tag = TypeTag.handleType;
+ _data = value;
+ }
+ TypeReference get typeReference {
+ if (_tag != TypeTag.typeReference) {
+ throw new bindings.UnsetUnionTagError(_tag, TypeTag.typeReference);
+ }
+ return _data;
+ }
+
+ set typeReference(TypeReference value) {
+ _tag = TypeTag.typeReference;
+ _data = value;
+ }
+
+ static Type decode(bindings.Decoder decoder0, int offset) {
+ int size = decoder0.decodeUint32(offset);
+ if (size == 0) {
+ return null;
+ }
+ Type result = new Type();
+
+ // TODO(azani): Handle unknown union member. An assert breaks validation_unittest.
+ TypeTag tag = _int_to_tag[decoder0.decodeUint32(offset + 4)];
+ switch (tag) {
+ case TypeTag.simpleType:
+
+ result.simpleType = SimpleType.decode(decoder0, offset + 8);
+ if (result.simpleType == null) {
+ throw new bindings.MojoCodecError(
+ 'Trying to decode null union for non-nullable SimpleType.');
+ }
+ break;
+ case TypeTag.stringType:
+
+ var decoder1 = decoder0.decodePointer(offset + 8, false);
+ result.stringType = StringType.decode(decoder1);
+ break;
+ case TypeTag.arrayType:
+
+ var decoder1 = decoder0.decodePointer(offset + 8, false);
+ result.arrayType = ArrayType.decode(decoder1);
+ break;
+ case TypeTag.mapType:
+
+ var decoder1 = decoder0.decodePointer(offset + 8, false);
+ result.mapType = MapType.decode(decoder1);
+ break;
+ case TypeTag.handleType:
+
+ var decoder1 = decoder0.decodePointer(offset + 8, false);
+ result.handleType = HandleType.decode(decoder1);
+ break;
+ case TypeTag.typeReference:
+
+ var decoder1 = decoder0.decodePointer(offset + 8, false);
+ result.typeReference = TypeReference.decode(decoder1);
+ break;
+ default:
+ break;
+ }
+
+ return result;
+ }
+
+ void encode(bindings.Encoder encoder0, int offset) {
+ // TODO(azani): Error when trying to encode an unknown member.
+ encoder0.encodeUint32(16, offset);
+ encoder0.encodeUint32(_tag_to_int[_tag], offset + 4);
+ switch (_tag) {
+ case TypeTag.simpleType:
+
+ encoder0.encodeEnum(simpleType, offset + 8);
+ break;
+ case TypeTag.stringType:
+
+ encoder0.encodeStruct(stringType, offset + 8, false);
+ break;
+ case TypeTag.arrayType:
+
+ encoder0.encodeStruct(arrayType, offset + 8, false);
+ break;
+ case TypeTag.mapType:
+
+ encoder0.encodeStruct(mapType, offset + 8, false);
+ break;
+ case TypeTag.handleType:
+
+ encoder0.encodeStruct(handleType, offset + 8, false);
+ break;
+ case TypeTag.typeReference:
+
+ encoder0.encodeStruct(typeReference, offset + 8, false);
+ break;
+ default:
+ break;
+ }
+ }
+
+ String toString() {
+ String result = "Type(";
+ switch (_tag) {
+ case TypeTag.simpleType:
+ result += "simpleType";
+ break;
+ case TypeTag.stringType:
+ result += "stringType";
+ break;
+ case TypeTag.arrayType:
+ result += "arrayType";
+ break;
+ case TypeTag.mapType:
+ result += "mapType";
+ break;
+ case TypeTag.handleType:
+ result += "handleType";
+ break;
+ case TypeTag.typeReference:
+ result += "typeReference";
+ break;
+ default:
+ result += "unknown";
+ }
+ result += ": $_data)";
+ return result;
+ }
+}
+
+MojomUnion _mojom_types_Type__() {
+ return new MojomUnion()
+ ..declData = (new DeclarationData()..shortName = 'Type')
+ ..fields = <UnionField>[
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'SimpleType')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_SimpleType__'
+ ..typeKey = '_mojom_types_SimpleType__'
+ ))
+ ..tag = 0,
+
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'StringType')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_StringType__'
+ ..typeKey = '_mojom_types_StringType__'
+ ))
+ ..tag = 1,
+
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'ArrayType')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_ArrayType__'
+ ..typeKey = '_mojom_types_ArrayType__'
+ ))
+ ..tag = 2,
+
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'MapType')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_MapType__'
+ ..typeKey = '_mojom_types_MapType__'
+ ))
+ ..tag = 3,
+
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'HandleType')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_HandleType__'
+ ..typeKey = '_mojom_types_HandleType__'
+ ))
+ ..tag = 4,
+
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'TypeReference')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_TypeReference__'
+ ..typeKey = '_mojom_types_TypeReference__'
+ ))
+ ..tag = 5,
+ ];
+}
+
+
+enum UserDefinedTypeTag {
+ enumType,
+ structType,
+ unionType,
+ interfaceType,
+ unknown
+}
+
+class UserDefinedType extends bindings.Union {
+ static final _tag_to_int = const {
+ UserDefinedTypeTag.enumType: 0,
+ UserDefinedTypeTag.structType: 1,
+ UserDefinedTypeTag.unionType: 2,
+ UserDefinedTypeTag.interfaceType: 3,
+ };
+
+ static final _int_to_tag = const {
+ 0: UserDefinedTypeTag.enumType,
+ 1: UserDefinedTypeTag.structType,
+ 2: UserDefinedTypeTag.unionType,
+ 3: UserDefinedTypeTag.interfaceType,
+ };
+
+ var _data;
+ UserDefinedTypeTag _tag = UserDefinedTypeTag.unknown;
+
+ UserDefinedTypeTag get tag => _tag;
+ MojomEnum get enumType {
+ if (_tag != UserDefinedTypeTag.enumType) {
+ throw new bindings.UnsetUnionTagError(_tag, UserDefinedTypeTag.enumType);
+ }
+ return _data;
+ }
+
+ set enumType(MojomEnum value) {
+ _tag = UserDefinedTypeTag.enumType;
+ _data = value;
+ }
+ MojomStruct get structType {
+ if (_tag != UserDefinedTypeTag.structType) {
+ throw new bindings.UnsetUnionTagError(_tag, UserDefinedTypeTag.structType);
+ }
+ return _data;
+ }
+
+ set structType(MojomStruct value) {
+ _tag = UserDefinedTypeTag.structType;
+ _data = value;
+ }
+ MojomUnion get unionType {
+ if (_tag != UserDefinedTypeTag.unionType) {
+ throw new bindings.UnsetUnionTagError(_tag, UserDefinedTypeTag.unionType);
+ }
+ return _data;
+ }
+
+ set unionType(MojomUnion value) {
+ _tag = UserDefinedTypeTag.unionType;
+ _data = value;
+ }
+ MojomInterface get interfaceType {
+ if (_tag != UserDefinedTypeTag.interfaceType) {
+ throw new bindings.UnsetUnionTagError(_tag, UserDefinedTypeTag.interfaceType);
+ }
+ return _data;
+ }
+
+ set interfaceType(MojomInterface value) {
+ _tag = UserDefinedTypeTag.interfaceType;
+ _data = value;
+ }
+
+ static UserDefinedType decode(bindings.Decoder decoder0, int offset) {
+ int size = decoder0.decodeUint32(offset);
+ if (size == 0) {
+ return null;
+ }
+ UserDefinedType result = new UserDefinedType();
+
+ // TODO(azani): Handle unknown union member. An assert breaks validation_unittest.
+ UserDefinedTypeTag tag = _int_to_tag[decoder0.decodeUint32(offset + 4)];
+ switch (tag) {
+ case UserDefinedTypeTag.enumType:
+
+ var decoder1 = decoder0.decodePointer(offset + 8, false);
+ result.enumType = MojomEnum.decode(decoder1);
+ break;
+ case UserDefinedTypeTag.structType:
+
+ var decoder1 = decoder0.decodePointer(offset + 8, false);
+ result.structType = MojomStruct.decode(decoder1);
+ break;
+ case UserDefinedTypeTag.unionType:
+
+ var decoder1 = decoder0.decodePointer(offset + 8, false);
+ result.unionType = MojomUnion.decode(decoder1);
+ break;
+ case UserDefinedTypeTag.interfaceType:
+
+ var decoder1 = decoder0.decodePointer(offset + 8, false);
+ result.interfaceType = MojomInterface.decode(decoder1);
+ break;
+ default:
+ break;
+ }
+
+ return result;
+ }
+
+ void encode(bindings.Encoder encoder0, int offset) {
+ // TODO(azani): Error when trying to encode an unknown member.
+ encoder0.encodeUint32(16, offset);
+ encoder0.encodeUint32(_tag_to_int[_tag], offset + 4);
+ switch (_tag) {
+ case UserDefinedTypeTag.enumType:
+
+ encoder0.encodeStruct(enumType, offset + 8, false);
+ break;
+ case UserDefinedTypeTag.structType:
+
+ encoder0.encodeStruct(structType, offset + 8, false);
+ break;
+ case UserDefinedTypeTag.unionType:
+
+ encoder0.encodeStruct(unionType, offset + 8, false);
+ break;
+ case UserDefinedTypeTag.interfaceType:
+
+ encoder0.encodeStruct(interfaceType, offset + 8, false);
+ break;
+ default:
+ break;
+ }
+ }
+
+ String toString() {
+ String result = "UserDefinedType(";
+ switch (_tag) {
+ case UserDefinedTypeTag.enumType:
+ result += "enumType";
+ break;
+ case UserDefinedTypeTag.structType:
+ result += "structType";
+ break;
+ case UserDefinedTypeTag.unionType:
+ result += "unionType";
+ break;
+ case UserDefinedTypeTag.interfaceType:
+ result += "interfaceType";
+ break;
+ default:
+ result += "unknown";
+ }
+ result += ": $_data)";
+ return result;
+ }
+}
+
+MojomUnion _mojom_types_UserDefinedType__() {
+ return new MojomUnion()
+ ..declData = (new DeclarationData()..shortName = 'UserDefinedType')
+ ..fields = <UnionField>[
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'EnumType')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_MojomEnum__'
+ ..typeKey = '_mojom_types_MojomEnum__'
+ ))
+ ..tag = 0,
+
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'StructType')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_MojomStruct__'
+ ..typeKey = '_mojom_types_MojomStruct__'
+ ))
+ ..tag = 1,
+
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'UnionType')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_MojomUnion__'
+ ..typeKey = '_mojom_types_MojomUnion__'
+ ))
+ ..tag = 2,
+
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'InterfaceType')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_MojomInterface__'
+ ..typeKey = '_mojom_types_MojomInterface__'
+ ))
+ ..tag = 3,
+ ];
+}
+
+
+enum DefaultFieldValueTag {
+ value,
+ defaultKeyword,
+ unknown
+}
+
+class DefaultFieldValue extends bindings.Union {
+ static final _tag_to_int = const {
+ DefaultFieldValueTag.value: 0,
+ DefaultFieldValueTag.defaultKeyword: 1,
+ };
+
+ static final _int_to_tag = const {
+ 0: DefaultFieldValueTag.value,
+ 1: DefaultFieldValueTag.defaultKeyword,
+ };
+
+ var _data;
+ DefaultFieldValueTag _tag = DefaultFieldValueTag.unknown;
+
+ DefaultFieldValueTag get tag => _tag;
+ Value get value {
+ if (_tag != DefaultFieldValueTag.value) {
+ throw new bindings.UnsetUnionTagError(_tag, DefaultFieldValueTag.value);
+ }
+ return _data;
+ }
+
+ set value(Value value) {
+ _tag = DefaultFieldValueTag.value;
+ _data = value;
+ }
+ DefaultKeyword get defaultKeyword {
+ if (_tag != DefaultFieldValueTag.defaultKeyword) {
+ throw new bindings.UnsetUnionTagError(_tag, DefaultFieldValueTag.defaultKeyword);
+ }
+ return _data;
+ }
+
+ set defaultKeyword(DefaultKeyword value) {
+ _tag = DefaultFieldValueTag.defaultKeyword;
+ _data = value;
+ }
+
+ static DefaultFieldValue decode(bindings.Decoder decoder0, int offset) {
+ int size = decoder0.decodeUint32(offset);
+ if (size == 0) {
+ return null;
+ }
+ DefaultFieldValue result = new DefaultFieldValue();
+
+ // TODO(azani): Handle unknown union member. An assert breaks validation_unittest.
+ DefaultFieldValueTag tag = _int_to_tag[decoder0.decodeUint32(offset + 4)];
+ switch (tag) {
+ case DefaultFieldValueTag.value:
+ var decoder1 = decoder0.decodePointer(offset + 8, false);
+ result.value = Value.decode(decoder1, 0);
+ break;
+ case DefaultFieldValueTag.defaultKeyword:
+
+ var decoder1 = decoder0.decodePointer(offset + 8, false);
+ result.defaultKeyword = DefaultKeyword.decode(decoder1);
+ break;
+ default:
+ break;
+ }
+
+ return result;
+ }
+
+ void encode(bindings.Encoder encoder0, int offset) {
+ // TODO(azani): Error when trying to encode an unknown member.
+ encoder0.encodeUint32(16, offset);
+ encoder0.encodeUint32(_tag_to_int[_tag], offset + 4);
+ switch (_tag) {
+ case DefaultFieldValueTag.value:
+ encoder0.encodeNestedUnion(value, offset + 8, false);
+ break;
+ case DefaultFieldValueTag.defaultKeyword:
+
+ encoder0.encodeStruct(defaultKeyword, offset + 8, false);
+ break;
+ default:
+ break;
+ }
+ }
+
+ String toString() {
+ String result = "DefaultFieldValue(";
+ switch (_tag) {
+ case DefaultFieldValueTag.value:
+ result += "value";
+ break;
+ case DefaultFieldValueTag.defaultKeyword:
+ result += "defaultKeyword";
+ break;
+ default:
+ result += "unknown";
+ }
+ result += ": $_data)";
+ return result;
+ }
+}
+
+MojomUnion _mojom_types_DefaultFieldValue__() {
+ return new MojomUnion()
+ ..declData = (new DeclarationData()..shortName = 'DefaultFieldValue')
+ ..fields = <UnionField>[
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'Value')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_Value__'
+ ..typeKey = '_mojom_types_Value__'
+ ))
+ ..tag = 0,
+
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'DefaultKeyword')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_DefaultKeyword__'
+ ..typeKey = '_mojom_types_DefaultKeyword__'
+ ))
+ ..tag = 1,
+ ];
+}
+
+
+enum ValueTag {
+ literalValue,
+ userValueReference,
+ builtinValue,
+ unknown
+}
+
+class Value extends bindings.Union {
+ static final _tag_to_int = const {
+ ValueTag.literalValue: 0,
+ ValueTag.userValueReference: 1,
+ ValueTag.builtinValue: 2,
+ };
+
+ static final _int_to_tag = const {
+ 0: ValueTag.literalValue,
+ 1: ValueTag.userValueReference,
+ 2: ValueTag.builtinValue,
+ };
+
+ var _data;
+ ValueTag _tag = ValueTag.unknown;
+
+ ValueTag get tag => _tag;
+ LiteralValue get literalValue {
+ if (_tag != ValueTag.literalValue) {
+ throw new bindings.UnsetUnionTagError(_tag, ValueTag.literalValue);
+ }
+ return _data;
+ }
+
+ set literalValue(LiteralValue value) {
+ _tag = ValueTag.literalValue;
+ _data = value;
+ }
+ UserValueReference get userValueReference {
+ if (_tag != ValueTag.userValueReference) {
+ throw new bindings.UnsetUnionTagError(_tag, ValueTag.userValueReference);
+ }
+ return _data;
+ }
+
+ set userValueReference(UserValueReference value) {
+ _tag = ValueTag.userValueReference;
+ _data = value;
+ }
+ BuiltinConstantValue get builtinValue {
+ if (_tag != ValueTag.builtinValue) {
+ throw new bindings.UnsetUnionTagError(_tag, ValueTag.builtinValue);
+ }
+ return _data;
+ }
+
+ set builtinValue(BuiltinConstantValue value) {
+ _tag = ValueTag.builtinValue;
+ _data = value;
+ }
+
+ static Value decode(bindings.Decoder decoder0, int offset) {
+ int size = decoder0.decodeUint32(offset);
+ if (size == 0) {
+ return null;
+ }
+ Value result = new Value();
+
+ // TODO(azani): Handle unknown union member. An assert breaks validation_unittest.
+ ValueTag tag = _int_to_tag[decoder0.decodeUint32(offset + 4)];
+ switch (tag) {
+ case ValueTag.literalValue:
+ var decoder1 = decoder0.decodePointer(offset + 8, false);
+ result.literalValue = LiteralValue.decode(decoder1, 0);
+ break;
+ case ValueTag.userValueReference:
+
+ var decoder1 = decoder0.decodePointer(offset + 8, false);
+ result.userValueReference = UserValueReference.decode(decoder1);
+ break;
+ case ValueTag.builtinValue:
+
+ result.builtinValue = BuiltinConstantValue.decode(decoder0, offset + 8);
+ if (result.builtinValue == null) {
+ throw new bindings.MojoCodecError(
+ 'Trying to decode null union for non-nullable BuiltinConstantValue.');
+ }
+ break;
+ default:
+ break;
+ }
+
+ return result;
+ }
+
+ void encode(bindings.Encoder encoder0, int offset) {
+ // TODO(azani): Error when trying to encode an unknown member.
+ encoder0.encodeUint32(16, offset);
+ encoder0.encodeUint32(_tag_to_int[_tag], offset + 4);
+ switch (_tag) {
+ case ValueTag.literalValue:
+ encoder0.encodeNestedUnion(literalValue, offset + 8, false);
+ break;
+ case ValueTag.userValueReference:
+
+ encoder0.encodeStruct(userValueReference, offset + 8, false);
+ break;
+ case ValueTag.builtinValue:
+
+ encoder0.encodeEnum(builtinValue, offset + 8);
+ break;
+ default:
+ break;
+ }
+ }
+
+ String toString() {
+ String result = "Value(";
+ switch (_tag) {
+ case ValueTag.literalValue:
+ result += "literalValue";
+ break;
+ case ValueTag.userValueReference:
+ result += "userValueReference";
+ break;
+ case ValueTag.builtinValue:
+ result += "builtinValue";
+ break;
+ default:
+ result += "unknown";
+ }
+ result += ": $_data)";
+ return result;
+ }
+}
+
+MojomUnion _mojom_types_Value__() {
+ return new MojomUnion()
+ ..declData = (new DeclarationData()..shortName = 'Value')
+ ..fields = <UnionField>[
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'LiteralValue')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_LiteralValue__'
+ ..typeKey = '_mojom_types_LiteralValue__'
+ ))
+ ..tag = 0,
+
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'UserValueReference')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_UserValueReference__'
+ ..typeKey = '_mojom_types_UserValueReference__'
+ ))
+ ..tag = 1,
+
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'BuiltinValue')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_BuiltinConstantValue__'
+ ..typeKey = '_mojom_types_BuiltinConstantValue__'
+ ))
+ ..tag = 2,
+ ];
+}
+
+
+enum LiteralValueTag {
+ boolValue,
+ doubleValue,
+ floatValue,
+ int8Value,
+ int16Value,
+ int32Value,
+ int64Value,
+ stringValue,
+ uint8Value,
+ uint16Value,
+ uint32Value,
+ uint64Value,
+ unknown
+}
+
+class LiteralValue extends bindings.Union {
+ static final _tag_to_int = const {
+ LiteralValueTag.boolValue: 0,
+ LiteralValueTag.doubleValue: 1,
+ LiteralValueTag.floatValue: 2,
+ LiteralValueTag.int8Value: 3,
+ LiteralValueTag.int16Value: 4,
+ LiteralValueTag.int32Value: 5,
+ LiteralValueTag.int64Value: 6,
+ LiteralValueTag.stringValue: 7,
+ LiteralValueTag.uint8Value: 8,
+ LiteralValueTag.uint16Value: 9,
+ LiteralValueTag.uint32Value: 10,
+ LiteralValueTag.uint64Value: 11,
+ };
+
+ static final _int_to_tag = const {
+ 0: LiteralValueTag.boolValue,
+ 1: LiteralValueTag.doubleValue,
+ 2: LiteralValueTag.floatValue,
+ 3: LiteralValueTag.int8Value,
+ 4: LiteralValueTag.int16Value,
+ 5: LiteralValueTag.int32Value,
+ 6: LiteralValueTag.int64Value,
+ 7: LiteralValueTag.stringValue,
+ 8: LiteralValueTag.uint8Value,
+ 9: LiteralValueTag.uint16Value,
+ 10: LiteralValueTag.uint32Value,
+ 11: LiteralValueTag.uint64Value,
+ };
+
+ var _data;
+ LiteralValueTag _tag = LiteralValueTag.unknown;
+
+ LiteralValueTag get tag => _tag;
+ bool get boolValue {
+ if (_tag != LiteralValueTag.boolValue) {
+ throw new bindings.UnsetUnionTagError(_tag, LiteralValueTag.boolValue);
+ }
+ return _data;
+ }
+
+ set boolValue(bool value) {
+ _tag = LiteralValueTag.boolValue;
+ _data = value;
+ }
+ double get doubleValue {
+ if (_tag != LiteralValueTag.doubleValue) {
+ throw new bindings.UnsetUnionTagError(_tag, LiteralValueTag.doubleValue);
+ }
+ return _data;
+ }
+
+ set doubleValue(double value) {
+ _tag = LiteralValueTag.doubleValue;
+ _data = value;
+ }
+ double get floatValue {
+ if (_tag != LiteralValueTag.floatValue) {
+ throw new bindings.UnsetUnionTagError(_tag, LiteralValueTag.floatValue);
+ }
+ return _data;
+ }
+
+ set floatValue(double value) {
+ _tag = LiteralValueTag.floatValue;
+ _data = value;
+ }
+ int get int8Value {
+ if (_tag != LiteralValueTag.int8Value) {
+ throw new bindings.UnsetUnionTagError(_tag, LiteralValueTag.int8Value);
+ }
+ return _data;
+ }
+
+ set int8Value(int value) {
+ _tag = LiteralValueTag.int8Value;
+ _data = value;
+ }
+ int get int16Value {
+ if (_tag != LiteralValueTag.int16Value) {
+ throw new bindings.UnsetUnionTagError(_tag, LiteralValueTag.int16Value);
+ }
+ return _data;
+ }
+
+ set int16Value(int value) {
+ _tag = LiteralValueTag.int16Value;
+ _data = value;
+ }
+ int get int32Value {
+ if (_tag != LiteralValueTag.int32Value) {
+ throw new bindings.UnsetUnionTagError(_tag, LiteralValueTag.int32Value);
+ }
+ return _data;
+ }
+
+ set int32Value(int value) {
+ _tag = LiteralValueTag.int32Value;
+ _data = value;
+ }
+ int get int64Value {
+ if (_tag != LiteralValueTag.int64Value) {
+ throw new bindings.UnsetUnionTagError(_tag, LiteralValueTag.int64Value);
+ }
+ return _data;
+ }
+
+ set int64Value(int value) {
+ _tag = LiteralValueTag.int64Value;
+ _data = value;
+ }
+ String get stringValue {
+ if (_tag != LiteralValueTag.stringValue) {
+ throw new bindings.UnsetUnionTagError(_tag, LiteralValueTag.stringValue);
+ }
+ return _data;
+ }
+
+ set stringValue(String value) {
+ _tag = LiteralValueTag.stringValue;
+ _data = value;
+ }
+ int get uint8Value {
+ if (_tag != LiteralValueTag.uint8Value) {
+ throw new bindings.UnsetUnionTagError(_tag, LiteralValueTag.uint8Value);
+ }
+ return _data;
+ }
+
+ set uint8Value(int value) {
+ _tag = LiteralValueTag.uint8Value;
+ _data = value;
+ }
+ int get uint16Value {
+ if (_tag != LiteralValueTag.uint16Value) {
+ throw new bindings.UnsetUnionTagError(_tag, LiteralValueTag.uint16Value);
+ }
+ return _data;
+ }
+
+ set uint16Value(int value) {
+ _tag = LiteralValueTag.uint16Value;
+ _data = value;
+ }
+ int get uint32Value {
+ if (_tag != LiteralValueTag.uint32Value) {
+ throw new bindings.UnsetUnionTagError(_tag, LiteralValueTag.uint32Value);
+ }
+ return _data;
+ }
+
+ set uint32Value(int value) {
+ _tag = LiteralValueTag.uint32Value;
+ _data = value;
+ }
+ int get uint64Value {
+ if (_tag != LiteralValueTag.uint64Value) {
+ throw new bindings.UnsetUnionTagError(_tag, LiteralValueTag.uint64Value);
+ }
+ return _data;
+ }
+
+ set uint64Value(int value) {
+ _tag = LiteralValueTag.uint64Value;
+ _data = value;
+ }
+
+ static LiteralValue decode(bindings.Decoder decoder0, int offset) {
+ int size = decoder0.decodeUint32(offset);
+ if (size == 0) {
+ return null;
+ }
+ LiteralValue result = new LiteralValue();
+
+ // TODO(azani): Handle unknown union member. An assert breaks validation_unittest.
+ LiteralValueTag tag = _int_to_tag[decoder0.decodeUint32(offset + 4)];
+ switch (tag) {
+ case LiteralValueTag.boolValue:
+
+ result.boolValue = decoder0.decodeBool(offset + 8, 0);
+ break;
+ case LiteralValueTag.doubleValue:
+
+ result.doubleValue = decoder0.decodeDouble(offset + 8);
+ break;
+ case LiteralValueTag.floatValue:
+
+ result.floatValue = decoder0.decodeFloat(offset + 8);
+ break;
+ case LiteralValueTag.int8Value:
+
+ result.int8Value = decoder0.decodeInt8(offset + 8);
+ break;
+ case LiteralValueTag.int16Value:
+
+ result.int16Value = decoder0.decodeInt16(offset + 8);
+ break;
+ case LiteralValueTag.int32Value:
+
+ result.int32Value = decoder0.decodeInt32(offset + 8);
+ break;
+ case LiteralValueTag.int64Value:
+
+ result.int64Value = decoder0.decodeInt64(offset + 8);
+ break;
+ case LiteralValueTag.stringValue:
+
+ result.stringValue = decoder0.decodeString(offset + 8, false);
+ break;
+ case LiteralValueTag.uint8Value:
+
+ result.uint8Value = decoder0.decodeUint8(offset + 8);
+ break;
+ case LiteralValueTag.uint16Value:
+
+ result.uint16Value = decoder0.decodeUint16(offset + 8);
+ break;
+ case LiteralValueTag.uint32Value:
+
+ result.uint32Value = decoder0.decodeUint32(offset + 8);
+ break;
+ case LiteralValueTag.uint64Value:
+
+ result.uint64Value = decoder0.decodeUint64(offset + 8);
+ break;
+ default:
+ break;
+ }
+
+ return result;
+ }
+
+ void encode(bindings.Encoder encoder0, int offset) {
+ // TODO(azani): Error when trying to encode an unknown member.
+ encoder0.encodeUint32(16, offset);
+ encoder0.encodeUint32(_tag_to_int[_tag], offset + 4);
+ switch (_tag) {
+ case LiteralValueTag.boolValue:
+
+ encoder0.encodeBool(boolValue, offset + 8, 0);
+ break;
+ case LiteralValueTag.doubleValue:
+
+ encoder0.encodeDouble(doubleValue, offset + 8);
+ break;
+ case LiteralValueTag.floatValue:
+
+ encoder0.encodeFloat(floatValue, offset + 8);
+ break;
+ case LiteralValueTag.int8Value:
+
+ encoder0.encodeInt8(int8Value, offset + 8);
+ break;
+ case LiteralValueTag.int16Value:
+
+ encoder0.encodeInt16(int16Value, offset + 8);
+ break;
+ case LiteralValueTag.int32Value:
+
+ encoder0.encodeInt32(int32Value, offset + 8);
+ break;
+ case LiteralValueTag.int64Value:
+
+ encoder0.encodeInt64(int64Value, offset + 8);
+ break;
+ case LiteralValueTag.stringValue:
+
+ encoder0.encodeString(stringValue, offset + 8, false);
+ break;
+ case LiteralValueTag.uint8Value:
+
+ encoder0.encodeUint8(uint8Value, offset + 8);
+ break;
+ case LiteralValueTag.uint16Value:
+
+ encoder0.encodeUint16(uint16Value, offset + 8);
+ break;
+ case LiteralValueTag.uint32Value:
+
+ encoder0.encodeUint32(uint32Value, offset + 8);
+ break;
+ case LiteralValueTag.uint64Value:
+
+ encoder0.encodeUint64(uint64Value, offset + 8);
+ break;
+ default:
+ break;
+ }
+ }
+
+ String toString() {
+ String result = "LiteralValue(";
+ switch (_tag) {
+ case LiteralValueTag.boolValue:
+ result += "boolValue";
+ break;
+ case LiteralValueTag.doubleValue:
+ result += "doubleValue";
+ break;
+ case LiteralValueTag.floatValue:
+ result += "floatValue";
+ break;
+ case LiteralValueTag.int8Value:
+ result += "int8Value";
+ break;
+ case LiteralValueTag.int16Value:
+ result += "int16Value";
+ break;
+ case LiteralValueTag.int32Value:
+ result += "int32Value";
+ break;
+ case LiteralValueTag.int64Value:
+ result += "int64Value";
+ break;
+ case LiteralValueTag.stringValue:
+ result += "stringValue";
+ break;
+ case LiteralValueTag.uint8Value:
+ result += "uint8Value";
+ break;
+ case LiteralValueTag.uint16Value:
+ result += "uint16Value";
+ break;
+ case LiteralValueTag.uint32Value:
+ result += "uint32Value";
+ break;
+ case LiteralValueTag.uint64Value:
+ result += "uint64Value";
+ break;
+ default:
+ result += "unknown";
+ }
+ result += ": $_data)";
+ return result;
+ }
+}
+
+MojomUnion _mojom_types_LiteralValue__() {
+ return new MojomUnion()
+ ..declData = (new DeclarationData()..shortName = 'LiteralValue')
+ ..fields = <UnionField>[
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'BoolValue')
+ ..type = (new Type()..simpleType = SimpleType.BOOL)
+ ..tag = 0,
+
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'DoubleValue')
+ ..type = (new Type()..simpleType = SimpleType.DOUBLE)
+ ..tag = 1,
+
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'FloatValue')
+ ..type = (new Type()..simpleType = SimpleType.FLOAT)
+ ..tag = 2,
+
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'Int8Value')
+ ..type = (new Type()..simpleType = SimpleType.INT8)
+ ..tag = 3,
+
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'Int16Value')
+ ..type = (new Type()..simpleType = SimpleType.INT16)
+ ..tag = 4,
+
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'Int32Value')
+ ..type = (new Type()..simpleType = SimpleType.INT32)
+ ..tag = 5,
+
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'Int64Value')
+ ..type = (new Type()..simpleType = SimpleType.INT64)
+ ..tag = 6,
+
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'StringValue')
+ ..type = (new Type()
+..stringType = (new StringType()..nullable = false))
+ ..tag = 7,
+
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'Uint8Value')
+ ..type = (new Type()..simpleType = SimpleType.UINT8)
+ ..tag = 8,
+
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'Uint16Value')
+ ..type = (new Type()..simpleType = SimpleType.UINT16)
+ ..tag = 9,
+
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'Uint32Value')
+ ..type = (new Type()..simpleType = SimpleType.UINT32)
+ ..tag = 10,
+
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'Uint64Value')
+ ..type = (new Type()..simpleType = SimpleType.UINT64)
+ ..tag = 11,
+ ];
+}
+
+
+enum UserDefinedValueTag {
+ enumValue,
+ declaredConstant,
+ unknown
+}
+
+class UserDefinedValue extends bindings.Union {
+ static final _tag_to_int = const {
+ UserDefinedValueTag.enumValue: 0,
+ UserDefinedValueTag.declaredConstant: 1,
+ };
+
+ static final _int_to_tag = const {
+ 0: UserDefinedValueTag.enumValue,
+ 1: UserDefinedValueTag.declaredConstant,
+ };
+
+ var _data;
+ UserDefinedValueTag _tag = UserDefinedValueTag.unknown;
+
+ UserDefinedValueTag get tag => _tag;
+ EnumValue get enumValue {
+ if (_tag != UserDefinedValueTag.enumValue) {
+ throw new bindings.UnsetUnionTagError(_tag, UserDefinedValueTag.enumValue);
+ }
+ return _data;
+ }
+
+ set enumValue(EnumValue value) {
+ _tag = UserDefinedValueTag.enumValue;
+ _data = value;
+ }
+ DeclaredConstant get declaredConstant {
+ if (_tag != UserDefinedValueTag.declaredConstant) {
+ throw new bindings.UnsetUnionTagError(_tag, UserDefinedValueTag.declaredConstant);
+ }
+ return _data;
+ }
+
+ set declaredConstant(DeclaredConstant value) {
+ _tag = UserDefinedValueTag.declaredConstant;
+ _data = value;
+ }
+
+ static UserDefinedValue decode(bindings.Decoder decoder0, int offset) {
+ int size = decoder0.decodeUint32(offset);
+ if (size == 0) {
+ return null;
+ }
+ UserDefinedValue result = new UserDefinedValue();
+
+ // TODO(azani): Handle unknown union member. An assert breaks validation_unittest.
+ UserDefinedValueTag tag = _int_to_tag[decoder0.decodeUint32(offset + 4)];
+ switch (tag) {
+ case UserDefinedValueTag.enumValue:
+
+ var decoder1 = decoder0.decodePointer(offset + 8, false);
+ result.enumValue = EnumValue.decode(decoder1);
+ break;
+ case UserDefinedValueTag.declaredConstant:
+
+ var decoder1 = decoder0.decodePointer(offset + 8, false);
+ result.declaredConstant = DeclaredConstant.decode(decoder1);
+ break;
+ default:
+ break;
+ }
+
+ return result;
+ }
+
+ void encode(bindings.Encoder encoder0, int offset) {
+ // TODO(azani): Error when trying to encode an unknown member.
+ encoder0.encodeUint32(16, offset);
+ encoder0.encodeUint32(_tag_to_int[_tag], offset + 4);
+ switch (_tag) {
+ case UserDefinedValueTag.enumValue:
+
+ encoder0.encodeStruct(enumValue, offset + 8, false);
+ break;
+ case UserDefinedValueTag.declaredConstant:
+
+ encoder0.encodeStruct(declaredConstant, offset + 8, false);
+ break;
+ default:
+ break;
+ }
+ }
+
+ String toString() {
+ String result = "UserDefinedValue(";
+ switch (_tag) {
+ case UserDefinedValueTag.enumValue:
+ result += "enumValue";
+ break;
+ case UserDefinedValueTag.declaredConstant:
+ result += "declaredConstant";
+ break;
+ default:
+ result += "unknown";
+ }
+ result += ": $_data)";
+ return result;
+ }
+}
+
+MojomUnion _mojom_types_UserDefinedValue__() {
+ return new MojomUnion()
+ ..declData = (new DeclarationData()..shortName = 'UserDefinedValue')
+ ..fields = <UnionField>[
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'EnumValue')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_EnumValue__'
+ ..typeKey = '_mojom_types_EnumValue__'
+ ))
+ ..tag = 0,
+
+ new UnionField()
+ ..declData = (new DeclarationData()..shortName = 'DeclaredConstant')
+ ..type = (new Type()
+ ..typeReference = (new TypeReference()
+
+ ..identifier = '_mojom_types_DeclaredConstant__'
+ ..typeKey = '_mojom_types_DeclaredConstant__'
+ ))
+ ..tag = 1,
+ ];
+}
+
+
+
+
+
+
+
+
+var _MojomDesc__ = _initDescriptions();
+
+Map<String, UserDefinedType> _initDescriptions() {
+ var map = new Map<String, UserDefinedType>();
+
+ map["_mojom_types_SimpleType__"] =
+ new UserDefinedType()
+ ..enumType = _mojom_types_SimpleType__();
+
+
+ map["_mojom_types_BuiltinConstantValue__"] =
+ new UserDefinedType()
+ ..enumType = _mojom_types_BuiltinConstantValue__();
+
+
+ map["_mojom_types_StringType__"] =
+ new UserDefinedType()
+ ..structType = _mojom_types_StringType__();
+
+
+
+
+
+ map["_mojom_types_HandleType__"] =
+ new UserDefinedType()
+ ..structType = _mojom_types_HandleType__();
+
+
+
+
+ map["_mojom_types_Kind__"] =
+ new UserDefinedType()
+ ..enumType = _mojom_types_Kind__();
+
+
+
+
+ map["_mojom_types_ArrayType__"] =
+ new UserDefinedType()
+ ..structType = _mojom_types_ArrayType__();
+
+
+
+
+
+
+ map["_mojom_types_Type__"] =
+ new UserDefinedType()
+ ..unionType = _mojom_types_Type__();
+
+
+
+
+
+
+
+
+ map["_mojom_types_MapType__"] =
+ new UserDefinedType()
+ ..structType = _mojom_types_MapType__();
+
+
+
+
+
+
+
+
+
+
+
+
+ map["_mojom_types_TypeReference__"] =
+ new UserDefinedType()
+ ..structType = _mojom_types_TypeReference__();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ map["_mojom_types_StructField__"] =
+ new UserDefinedType()
+ ..structType = _mojom_types_StructField__();
+
+
+ map["_mojom_types_DeclarationData__"] =
+ new UserDefinedType()
+ ..structType = _mojom_types_DeclarationData__();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ map["_mojom_types_SourceFileInfo__"] =
+ new UserDefinedType()
+ ..structType = _mojom_types_SourceFileInfo__();
+
+
+
+
+
+
+
+
+
+
+ map["_mojom_types_ContainedDeclarations__"] =
+ new UserDefinedType()
+ ..structType = _mojom_types_ContainedDeclarations__();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ map["_mojom_types_DefaultFieldValue__"] =
+ new UserDefinedType()
+ ..unionType = _mojom_types_DefaultFieldValue__();
+
+
+ map["_mojom_types_Value__"] =
+ new UserDefinedType()
+ ..unionType = _mojom_types_Value__();
+
+
+ map["_mojom_types_LiteralValue__"] =
+ new UserDefinedType()
+ ..unionType = _mojom_types_LiteralValue__();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ map["_mojom_types_UserValueReference__"] =
+ new UserDefinedType()
+ ..structType = _mojom_types_UserValueReference__();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ map["_mojom_types_DefaultKeyword__"] =
+ new UserDefinedType()
+ ..structType = _mojom_types_DefaultKeyword__();
+
+
+
+
+
+
+
+
+
+
+ map["_mojom_types_StructVersion__"] =
+ new UserDefinedType()
+ ..structType = _mojom_types_StructVersion__();
+
+
+
+
+
+
+
+
+
+ map["_mojom_types_MojomStruct__"] =
+ new UserDefinedType()
+ ..structType = _mojom_types_MojomStruct__();
+
+
+
+
+
+
+
+
+
+ map["_mojom_types_UnionField__"] =
+ new UserDefinedType()
+ ..structType = _mojom_types_UnionField__();
+
+
+
+
+
+
+
+
+
+ map["_mojom_types_MojomUnion__"] =
+ new UserDefinedType()
+ ..structType = _mojom_types_MojomUnion__();
+
+
+
+
+
+
+
+ map["_mojom_types_EnumValue__"] =
+ new UserDefinedType()
+ ..structType = _mojom_types_EnumValue__();
+
+
+
+
+
+
+
+
+
+
+
+ map["_mojom_types_MojomEnum__"] =
+ new UserDefinedType()
+ ..structType = _mojom_types_MojomEnum__();
+
+
+
+
+
+
+
+ map["_mojom_types_MojomMethod__"] =
+ new UserDefinedType()
+ ..structType = _mojom_types_MojomMethod__();
+
+
+
+
+
+
+
+
+
+
+
+ map["_mojom_types_MojomInterface__"] =
+ new UserDefinedType()
+ ..structType = _mojom_types_MojomInterface__();
+
+
+
+
+
+
+
+
+
+
+ map["_mojom_types_DeclaredConstant__"] =
+ new UserDefinedType()
+ ..structType = _mojom_types_DeclaredConstant__();
+
+
+
+
+
+
+
+
+
+
+
+
+ map["_mojom_types_Attribute__"] =
+ new UserDefinedType()
+ ..structType = _mojom_types_Attribute__();
+
+
+
+
+
+
+
+
+ map["_mojom_types_UserDefinedType__"] =
+ new UserDefinedType()
+ ..unionType = _mojom_types_UserDefinedType__();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ map["_mojom_types_UserDefinedValue__"] =
+ new UserDefinedType()
+ ..unionType = _mojom_types_UserDefinedValue__();
+
+
+
+
+
+
+ return map;
+}
+
+Map<String, UserDefinedType> getAllMojomTypeDefinitions() {
+ return _MojomDesc__;
+}
+
+

Powered by Google App Engine
This is Rietveld 408576698