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

Unified Diff: mojo/dart/packages/mojo/lib/mojo/shell.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/lib/mojo/shell.mojom.dart
diff --git a/mojo/dart/packages/mojo/lib/mojo/shell.mojom.dart b/mojo/dart/packages/mojo/lib/mojo/shell.mojom.dart
index 0c8d92600ee8ded3730a8109f06a1978c70c5fa9..cda0aaf2dee03f462d938c51703d54cb994f593b 100644
--- a/mojo/dart/packages/mojo/lib/mojo/shell.mojom.dart
+++ b/mojo/dart/packages/mojo/lib/mojo/shell.mojom.dart
@@ -5,9 +5,12 @@
library shell_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/mojo/application_connector.mojom.dart' as application_connector_mojom;
import 'package:mojo/mojo/service_provider.mojom.dart' as service_provider_mojom;
@@ -93,6 +96,41 @@ class _ShellConnectToApplicationParams extends bindings.Struct {
'Object containing handles cannot be encoded to JSON.');
}
}
+mojom_types.MojomStruct _shell_Shell_ConnectToApplication_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = '_ShellConnectToApplicationParams'
+ ..fullIdentifier = 'mojo._ShellConnectToApplicationParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ApplicationUrl')
+ ..type = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = false)),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Services')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+ ..nullable = true
+
+
+ ..isInterfaceRequest = true
+ ..identifier = '_service_provider_ServiceProvider__'
+ ..typeKey = '_service_provider_ServiceProvider__'
+ )),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ExposedServices')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+ ..nullable = true
+
+
+ ..identifier = '_service_provider_ServiceProvider__'
+ ..typeKey = '_service_provider_ServiceProvider__'
+ )),
+ ];
+}
class _ShellCreateApplicationConnectorParams extends bindings.Struct {
@@ -159,10 +197,55 @@ class _ShellCreateApplicationConnectorParams extends bindings.Struct {
'Object containing handles cannot be encoded to JSON.');
}
}
+mojom_types.MojomStruct _shell_Shell_CreateApplicationConnector_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = '_ShellCreateApplicationConnectorParams'
+ ..fullIdentifier = 'mojo._ShellCreateApplicationConnectorParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ApplicationConnectorRequest')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..isInterfaceRequest = true
+ ..identifier = '_application_connector_ApplicationConnector__'
+ ..typeKey = '_application_connector_ApplicationConnector__'
+ )),
+ ];
+}
+
const int _Shell_connectToApplicationName = 0;
const int _Shell_createApplicationConnectorName = 1;
+mojom_types.MojomInterface _shell_Shell__() {
+ return new mojom_types.MojomInterface()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'Shell'
+ ..fullIdentifier = 'mojo.Shell')
+ ..interfaceName = 'Shell'
+ ..methods = <int, mojom_types.MojomMethod>{
+_Shell_connectToApplicationName: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ConnectToApplication')
+ ..ordinal = _Shell_connectToApplicationName..parameters = _shell_Shell_ConnectToApplication_Params__(),_Shell_createApplicationConnectorName: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'CreateApplicationConnector')
+ ..ordinal = _Shell_createApplicationConnectorName..parameters = _shell_Shell_CreateApplicationConnector_Params__(),
+ };
+}
+
+class _ShellServiceDescription implements service_describer.ServiceDescription {
+dynamic getTopLevelInterface([Function responseFactory = null]) {
+ return _shell_Shell__();
+ }
+ dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions()[typeKey];
+ }
+ dynamic getAllTypeDefinitions([Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions();
+ }
+}
+
abstract class Shell {
static const String serviceName = null;
void connectToApplication(String applicationUrl, Object services, Object exposedServices);
@@ -185,6 +268,9 @@ class _ShellProxyImpl extends bindings.Proxy {
return new _ShellProxyImpl.fromEndpoint(endpoint);
}
+ service_describer.ServiceDescription get serviceDescription =>
+ new _ShellServiceDescription();
+
void handleResponse(bindings.ServiceMessage message) {
switch (message.header.type) {
default:
@@ -344,6 +430,44 @@ class ShellStub extends bindings.Stub {
}
int get version => 0;
+
+
+ service_describer.ServiceDescription get serviceDescription =>
+ new _ShellServiceDescription();
}
+
+
+
+
+
+Map<String, mojom_types.UserDefinedType> _initDescriptions() {
+ var map = new HashMap<String, mojom_types.UserDefinedType>();
+map["_shell_Shell_ConnectToApplication_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _shell_Shell_ConnectToApplication_Params__();
+map["_shell_Shell_CreateApplicationConnector_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _shell_Shell_CreateApplicationConnector_Params__();
+map["_shell_Shell__"] =
+ new mojom_types.UserDefinedType()
+ ..interfaceType = _shell_Shell__();
+application_connector_mojom.getAllMojomTypeDefinitions().forEach((String s, mojom_types.UserDefinedType udt) {
+ map[s] = udt;
+});
+service_provider_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