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

Unified Diff: mojo/dart/packages/mojo_services/lib/mojo/location_service.mojom.dart

Issue 1539673003: Generate Mojom Types in Dart (Take 2) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Update to master and regenerate mojoms Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/dart/packages/mojo_services/lib/mojo/location_service.mojom.dart
diff --git a/mojo/dart/packages/mojo_services/lib/mojo/location_service.mojom.dart b/mojo/dart/packages/mojo_services/lib/mojo/location_service.mojom.dart
index b2592b40ca0430106dcc2b6b80ae69103d5d6202..47c89bf4ad85db8c4ce9ad92466a22d04d5ec8ac 100644
--- a/mojo/dart/packages/mojo_services/lib/mojo/location_service.mojom.dart
+++ b/mojo/dart/packages/mojo_services/lib/mojo/location_service.mojom.dart
@@ -5,9 +5,12 @@
library location_service_mojom;
import 'dart:async';
+import 'dart:collection';
import 'package:mojo/bindings.dart' as bindings;
import 'package:mojo/core.dart' as core;
+import 'package:mojo/mojo/bindings/types/mojom_types.mojom.dart' as mojom_types;
+import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as service_describer;
import 'package:mojo_services/mojo/location.mojom.dart' as location_mojom;
@@ -81,6 +84,22 @@ class _LocationServiceGetNextLocationParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _location_service_LocationService_GetNextLocation_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = '_LocationServiceGetNextLocationParams'
+ ..fullIdentifier = 'mojo._LocationServiceGetNextLocationParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Priority')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_location_service_UpdatePriority__'
+ ..typeKey = '_location_service_UpdatePriority__'
+ )),
+ ];
+}
class LocationServiceGetNextLocationResponseParams extends bindings.Struct {
@@ -149,10 +168,28 @@ class LocationServiceGetNextLocationResponseParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _location_service_LocationService_GetNextLocation_ResponseParams__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'LocationServiceGetNextLocationResponseParams'
+ ..fullIdentifier = 'mojo.LocationServiceGetNextLocationResponseParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Location')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+ ..nullable = true
+
+
+ ..identifier = '_location_Location__'
+ ..typeKey = '_location_Location__'
+ )),
+ ];
+}
+
const int _LocationService_getNextLocationName = 0;
-
-class LocationServiceUpdatePriority extends bindings.MojoEnum {
+ class LocationServiceUpdatePriority extends bindings.MojoEnum {
static const LocationServiceUpdatePriority priorityBalancedPowerAccuracy = const LocationServiceUpdatePriority._(0);
static const LocationServiceUpdatePriority priorityHighAccuracy = const LocationServiceUpdatePriority._(1);
static const LocationServiceUpdatePriority priorityLowPower = const LocationServiceUpdatePriority._(2);
@@ -210,12 +247,60 @@ class LocationServiceUpdatePriority extends bindings.MojoEnum {
return 'LocationServiceUpdatePriority.priorityLowPower';
case priorityNoPower:
return 'LocationServiceUpdatePriority.priorityNoPower';
+ default:
+ return null;
}
}
int toJson() => mojoEnumValue;
}
+mojom_types.MojomEnum _location_service_UpdatePriority__() {
+ return new mojom_types.MojomEnum()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'LocationServiceUpdatePriority'
+ ..fullIdentifier = 'mojo.LocationServiceUpdatePriority')
+ ..values = <mojom_types.EnumValue>[new mojom_types.EnumValue()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'PriorityBalancedPowerAccuracy')
+ ..enumTypeKey = '_location_service_UpdatePriority__'
+ ..intValue = 0,new mojom_types.EnumValue()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'PriorityHighAccuracy')
+ ..enumTypeKey = '_location_service_UpdatePriority__'
+ ..intValue = 1,new mojom_types.EnumValue()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'PriorityLowPower')
+ ..enumTypeKey = '_location_service_UpdatePriority__'
+ ..intValue = 2,new mojom_types.EnumValue()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'PriorityNoPower')
+ ..enumTypeKey = '_location_service_UpdatePriority__'
+ ..intValue = 3,];
+}
+
+mojom_types.MojomInterface _location_service_LocationService__() {
+ return new mojom_types.MojomInterface()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'LocationService'
+ ..fullIdentifier = 'mojo.LocationService')
+ ..interfaceName = 'LocationService'
+ ..methods = <int, mojom_types.MojomMethod>{
+_LocationService_getNextLocationName: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'GetNextLocation')
+ ..ordinal = _LocationService_getNextLocationName
+ ..responseParams = _location_service_LocationService_GetNextLocation_ResponseParams__()..parameters = _location_service_LocationService_GetNextLocation_Params__(),
+ };
+}
+
+class _LocationServiceServiceDescription implements service_describer.ServiceDescription {
+dynamic getTopLevelInterface([Function responseFactory = null]) {
+ return _location_service_LocationService__();
+ }
+ dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions()[typeKey];
+ }
+ dynamic getAllTypeDefinitions([Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions();
+ }
+}
+
abstract class LocationService {
static const String serviceName = "mojo::LocationService";
dynamic getNextLocation(LocationServiceUpdatePriority priority,[Function responseFactory = null]);
@@ -237,6 +322,9 @@ class _LocationServiceProxyImpl extends bindings.Proxy {
return new _LocationServiceProxyImpl.fromEndpoint(endpoint);
}
+ service_describer.ServiceDescription get serviceDescription =>
+ new _LocationServiceServiceDescription();
+
void handleResponse(bindings.ServiceMessage message) {
switch (message.header.type) {
case _LocationService_getNextLocationName:
@@ -422,6 +510,44 @@ class LocationServiceStub extends bindings.Stub {
}
int get version => 0;
+
+
+ service_describer.ServiceDescription get serviceDescription =>
+ new _LocationServiceServiceDescription();
+}
+
+
+
+
+
+
+
+Map<String, mojom_types.UserDefinedType> _initDescriptions() {
+ var map = new HashMap<String, mojom_types.UserDefinedType>();
+map["_location_service_LocationService_GetNextLocation_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _location_service_LocationService_GetNextLocation_Params__();
+map["_location_service_LocationService_GetNextLocation_ResponseParams__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _location_service_LocationService_GetNextLocation_ResponseParams__();
+map["_location_service_LocationService__"] =
+ new mojom_types.UserDefinedType()
+ ..interfaceType = _location_service_LocationService__();
+ map["_location_service_UpdatePriority__"] =
+ new mojom_types.UserDefinedType()
+ ..enumType = _location_service_UpdatePriority__();
+location_mojom.getAllMojomTypeDefinitions().forEach((String s, mojom_types.UserDefinedType udt) {
+ map[s] = udt;
+});
+
+ return map;
}
+var _MojomDesc;
+Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() {
+ if (_MojomDesc == null) {
+ _MojomDesc = _initDescriptions();
+ }
+ return _MojomDesc;
+}

Powered by Google App Engine
This is Rietveld 408576698