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

Unified Diff: mojo/dart/packages/mojo_services/lib/mojo/content_handler.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/content_handler.mojom.dart
diff --git a/mojo/dart/packages/mojo_services/lib/mojo/content_handler.mojom.dart b/mojo/dart/packages/mojo_services/lib/mojo/content_handler.mojom.dart
index 3dd3ffd05f936e250260dc7d57fa77047ddd9cad..fbcb92244827d6f89f5d83555c1573572a1a7c86 100644
--- a/mojo/dart/packages/mojo_services/lib/mojo/content_handler.mojom.dart
+++ b/mojo/dart/packages/mojo_services/lib/mojo/content_handler.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;
import 'package:mojo/mojo/application.mojom.dart' as application_mojom;
import 'package:mojo/mojo/url_response.mojom.dart' as url_response_mojom;
@@ -87,11 +89,62 @@ class ContentHandlerStartApplicationParams extends bindings.Struct {
}
}
+mojom_types.MojomStruct _content_handler_ContentHandler_StartApplication_Params__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'ContentHandlerStartApplicationParams')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Application')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..isInterfaceRequest = true
+ ..identifier = '_application_Application__'
+ ..typeKey = '_application_Application__'
+ )),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Response')
+ ..type = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_url_response_URLResponse__'
+ ..typeKey = '_url_response_URLResponse__'
+ )),
+ ];
+}
+
+
const int kContentHandler_startApplication_name = 0;
const String ContentHandlerName =
'mojo::ContentHandler';
+mojom_types.MojomInterface _content_handler_ContentHandler__() {
+ return new mojom_types.MojomInterface()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "ContentHandler")
+ ..interfaceName = "ContentHandler"
+ ..methods = <int, mojom_types.MojomMethod>{
+kContentHandler_startApplication_name: new mojom_types.MojomMethod()
+ ..declData = (new mojom_types.DeclarationData()..shortName = "StartApplication")
+ ..ordinal = kContentHandler_startApplication_name..parameters = _content_handler_ContentHandler_StartApplication_Params__(),
+ };
+}
+
+class _ContentHandlerServiceDescription extends service_describer.ServiceDescription {
+ // Avoid infinite loop by overriding serviceDescription field.
+ final service_describer.ServiceDescription serviceDescription = null;
+dynamic getTopLevelInterface([Function responseFactory = null]) {
+ return _content_handler_ContentHandler__();
+ }
+ dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions()[typeKey];
+ }
+ dynamic getAllTypeDefinitions([Function responseFactory = null]) {
+ return getAllMojomTypeDefinitions();
+ }
+}
+
abstract class ContentHandler {
void startApplication(Object application, url_response_mojom.UrlResponse response);
@@ -115,6 +168,9 @@ class ContentHandlerProxyImpl extends bindings.Proxy {
String get name => ContentHandlerName;
+ service_describer.ServiceDescription get serviceDescription =>
+ new _ContentHandlerServiceDescription();
+
void handleResponse(bindings.ServiceMessage message) {
switch (message.header.type) {
default:
@@ -261,6 +317,48 @@ class ContentHandlerStub extends bindings.Stub {
}
int get version => 0;
+
+ service_describer.ServiceDescription get serviceDescription =>
+ new _ContentHandlerServiceDescription();
+}
+
+
+
+
+
+
+
+
+var _MojomDesc__ = _initDescriptions();
+
+Map<String, mojom_types.UserDefinedType> _initDescriptions() {
+ var map = new Map<String, mojom_types.UserDefinedType>();
+
+ map["_content_handler_ContentHandler_StartApplication_Params__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _content_handler_ContentHandler_StartApplication_Params__();
+
+
+
+
+
+
+
+ map["_content_handler_ContentHandler__"] =
+ new mojom_types.UserDefinedType()
+ ..interfaceType = _content_handler_ContentHandler__();
+
+application_mojom.getAllMojomTypeDefinitions().forEach((String s, mojom_types.UserDefinedType udt) {
+ map[s] = udt;
+});
+url_response_mojom.getAllMojomTypeDefinitions().forEach((String s, mojom_types.UserDefinedType udt) {
+ map[s] = udt;
+});
+ return map;
+}
+
+Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() {
+ return _MojomDesc__;
}

Powered by Google App Engine
This is Rietveld 408576698