| Index: mojo/dart/packages/mojo_services/lib/speech_recognizer/speech_recognizer.mojom.dart
 | 
| diff --git a/mojo/dart/packages/mojo_services/lib/speech_recognizer/speech_recognizer.mojom.dart b/mojo/dart/packages/mojo_services/lib/speech_recognizer/speech_recognizer.mojom.dart
 | 
| index 7032a44334204412890a34a3802cdde4cec648b2..310f136b95da5434f78ef1e8f07ff629df6d4a66 100644
 | 
| --- a/mojo/dart/packages/mojo_services/lib/speech_recognizer/speech_recognizer.mojom.dart
 | 
| +++ b/mojo/dart/packages/mojo_services/lib/speech_recognizer/speech_recognizer.mojom.dart
 | 
| @@ -8,6 +8,8 @@ import 'dart:async';
 | 
|  
 | 
|  import 'package:mojo/bindings.dart' as bindings;
 | 
|  import 'package:mojo/core.dart' as core;
 | 
| +import 'package:mojo/mojo/mojom_types.mojom.dart' as mojom_types;
 | 
| +import 'package:mojo/mojo/service_describer.mojom.dart' as service_describer;
 | 
|  class Error extends bindings.MojoEnum {
 | 
|    static const NETWORK_TIMEOUT = const Error._(1);
 | 
|    static const NETWORK = const Error._(2);
 | 
| @@ -101,12 +103,47 @@ class Error extends bindings.MojoEnum {
 | 
|          return 'Error.RECOGNIZER_BUSY';
 | 
|        case INSUFFICIENT_PERMISSIONS:
 | 
|          return 'Error.INSUFFICIENT_PERMISSIONS';
 | 
| +      default:
 | 
| +        return null;
 | 
|      }
 | 
|    }
 | 
|  
 | 
|    int toJson() => value;
 | 
|  }
 | 
|  
 | 
| +mojom_types.MojomEnum _speech_recognizer_Error__() {
 | 
| +  return new mojom_types.MojomEnum()
 | 
| +    ..declData = (new mojom_types.DeclarationData()..shortName = "Error")
 | 
| +    ..values = <mojom_types.EnumValue>[new mojom_types.EnumValue()
 | 
| +        ..declData = (new mojom_types.DeclarationData()..shortName = "NETWORK_TIMEOUT")
 | 
| +        ..enumTypeKey = '_speech_recognizer_Error__'
 | 
| +        ..intValue = 1,new mojom_types.EnumValue()
 | 
| +        ..declData = (new mojom_types.DeclarationData()..shortName = "NETWORK")
 | 
| +        ..enumTypeKey = '_speech_recognizer_Error__'
 | 
| +        ..intValue = 2,new mojom_types.EnumValue()
 | 
| +        ..declData = (new mojom_types.DeclarationData()..shortName = "AUDIO")
 | 
| +        ..enumTypeKey = '_speech_recognizer_Error__'
 | 
| +        ..intValue = 3,new mojom_types.EnumValue()
 | 
| +        ..declData = (new mojom_types.DeclarationData()..shortName = "SERVER")
 | 
| +        ..enumTypeKey = '_speech_recognizer_Error__'
 | 
| +        ..intValue = 4,new mojom_types.EnumValue()
 | 
| +        ..declData = (new mojom_types.DeclarationData()..shortName = "CLIENT")
 | 
| +        ..enumTypeKey = '_speech_recognizer_Error__'
 | 
| +        ..intValue = 5,new mojom_types.EnumValue()
 | 
| +        ..declData = (new mojom_types.DeclarationData()..shortName = "SPEECH_TIMEOUT")
 | 
| +        ..enumTypeKey = '_speech_recognizer_Error__'
 | 
| +        ..intValue = 6,new mojom_types.EnumValue()
 | 
| +        ..declData = (new mojom_types.DeclarationData()..shortName = "NO_MATCH")
 | 
| +        ..enumTypeKey = '_speech_recognizer_Error__'
 | 
| +        ..intValue = 7,new mojom_types.EnumValue()
 | 
| +        ..declData = (new mojom_types.DeclarationData()..shortName = "RECOGNIZER_BUSY")
 | 
| +        ..enumTypeKey = '_speech_recognizer_Error__'
 | 
| +        ..intValue = 8,new mojom_types.EnumValue()
 | 
| +        ..declData = (new mojom_types.DeclarationData()..shortName = "INSUFFICIENT_PERMISSIONS")
 | 
| +        ..enumTypeKey = '_speech_recognizer_Error__'
 | 
| +        ..intValue = 9,];
 | 
| +}
 | 
| +
 | 
|  
 | 
|  
 | 
|  class UtteranceCandidate extends bindings.Struct {
 | 
| @@ -184,6 +221,21 @@ class UtteranceCandidate extends bindings.Struct {
 | 
|    }
 | 
|  }
 | 
|  
 | 
| +mojom_types.MojomStruct _speech_recognizer_UtteranceCandidate__() {
 | 
| +  return new mojom_types.MojomStruct()
 | 
| +    ..declData = (new mojom_types.DeclarationData()..shortName = 'UtteranceCandidate')
 | 
| +    ..fields = <mojom_types.StructField>[
 | 
| +      new mojom_types.StructField()
 | 
| +        ..declData = (new mojom_types.DeclarationData()..shortName = 'Text')
 | 
| +        ..type = (new mojom_types.Type()
 | 
| +..stringType = (new mojom_types.StringType()..nullable = false)),
 | 
| +      
 | 
| +      new mojom_types.StructField()
 | 
| +        ..declData = (new mojom_types.DeclarationData()..shortName = 'ConfidenceScore')
 | 
| +        ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.FLOAT),
 | 
| +      ];
 | 
| +}
 | 
| +
 | 
|  
 | 
|  class SpeechRecognizerServiceListenParams extends bindings.Struct {
 | 
|    static const List<bindings.StructDataHeader> kVersions = const [
 | 
| @@ -242,6 +294,12 @@ class SpeechRecognizerServiceListenParams extends bindings.Struct {
 | 
|    }
 | 
|  }
 | 
|  
 | 
| +mojom_types.MojomStruct _speech_recognizer_SpeechRecognizerService_Listen_Params__() {
 | 
| +  return new mojom_types.MojomStruct()
 | 
| +    ..declData = (new mojom_types.DeclarationData()..shortName = 'SpeechRecognizerServiceListenParams')
 | 
| +    ..fields = <mojom_types.StructField>[];
 | 
| +}
 | 
| +
 | 
|  
 | 
|  class SpeechRecognizerServiceListenResponseParams extends bindings.Struct {
 | 
|    static const List<bindings.StructDataHeader> kVersions = const [
 | 
| @@ -313,6 +371,21 @@ class SpeechRecognizerServiceListenResponseParams extends bindings.Struct {
 | 
|    }
 | 
|  }
 | 
|  
 | 
| +mojom_types.MojomStruct _speech_recognizer_SpeechRecognizerService_Listen_ResponseParams__() {
 | 
| +  return new mojom_types.MojomStruct()
 | 
| +    ..declData = (new mojom_types.DeclarationData()..shortName = 'SpeechRecognizerServiceListenResponseParams')
 | 
| +    ..fields = <mojom_types.StructField>[
 | 
| +      new mojom_types.StructField()
 | 
| +        ..declData = (new mojom_types.DeclarationData()..shortName = 'ResultOrError')
 | 
| +        ..type = (new mojom_types.Type()
 | 
| +    ..typeReference = (new mojom_types.TypeReference()
 | 
| +  
 | 
| +    ..identifier = '_speech_recognizer_ResultOrError__'
 | 
| +    ..typeKey = '_speech_recognizer_ResultOrError__'
 | 
| +  )),
 | 
| +      ];
 | 
| +}
 | 
| +
 | 
|  
 | 
|  class SpeechRecognizerServiceStopListeningParams extends bindings.Struct {
 | 
|    static const List<bindings.StructDataHeader> kVersions = const [
 | 
| @@ -371,6 +444,12 @@ class SpeechRecognizerServiceStopListeningParams extends bindings.Struct {
 | 
|    }
 | 
|  }
 | 
|  
 | 
| +mojom_types.MojomStruct _speech_recognizer_SpeechRecognizerService_StopListening_Params__() {
 | 
| +  return new mojom_types.MojomStruct()
 | 
| +    ..declData = (new mojom_types.DeclarationData()..shortName = 'SpeechRecognizerServiceStopListeningParams')
 | 
| +    ..fields = <mojom_types.StructField>[];
 | 
| +}
 | 
| +
 | 
|  
 | 
|  
 | 
|  enum ResultOrErrorTag {
 | 
| @@ -424,7 +503,7 @@ class ResultOrError extends bindings.Union {
 | 
|      }
 | 
|      ResultOrError result = new ResultOrError();
 | 
|  
 | 
| -    // TODO(azani): Handle unknown union member.
 | 
| +    // TODO(azani): Handle unknown union member. An assert breaks validation_unittest.
 | 
|      ResultOrErrorTag tag = _int_to_tag[decoder0.decodeUint32(offset + 4)];
 | 
|      switch (tag) {
 | 
|        case ResultOrErrorTag.errorCode:
 | 
| @@ -448,6 +527,8 @@ class ResultOrError extends bindings.Union {
 | 
|            }
 | 
|          }
 | 
|          break;
 | 
| +      default:
 | 
| +        break;
 | 
|      }
 | 
|  
 | 
|      return result;
 | 
| @@ -474,6 +555,8 @@ class ResultOrError extends bindings.Union {
 | 
|            }
 | 
|          }
 | 
|          break;
 | 
| +      default:
 | 
| +        break;
 | 
|      }
 | 
|    }
 | 
|  
 | 
| @@ -493,12 +576,68 @@ class ResultOrError extends bindings.Union {
 | 
|      return result;
 | 
|    }
 | 
|  }
 | 
| +
 | 
| +mojom_types.MojomUnion _speech_recognizer_ResultOrError__() {
 | 
| +  return new mojom_types.MojomUnion()
 | 
| +    ..declData = (new mojom_types.DeclarationData()..shortName = 'ResultOrError')
 | 
| +    ..fields = <mojom_types.UnionField>[
 | 
| +      new mojom_types.UnionField()
 | 
| +        ..declData = (new mojom_types.DeclarationData()..shortName = 'ErrorCode')
 | 
| +        ..type = (new mojom_types.Type()
 | 
| +    ..typeReference = (new mojom_types.TypeReference()
 | 
| +  
 | 
| +    ..identifier = '_speech_recognizer_Error__'
 | 
| +    ..typeKey = '_speech_recognizer_Error__'
 | 
| +  ))
 | 
| +        ..tag = 0,
 | 
| +      
 | 
| +      new mojom_types.UnionField()
 | 
| +        ..declData = (new mojom_types.DeclarationData()..shortName = 'Results')
 | 
| +        ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType()
 | 
| +    ..elementType = (new mojom_types.Type()
 | 
| +    ..typeReference = (new mojom_types.TypeReference()
 | 
| +  
 | 
| +    ..identifier = '_speech_recognizer_UtteranceCandidate__'
 | 
| +    ..typeKey = '_speech_recognizer_UtteranceCandidate__'
 | 
| +  ))))
 | 
| +        ..tag = 1,
 | 
| +      ];
 | 
| +}
 | 
| +
 | 
|  const int kSpeechRecognizerService_listen_name = 0;
 | 
|  const int kSpeechRecognizerService_stopListening_name = 1;
 | 
|  
 | 
|  const String SpeechRecognizerServiceName =
 | 
|        'speech_recognizer::SpeechRecognizerService';
 | 
|  
 | 
| +mojom_types.MojomInterface _speech_recognizer_SpeechRecognizerService__() {
 | 
| +  return new mojom_types.MojomInterface()
 | 
| +    ..declData = (new mojom_types.DeclarationData()..shortName = "SpeechRecognizerService")
 | 
| +    ..interfaceName = "SpeechRecognizerService"
 | 
| +    ..methods = <int, mojom_types.MojomMethod>{
 | 
| +kSpeechRecognizerService_listen_name: new mojom_types.MojomMethod()
 | 
| +        ..declData = (new mojom_types.DeclarationData()..shortName = "Listen")
 | 
| +        ..ordinal = kSpeechRecognizerService_listen_name
 | 
| +        ..responseParams = _speech_recognizer_SpeechRecognizerService_Listen_ResponseParams__()..parameters = _speech_recognizer_SpeechRecognizerService_Listen_Params__(),kSpeechRecognizerService_stopListening_name: new mojom_types.MojomMethod()
 | 
| +        ..declData = (new mojom_types.DeclarationData()..shortName = "StopListening")
 | 
| +        ..ordinal = kSpeechRecognizerService_stopListening_name..parameters = _speech_recognizer_SpeechRecognizerService_StopListening_Params__(),
 | 
| +    };
 | 
| +}
 | 
| +
 | 
| +class _SpeechRecognizerServiceServiceDescription extends service_describer.ServiceDescription {
 | 
| +  // Avoid infinite loop by overriding serviceDescription field.
 | 
| +  final service_describer.ServiceDescription serviceDescription = null;
 | 
| +dynamic getTopLevelInterface([Function responseFactory = null]) {
 | 
| +    return _speech_recognizer_SpeechRecognizerService__();
 | 
| +  }
 | 
| +  dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) {
 | 
| +    return getAllMojomTypeDefinitions()[typeKey];
 | 
| +  }
 | 
| +  dynamic getAllTypeDefinitions([Function responseFactory = null]) {
 | 
| +    return getAllMojomTypeDefinitions();
 | 
| +  }
 | 
| +}
 | 
| +
 | 
|  abstract class SpeechRecognizerService {
 | 
|    dynamic listen([Function responseFactory = null]);
 | 
|    void stopListening();
 | 
| @@ -523,6 +662,9 @@ class SpeechRecognizerServiceProxyImpl extends bindings.Proxy {
 | 
|  
 | 
|    String get name => SpeechRecognizerServiceName;
 | 
|  
 | 
| +  service_describer.ServiceDescription get serviceDescription =>
 | 
| +    new _SpeechRecognizerServiceServiceDescription();
 | 
| +
 | 
|    void handleResponse(bindings.ServiceMessage message) {
 | 
|      switch (message.header.type) {
 | 
|        case kSpeechRecognizerService_listen_name:
 | 
| @@ -722,6 +864,77 @@ class SpeechRecognizerServiceStub extends bindings.Stub {
 | 
|    }
 | 
|  
 | 
|    int get version => 0;
 | 
| +
 | 
| +  service_describer.ServiceDescription get serviceDescription =>
 | 
| +    new _SpeechRecognizerServiceServiceDescription();
 | 
| +}
 | 
| +
 | 
| +
 | 
| +
 | 
| +
 | 
| +
 | 
| +
 | 
| +
 | 
| +
 | 
| +var _MojomDesc__ = _initDescriptions();
 | 
| +
 | 
| +Map<String, mojom_types.UserDefinedType> _initDescriptions() {
 | 
| +  var map = new Map<String, mojom_types.UserDefinedType>();
 | 
| +  
 | 
| +  map["_speech_recognizer_Error__"] =
 | 
| +    new mojom_types.UserDefinedType()
 | 
| +      ..enumType = _speech_recognizer_Error__();
 | 
| +
 | 
| +  
 | 
| +  map["_speech_recognizer_UtteranceCandidate__"] =
 | 
| +    new mojom_types.UserDefinedType()
 | 
| +      ..structType = _speech_recognizer_UtteranceCandidate__();
 | 
| +  
 | 
| +
 | 
| +  
 | 
| +
 | 
| +  
 | 
| +
 | 
| +  
 | 
| +  map["_speech_recognizer_SpeechRecognizerService_Listen_Params__"] =
 | 
| +    new mojom_types.UserDefinedType()
 | 
| +      ..structType = _speech_recognizer_SpeechRecognizerService_Listen_Params__();
 | 
| +  
 | 
| +
 | 
| +  
 | 
| +  map["_speech_recognizer_SpeechRecognizerService_Listen_ResponseParams__"] =
 | 
| +    new mojom_types.UserDefinedType()
 | 
| +      ..structType = _speech_recognizer_SpeechRecognizerService_Listen_ResponseParams__();
 | 
| +  
 | 
| +
 | 
| +  map["_speech_recognizer_ResultOrError__"] =
 | 
| +    new mojom_types.UserDefinedType()
 | 
| +      ..unionType = _speech_recognizer_ResultOrError__();
 | 
| +  
 | 
| +
 | 
| +  
 | 
| +
 | 
| +  
 | 
| +
 | 
| +  
 | 
| +
 | 
| +  
 | 
| +  map["_speech_recognizer_SpeechRecognizerService_StopListening_Params__"] =
 | 
| +    new mojom_types.UserDefinedType()
 | 
| +      ..structType = _speech_recognizer_SpeechRecognizerService_StopListening_Params__();
 | 
| +  
 | 
| +
 | 
| +  
 | 
| +  
 | 
| +  map["_speech_recognizer_SpeechRecognizerService__"] =
 | 
| +    new mojom_types.UserDefinedType()
 | 
| +      ..interfaceType = _speech_recognizer_SpeechRecognizerService__();
 | 
| +
 | 
| +  return map;
 | 
| +}
 | 
| +
 | 
| +Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() {
 | 
| +  return _MojomDesc__;
 | 
|  }
 | 
|  
 | 
|  
 | 
| 
 |