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

Unified Diff: mojo/dart/packages/mojo_services/lib/mojo/sharing.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_services/lib/mojo/sharing.mojom.dart
diff --git a/mojo/dart/packages/mojo_services/lib/mojo/sharing.mojom.dart b/mojo/dart/packages/mojo_services/lib/mojo/sharing.mojom.dart
index f4e46861fb107eae9cd6ccf3d9a66e72734713eb..694d6bb885d093db247e1bc790fe3a98020efde8 100644
--- a/mojo/dart/packages/mojo_services/lib/mojo/sharing.mojom.dart
+++ b/mojo/dart/packages/mojo_services/lib/mojo/sharing.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;
@@ -77,11 +79,48 @@ class SharingServiceShareTextParams extends bindings.Struct {
}
}
+mojom_types.MojomStruct _sharing_SharingService_ShareText_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'SharingServiceShareTextParams')
+ ..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)),
+ ];
+}
+
+
const int kSharingService_shareText_name = 0;
const String SharingServiceName =
'mojo::SharingService';
+mojom_types.MojomInterface _sharing_SharingService__() {
+ return new mojom_types.MojomInterface()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "SharingService")
+ ..interfaceName = "SharingService"
+ ..methods = <int, mojom_types.MojomMethod>{
+kSharingService_shareText_name: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "ShareText")
+ ..ordinal = kSharingService_shareText_name..parameters = _sharing_SharingService_ShareText_Params__(),
+ };
+}
+
+class _SharingServiceServiceDescription extends service_describer.ServiceDescription {
+ // Avoid infinite loop by overriding serviceDescription field.
+ final service_describer.ServiceDescription serviceDescription = null;
+dynamic getTopLevelInterface([Function responseFactory = null]) {
+ return _sharing_SharingService__();
+ }
+ dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions()[typeKey];
+ }
+ dynamic getAllTypeDefinitions([Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions();
+ }
+}
+
abstract class SharingService {
void shareText(String text);
@@ -105,6 +144,9 @@ class SharingServiceProxyImpl extends bindings.Proxy {
String get name => SharingServiceName;
+ service_describer.ServiceDescription get serviceDescription =>
+ new _SharingServiceServiceDescription();
+
void handleResponse(bindings.ServiceMessage message) {
switch (message.header.type) {
default:
@@ -250,6 +292,40 @@ class SharingServiceStub extends bindings.Stub {
}
int get version => 0;
+
+ service_describer.ServiceDescription get serviceDescription =>
+ new _SharingServiceServiceDescription();
+}
+
+
+
+
+
+
+
+
+var _MojomDesc__ = _initDescriptions();
+
+Map<String, mojom_types.UserDefinedType> _initDescriptions() {
+ var map = new Map<String, mojom_types.UserDefinedType>();
+
+ map["_sharing_SharingService_ShareText_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _sharing_SharingService_ShareText_Params__();
+
+
+
+
+
+ map["_sharing_SharingService__"] =
+ new mojom_types.UserDefinedType()
+ ..interfaceType = _sharing_SharingService__();
+
+ return map;
+}
+
+Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() {
+ return _MojomDesc__;
}

Powered by Google App Engine
This is Rietveld 408576698