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

Unified Diff: mojo/dart/packages/mojo_services/lib/mojo/http_message.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/mojo/http_message.mojom.dart
diff --git a/mojo/dart/packages/mojo_services/lib/mojo/http_message.mojom.dart b/mojo/dart/packages/mojo_services/lib/mojo/http_message.mojom.dart
index 959db5ca83641efd360e66a696d5a3aa400a0cf6..5d852bbf4a5296588b634a472d2ece73cc89edaa 100644
--- a/mojo/dart/packages/mojo_services/lib/mojo/http_message.mojom.dart
+++ b/mojo/dart/packages/mojo_services/lib/mojo/http_message.mojom.dart
@@ -5,9 +5,12 @@
library http_message_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/http_header.mojom.dart' as http_header_mojom;
@@ -119,6 +122,42 @@ class HttpRequest extends bindings.Struct {
'Object containing handles cannot be encoded to JSON.');
}
}
+mojom_types.MojomStruct _http_message_HttpRequest__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'HttpRequest'
+ ..fullIdentifier = 'mojo.HttpRequest')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Method')
+ ..type = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = false)),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Url')
+ ..type = (new mojom_types.Type()
+..stringType = (new mojom_types.StringType()..nullable = false)),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Headers')
+ ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType()
+ ..nullable = true
+
+ ..elementType = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_http_header_HttpHeader__'
+ ..typeKey = '_http_header_HttpHeader__'
+ )))),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Body')
+ ..type = (new mojom_types.Type()
+..handleType = (new mojom_types.HandleType()
+..kind = mojom_types.HandleTypeKind.dataPipeConsumer
+..nullable = true)),
+ ];
+}
class HttpResponse extends bindings.Struct {
@@ -220,5 +259,64 @@ class HttpResponse extends bindings.Struct {
'Object containing handles cannot be encoded to JSON.');
}
}
+mojom_types.MojomStruct _http_message_HttpResponse__() {
+ return new mojom_types.MojomStruct()
+ ..declData = (new mojom_types.DeclarationData()
+ ..shortName = 'HttpResponse'
+ ..fullIdentifier = 'mojo.HttpResponse')
+ ..fields = <mojom_types.StructField>[
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'StatusCode')
+ ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.uint32),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Headers')
+ ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType()
+ ..nullable = true
+
+ ..elementType = (new mojom_types.Type()
+ ..typeReference = (new mojom_types.TypeReference()
+
+ ..identifier = '_http_header_HttpHeader__'
+ ..typeKey = '_http_header_HttpHeader__'
+ )))),
+
+ new mojom_types.StructField()
+ ..declData = (new mojom_types.DeclarationData()..shortName = 'Body')
+ ..type = (new mojom_types.Type()
+..handleType = (new mojom_types.HandleType()
+..kind = mojom_types.HandleTypeKind.dataPipeConsumer
+..nullable = true)),
+ ];
+}
+
+
+
+
+
+
+
+
+Map<String, mojom_types.UserDefinedType> _initDescriptions() {
+ var map = new HashMap<String, mojom_types.UserDefinedType>();
+map["_http_message_HttpRequest__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _http_message_HttpRequest__();
+map["_http_message_HttpResponse__"] =
+ new mojom_types.UserDefinedType()
+ ..structType = _http_message_HttpResponse__();
+http_header_mojom.getAllMojomTypeDefinitions().forEach((String s, mojom_types.UserDefinedType udt) {
+ map[s] = udt;
+});
+
+ 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