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

Side by Side Diff: mojo/dart/packages/mojo_services/lib/http_server/http_request.mojom.dart

Issue 1539673003: Generate Mojom Types in Dart (Take 2) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Merge with master Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 library http_request_mojom; 5 library http_request_mojom;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:mojo/bindings.dart' as bindings; 9 import 'package:mojo/bindings.dart' as bindings;
10 import 'package:mojo/core.dart' as core; 10 import 'package:mojo/core.dart' as core;
11 import 'package:mojo/mojo/bindings/types/mojom_types.mojom.dart' as mojom_types;
11 12
12 13
13 14
15
14 class HttpRequest extends bindings.Struct { 16 class HttpRequest extends bindings.Struct {
15 static const List<bindings.StructDataHeader> kVersions = const [ 17 static const List<bindings.StructDataHeader> kVersions = const [
16 const bindings.StructDataHeader(40, 0) 18 const bindings.StructDataHeader(40, 0)
17 ]; 19 ];
18 String relativeUrl = null; 20 String relativeUrl = null;
19 String method = "GET"; 21 String method = "GET";
20 Map<String, String> headers = null; 22 Map<String, String> headers = null;
21 core.MojoDataPipeConsumer body = null; 23 core.MojoDataPipeConsumer body = null;
22 24
23 HttpRequest() : super(kVersions.last.size); 25 HttpRequest() : super(kVersions.last.size);
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 "body: $body" ")"; 152 "body: $body" ")";
151 } 153 }
152 154
153 Map toJson() { 155 Map toJson() {
154 throw new bindings.MojoCodecError( 156 throw new bindings.MojoCodecError(
155 'Object containing handles cannot be encoded to JSON.'); 157 'Object containing handles cannot be encoded to JSON.');
156 } 158 }
157 } 159 }
158 160
159 161
162
163
164
165
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698