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

Unified Diff: mojo/dart/packages/mojo_services/lib/notifications/notifications.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/notifications/notifications.mojom.dart
diff --git a/mojo/dart/packages/mojo_services/lib/notifications/notifications.mojom.dart b/mojo/dart/packages/mojo_services/lib/notifications/notifications.mojom.dart
index 0875c0ea67b6fbfec02b6632c8b9077fd1650ae3..badbebb0366ed177f4c7df72c96b21180bd6c5cf 100644
--- a/mojo/dart/packages/mojo_services/lib/notifications/notifications.mojom.dart
+++ b/mojo/dart/packages/mojo_services/lib/notifications/notifications.mojom.dart
@@ -5,9 +5,12 @@
library notifications_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;
@@ -112,6 +115,35 @@ class NotificationData extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _notifications_NotificationData__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'NotificationData'
+ ..fullIdentifier = 'notifications.NotificationData')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Title')
+ ..type = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = true)),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Text')
+ ..type = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = true)),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'PlaySound')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.bool),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Vibrate')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.bool),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'SetLights')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.bool),
+ ];
+}
class _NotificationClientOnSelectedParams extends bindings.Struct {
@@ -170,6 +202,13 @@ class _NotificationClientOnSelectedParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _notifications_NotificationClient_OnSelected_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = '_NotificationClientOnSelectedParams'
+ ..fullIdentifier = 'notifications._NotificationClientOnSelectedParams')
+ ..fields = <mojom_types.StructField>[];
+}
class _NotificationClientOnDismissedParams extends bindings.Struct {
@@ -228,6 +267,13 @@ class _NotificationClientOnDismissedParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _notifications_NotificationClient_OnDismissed_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = '_NotificationClientOnDismissedParams'
+ ..fullIdentifier = 'notifications._NotificationClientOnDismissedParams')
+ ..fields = <mojom_types.StructField>[];
+}
class _NotificationUpdateParams extends bindings.Struct {
@@ -296,6 +342,22 @@ class _NotificationUpdateParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _notifications_Notification_Update_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = '_NotificationUpdateParams'
+ ..fullIdentifier = 'notifications._NotificationUpdateParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'NotificationData')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_notifications_NotificationData__'
+ ..typeKey = '_notifications_NotificationData__'
+ )),
+ ];
+}
class _NotificationCancelParams extends bindings.Struct {
@@ -354,6 +416,13 @@ class _NotificationCancelParams extends bindings.Struct {
return map;
}
}
+mojom_types.MojomStruct _notifications_Notification_Cancel_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = '_NotificationCancelParams'
+ ..fullIdentifier = 'notifications._NotificationCancelParams')
+ ..fields = <mojom_types.StructField>[];
+}
class _NotificationServicePostParams extends bindings.Struct {
@@ -437,10 +506,77 @@ class _NotificationServicePostParams extends bindings.Struct {
'Object containing handles cannot be encoded to JSON.');
}
}
+mojom_types.MojomStruct _notifications_NotificationService_Post_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = '_NotificationServicePostParams'
+ ..fullIdentifier = 'notifications._NotificationServicePostParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'NotificationData')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_notifications_NotificationData__'
+ ..typeKey = '_notifications_NotificationData__'
+ )),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Client')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+ ..nullable = true
+
+
+ ..identifier = '_notifications_NotificationClient__'
+ ..typeKey = '_notifications_NotificationClient__'
+ )),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Notification')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+ ..nullable = true
+
+
+ ..isInterfaceRequest = true
+ ..identifier = '_notifications_Notification__'
+ ..typeKey = '_notifications_Notification__'
+ )),
+ ];
+}
+
const int _NotificationClient_onSelectedName = 0;
const int _NotificationClient_onDismissedName = 1;
+mojom_types.MojomInterface _notifications_NotificationClient__() {
+ return new mojom_types.MojomInterface()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'NotificationClient'
+ ..fullIdentifier = 'notifications.NotificationClient')
+ ..interfaceName = 'NotificationClient'
+ ..methods = <int, mojom_types.MojomMethod>{
+_NotificationClient_onSelectedName: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'OnSelected')
+ ..ordinal = _NotificationClient_onSelectedName..parameters = _notifications_NotificationClient_OnSelected_Params__(),_NotificationClient_onDismissedName: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'OnDismissed')
+ ..ordinal = _NotificationClient_onDismissedName..parameters = _notifications_NotificationClient_OnDismissed_Params__(),
+ };
+}
+
+class _NotificationClientServiceDescription implements service_describer.ServiceDescription {
+dynamic getTopLevelInterface([Function responseFactory = null]) {
+ return _notifications_NotificationClient__();
+ }
+ dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions()[typeKey];
+ }
+ dynamic getAllTypeDefinitions([Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions();
+ }
+}
+
abstract class NotificationClient {
static const String serviceName = null;
void onSelected();
@@ -463,6 +599,9 @@ class _NotificationClientProxyImpl extends bindings.Proxy {
return new _NotificationClientProxyImpl.fromEndpoint(endpoint);
}
+ service_describer.ServiceDescription get serviceDescription =>
+ new _NotificationClientServiceDescription();
+
void handleResponse(bindings.ServiceMessage message) {
switch (message.header.type) {
default:
@@ -618,11 +757,42 @@ class NotificationClientStub extends bindings.Stub {
}
int get version => 0;
+
+
+ service_describer.ServiceDescription get serviceDescription =>
+ new _NotificationClientServiceDescription();
}
const int _Notification_updateName = 0;
const int _Notification_cancelName = 1;
+mojom_types.MojomInterface _notifications_Notification__() {
+ return new mojom_types.MojomInterface()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'Notification'
+ ..fullIdentifier = 'notifications.Notification')
+ ..interfaceName = 'Notification'
+ ..methods = <int, mojom_types.MojomMethod>{
+_Notification_updateName: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Update')
+ ..ordinal = _Notification_updateName..parameters = _notifications_Notification_Update_Params__(),_Notification_cancelName: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Cancel')
+ ..ordinal = _Notification_cancelName..parameters = _notifications_Notification_Cancel_Params__(),
+ };
+}
+
+class _NotificationServiceDescription implements service_describer.ServiceDescription {
+dynamic getTopLevelInterface([Function responseFactory = null]) {
+ return _notifications_Notification__();
+ }
+ dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions()[typeKey];
+ }
+ dynamic getAllTypeDefinitions([Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions();
+ }
+}
+
abstract class Notification {
static const String serviceName = null;
void update(NotificationData notificationData);
@@ -645,6 +815,9 @@ class _NotificationProxyImpl extends bindings.Proxy {
return new _NotificationProxyImpl.fromEndpoint(endpoint);
}
+ service_describer.ServiceDescription get serviceDescription =>
+ new _NotificationServiceDescription();
+
void handleResponse(bindings.ServiceMessage message) {
switch (message.header.type) {
default:
@@ -801,10 +974,39 @@ class NotificationStub extends bindings.Stub {
}
int get version => 0;
+
+
+ service_describer.ServiceDescription get serviceDescription =>
+ new _NotificationServiceDescription();
}
const int _NotificationService_postName = 0;
+mojom_types.MojomInterface _notifications_NotificationService__() {
+ return new mojom_types.MojomInterface()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'NotificationService'
+ ..fullIdentifier = 'notifications.NotificationService')
+ ..interfaceName = 'NotificationService'
+ ..methods = <int, mojom_types.MojomMethod>{
+_NotificationService_postName: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Post')
+ ..ordinal = _NotificationService_postName..parameters = _notifications_NotificationService_Post_Params__(),
+ };
+}
+
+class _NotificationServiceServiceDescription implements service_describer.ServiceDescription {
+dynamic getTopLevelInterface([Function responseFactory = null]) {
+ return _notifications_NotificationService__();
+ }
+ dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions()[typeKey];
+ }
+ dynamic getAllTypeDefinitions([Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions();
+ }
+}
+
abstract class NotificationService {
static const String serviceName = "notifications::NotificationService";
void post(NotificationData notificationData, Object client, Object notification);
@@ -826,6 +1028,9 @@ class _NotificationServiceProxyImpl extends bindings.Proxy {
return new _NotificationServiceProxyImpl.fromEndpoint(endpoint);
}
+ service_describer.ServiceDescription get serviceDescription =>
+ new _NotificationServiceServiceDescription();
+
void handleResponse(bindings.ServiceMessage message) {
switch (message.header.type) {
default:
@@ -971,6 +1176,56 @@ class NotificationServiceStub extends bindings.Stub {
}
int get version => 0;
+
+
+ service_describer.ServiceDescription get serviceDescription =>
+ new _NotificationServiceServiceDescription();
}
+
+
+
+
+
+Map<String, mojom_types.UserDefinedType> _initDescriptions() {
+ var map = new HashMap<String, mojom_types.UserDefinedType>();
+map["_notifications_NotificationData__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _notifications_NotificationData__();
+map["_notifications_NotificationClient_OnSelected_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _notifications_NotificationClient_OnSelected_Params__();
+map["_notifications_NotificationClient_OnDismissed_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _notifications_NotificationClient_OnDismissed_Params__();
+map["_notifications_Notification_Update_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _notifications_Notification_Update_Params__();
+map["_notifications_Notification_Cancel_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _notifications_Notification_Cancel_Params__();
+map["_notifications_NotificationService_Post_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _notifications_NotificationService_Post_Params__();
+map["_notifications_NotificationClient__"] =
+ new mojom_types.UserDefinedType()
+ ..interfaceType = _notifications_NotificationClient__();
+map["_notifications_Notification__"] =
+ new mojom_types.UserDefinedType()
+ ..interfaceType = _notifications_Notification__();
+map["_notifications_NotificationService__"] =
+ new mojom_types.UserDefinedType()
+ ..interfaceType = _notifications_NotificationService__();
+
+ 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