| 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__;
|
| }
|
|
|
|
|
|
|