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

Unified Diff: mojo/dart/packages/mojo_services/lib/mojo/media/media_clock.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/media/media_clock.mojom.dart
diff --git a/mojo/dart/packages/mojo_services/lib/mojo/media/media_clock.mojom.dart b/mojo/dart/packages/mojo_services/lib/mojo/media/media_clock.mojom.dart
index ebc46348c54ee8ab2a112ab117560ed50197ed3e..a330f68c6174fffba122c29e8548a141783f85d6 100644
--- a/mojo/dart/packages/mojo_services/lib/mojo/media/media_clock.mojom.dart
+++ b/mojo/dart/packages/mojo_services/lib/mojo/media/media_clock.mojom.dart
@@ -5,10 +5,12 @@
library media_clock_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;
class ClockDisposition extends bindings.MojoEnum {
static const ClockDisposition passive = const ClockDisposition._(0);
static const ClockDisposition slave = const ClockDisposition._(1);
@@ -81,13 +83,65 @@ class ClockDisposition extends bindings.MojoEnum {
return 'ClockDisposition.preferMaster';
case master:
return 'ClockDisposition.master';
+ default:
+ return null;
}
}
int toJson() => mojoEnumValue;
}
+mojom_types.MojomEnum _media_clock_ClockDisposition__() {
+ return new mojom_types.MojomEnum()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'ClockDisposition'
+ ..fullIdentifier = 'mojo.media.ClockDisposition')
+ ..values = <mojom_types.EnumValue>[new mojom_types.EnumValue()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Passive')
+ ..enumTypeKey = '_media_clock_ClockDisposition__'
+ ..intValue = 0,new mojom_types.EnumValue()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Slave')
+ ..enumTypeKey = '_media_clock_ClockDisposition__'
+ ..intValue = 1,new mojom_types.EnumValue()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'PreferSlave')
+ ..enumTypeKey = '_media_clock_ClockDisposition__'
+ ..intValue = 2,new mojom_types.EnumValue()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Indifferent')
+ ..enumTypeKey = '_media_clock_ClockDisposition__'
+ ..intValue = 3,new mojom_types.EnumValue()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'PreferMaster')
+ ..enumTypeKey = '_media_clock_ClockDisposition__'
+ ..intValue = 4,new mojom_types.EnumValue()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Master')
+ ..enumTypeKey = '_media_clock_ClockDisposition__'
+ ..intValue = 5,];
+}
+
+
+
+mojom_types.MojomInterface _media_clock_Clock__() {
+ return new mojom_types.MojomInterface()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'Clock'
+ ..fullIdentifier = 'mojo.media.Clock')
+ ..interfaceName = 'Clock'
+ ..methods = <int, mojom_types.MojomMethod>{
+
+ };
+}
+
+class _ClockServiceDescription implements service_describer.ServiceDescription {
+dynamic getTopLevelInterface([Function responseFactory = null]) {
+ return _media_clock_Clock__();
+ }
+ dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions()[typeKey];
+ }
+ dynamic getAllTypeDefinitions([Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions();
+ }
+}
abstract class Clock {
static const String serviceName = null;
@@ -109,6 +163,9 @@ class _ClockProxyImpl extends bindings.Proxy {
return new _ClockProxyImpl.fromEndpoint(endpoint);
}
+ service_describer.ServiceDescription get serviceDescription =>
+ new _ClockServiceDescription();
+
void handleResponse(bindings.ServiceMessage message) {
switch (message.header.type) {
default:
@@ -238,6 +295,35 @@ class ClockStub extends bindings.Stub {
}
int get version => 0;
+
+
+ service_describer.ServiceDescription get serviceDescription =>
+ new _ClockServiceDescription();
+}
+
+
+
+
+
+
+
+Map<String, mojom_types.UserDefinedType> _initDescriptions() {
+ var map = new HashMap<String, mojom_types.UserDefinedType>();
+map["_media_clock_ClockDisposition__"] =
+ new mojom_types.UserDefinedType()
+ ..enumType = _media_clock_ClockDisposition__();
+map["_media_clock_Clock__"] =
+ new mojom_types.UserDefinedType()
+ ..interfaceType = _media_clock_Clock__();
+
+ 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