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

Unified Diff: mojo/dart/packages/mojo_services/lib/mojo/clipboard.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/clipboard.mojom.dart
diff --git a/mojo/dart/packages/mojo_services/lib/mojo/clipboard.mojom.dart b/mojo/dart/packages/mojo_services/lib/mojo/clipboard.mojom.dart
index 2bc4485856e59e58015ace67f731bb18caef6970..72050c8675ea3de900642777214e7dd2e233b595 100644
--- a/mojo/dart/packages/mojo_services/lib/mojo/clipboard.mojom.dart
+++ b/mojo/dart/packages/mojo_services/lib/mojo/clipboard.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;
@@ -81,6 +83,21 @@ class ClipboardGetSequenceNumberParams extends bindings.Struct {
}
}
+mojom_types.MojomStruct _clipboard_Clipboard_GetSequenceNumber_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ClipboardGetSequenceNumberParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ClipboardType')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_clipboard_Type__'
+ ..typeKey = '_clipboard_Type__'
+ )),
+ ];
+}
+
class ClipboardGetSequenceNumberResponseParams extends bindings.Struct {
static const List<bindings.StructDataHeader> kVersions = const [
@@ -148,6 +165,16 @@ class ClipboardGetSequenceNumberResponseParams extends bindings.Struct {
}
}
+mojom_types.MojomStruct _clipboard_Clipboard_GetSequenceNumber_ResponseParams__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ClipboardGetSequenceNumberResponseParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Sequence')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.UINT64),
+ ];
+}
+
class ClipboardGetAvailableMimeTypesParams extends bindings.Struct {
static const List<bindings.StructDataHeader> kVersions = const [
@@ -219,6 +246,21 @@ class ClipboardGetAvailableMimeTypesParams extends bindings.Struct {
}
}
+mojom_types.MojomStruct _clipboard_Clipboard_GetAvailableMimeTypes_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ClipboardGetAvailableMimeTypesParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ClipboardTypes')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_clipboard_Type__'
+ ..typeKey = '_clipboard_Type__'
+ )),
+ ];
+}
+
class ClipboardGetAvailableMimeTypesResponseParams extends bindings.Struct {
static const List<bindings.StructDataHeader> kVersions = const [
@@ -302,6 +344,18 @@ class ClipboardGetAvailableMimeTypesResponseParams extends bindings.Struct {
}
}
+mojom_types.MojomStruct _clipboard_Clipboard_GetAvailableMimeTypes_ResponseParams__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ClipboardGetAvailableMimeTypesResponseParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Types')
+ ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType()
+ ..elementType = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = false)))),
+ ];
+}
+
class ClipboardReadMimeTypeParams extends bindings.Struct {
static const List<bindings.StructDataHeader> kVersions = const [
@@ -382,6 +436,26 @@ class ClipboardReadMimeTypeParams extends bindings.Struct {
}
}
+mojom_types.MojomStruct _clipboard_Clipboard_ReadMimeType_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ClipboardReadMimeTypeParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ClipboardType')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_clipboard_Type__'
+ ..typeKey = '_clipboard_Type__'
+ )),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'MimeType')
+ ..type = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = false)),
+ ];
+}
+
class ClipboardReadMimeTypeResponseParams extends bindings.Struct {
static const List<bindings.StructDataHeader> kVersions = const [
@@ -449,6 +523,19 @@ class ClipboardReadMimeTypeResponseParams extends bindings.Struct {
}
}
+mojom_types.MojomStruct _clipboard_Clipboard_ReadMimeType_ResponseParams__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ClipboardReadMimeTypeResponseParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Data')
+ ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType()
+ ..nullable = true
+
+ ..elementType = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.UINT8))),
+ ];
+}
+
class ClipboardWriteClipboardDataParams extends bindings.Struct {
static const List<bindings.StructDataHeader> kVersions = const [
@@ -585,6 +672,32 @@ class ClipboardWriteClipboardDataParams extends bindings.Struct {
}
}
+mojom_types.MojomStruct _clipboard_Clipboard_WriteClipboardData_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ClipboardWriteClipboardDataParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ClipboardType')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_clipboard_Type__'
+ ..typeKey = '_clipboard_Type__'
+ )),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Data')
+ ..type = (new mojom_types.Type()..mapType = (new mojom_types.MapType()
+ ..nullable = true
+
+ ..keyType = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = false))
+ ..valueType = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType()
+ ..elementType = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.UINT8))))),
+ ];
+}
+
+
const int kClipboard_getSequenceNumber_name = 0;
const int kClipboard_getAvailableMimeTypes_name = 1;
const int kClipboard_readMimeType_name = 2;
@@ -643,12 +756,63 @@ const String ClipboardName =
return 'ClipboardType.SELECTION';
case DRAG:
return 'ClipboardType.DRAG';
+ default:
+ return null;
}
}
int toJson() => value;
}
+mojom_types.MojomEnum _clipboard_Type__() {
+ return new mojom_types.MojomEnum()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "ClipboardType")
+ ..values = <mojom_types.EnumValue>[new mojom_types.EnumValue()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "COPY_PASTE")
+ ..enumTypeKey = '_clipboard_Type__'
+ ..intValue = 0,new mojom_types.EnumValue()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "SELECTION")
+ ..enumTypeKey = '_clipboard_Type__'
+ ..intValue = 1,new mojom_types.EnumValue()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "DRAG")
+ ..enumTypeKey = '_clipboard_Type__'
+ ..intValue = 2,];
+}
+
+mojom_types.MojomInterface _clipboard_Clipboard__() {
+ return new mojom_types.MojomInterface()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "Clipboard")
+ ..interfaceName = "Clipboard"
+ ..methods = <int, mojom_types.MojomMethod>{
+kClipboard_getSequenceNumber_name: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "GetSequenceNumber")
+ ..ordinal = kClipboard_getSequenceNumber_name
+ ..responseParams = _clipboard_Clipboard_GetSequenceNumber_ResponseParams__()..parameters = _clipboard_Clipboard_GetSequenceNumber_Params__(),kClipboard_getAvailableMimeTypes_name: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "GetAvailableMimeTypes")
+ ..ordinal = kClipboard_getAvailableMimeTypes_name
+ ..responseParams = _clipboard_Clipboard_GetAvailableMimeTypes_ResponseParams__()..parameters = _clipboard_Clipboard_GetAvailableMimeTypes_Params__(),kClipboard_readMimeType_name: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "ReadMimeType")
+ ..ordinal = kClipboard_readMimeType_name
+ ..responseParams = _clipboard_Clipboard_ReadMimeType_ResponseParams__()..parameters = _clipboard_Clipboard_ReadMimeType_Params__(),kClipboard_writeClipboardData_name: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "WriteClipboardData")
+ ..ordinal = kClipboard_writeClipboardData_name..parameters = _clipboard_Clipboard_WriteClipboardData_Params__(),
+ };
+}
+
+class _ClipboardServiceDescription extends service_describer.ServiceDescription {
+ // Avoid infinite loop by overriding serviceDescription field.
+ final service_describer.ServiceDescription serviceDescription = null;
+dynamic getTopLevelInterface([Function responseFactory = null]) {
+ return _clipboard_Clipboard__();
+ }
+ dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions()[typeKey];
+ }
+ dynamic getAllTypeDefinitions([Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions();
+ }
+}
+
abstract class Clipboard {
dynamic getSequenceNumber(ClipboardType clipboardType,[Function responseFactory = null]);
dynamic getAvailableMimeTypes(ClipboardType clipboardTypes,[Function responseFactory = null]);
@@ -678,6 +842,9 @@ class ClipboardProxyImpl extends bindings.Proxy {
String get name => ClipboardName;
+ service_describer.ServiceDescription get serviceDescription =>
+ new _ClipboardServiceDescription();
+
void handleResponse(bindings.ServiceMessage message) {
switch (message.header.type) {
case kClipboard_getSequenceNumber_name:
@@ -993,6 +1160,97 @@ class ClipboardStub extends bindings.Stub {
}
int get version => 0;
+
+ service_describer.ServiceDescription get serviceDescription =>
+ new _ClipboardServiceDescription();
+}
+
+
+
+
+
+
+
+
+var _MojomDesc__ = _initDescriptions();
+
+Map<String, mojom_types.UserDefinedType> _initDescriptions() {
+ var map = new Map<String, mojom_types.UserDefinedType>();
+
+ map["_clipboard_Clipboard_GetSequenceNumber_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _clipboard_Clipboard_GetSequenceNumber_Params__();
+
+
+ map["_clipboard_Type__"] =
+ new mojom_types.UserDefinedType()
+ ..enumType = _clipboard_Type__();
+
+
+
+
+ map["_clipboard_Clipboard_GetSequenceNumber_ResponseParams__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _clipboard_Clipboard_GetSequenceNumber_ResponseParams__();
+
+
+
+
+
+ map["_clipboard_Clipboard_GetAvailableMimeTypes_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _clipboard_Clipboard_GetAvailableMimeTypes_Params__();
+
+
+
+
+
+ map["_clipboard_Clipboard_GetAvailableMimeTypes_ResponseParams__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _clipboard_Clipboard_GetAvailableMimeTypes_ResponseParams__();
+
+
+
+
+
+ map["_clipboard_Clipboard_ReadMimeType_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _clipboard_Clipboard_ReadMimeType_Params__();
+
+
+
+
+
+
+
+ map["_clipboard_Clipboard_ReadMimeType_ResponseParams__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _clipboard_Clipboard_ReadMimeType_ResponseParams__();
+
+
+
+
+
+ map["_clipboard_Clipboard_WriteClipboardData_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _clipboard_Clipboard_WriteClipboardData_Params__();
+
+
+
+
+
+
+
+ map["_clipboard_Clipboard__"] =
+ new mojom_types.UserDefinedType()
+ ..interfaceType = _clipboard_Clipboard__();
+
+
+ return map;
+}
+
+Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() {
+ return _MojomDesc__;
}

Powered by Google App Engine
This is Rietveld 408576698