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

Side by Side Diff: mojo/dart/packages/mojo/lib/mojo/url_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 url_request_mojom; 5 library url_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;
12
11 import 'package:mojo/mojo/http_header.mojom.dart' as http_header_mojom; 13 import 'package:mojo/mojo/http_header.mojom.dart' as http_header_mojom;
12 14
13 15
14 16
15 class UrlRequestCacheMode extends bindings.MojoEnum { 17 class UrlRequestCacheMode extends bindings.MojoEnum {
16 static const UrlRequestCacheMode default_ = const UrlRequestCacheMode._(0); 18 static const UrlRequestCacheMode default_ = const UrlRequestCacheMode._(0);
17 static const UrlRequestCacheMode bypassCache = const UrlRequestCacheMode._(1); 19 static const UrlRequestCacheMode bypassCache = const UrlRequestCacheMode._(1);
18 static const UrlRequestCacheMode onlyFromCache = const UrlRequestCacheMode._(2 ); 20 static const UrlRequestCacheMode onlyFromCache = const UrlRequestCacheMode._(2 );
19 21
20 const UrlRequestCacheMode._(int v) : super(v); 22 const UrlRequestCacheMode._(int v) : super(v);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 } 58 }
57 59
58 String toString() { 60 String toString() {
59 switch(this) { 61 switch(this) {
60 case default_: 62 case default_:
61 return 'UrlRequestCacheMode.default_'; 63 return 'UrlRequestCacheMode.default_';
62 case bypassCache: 64 case bypassCache:
63 return 'UrlRequestCacheMode.bypassCache'; 65 return 'UrlRequestCacheMode.bypassCache';
64 case onlyFromCache: 66 case onlyFromCache:
65 return 'UrlRequestCacheMode.onlyFromCache'; 67 return 'UrlRequestCacheMode.onlyFromCache';
68 default:
69 return null;
66 } 70 }
67 } 71 }
68 72
69 int toJson() => mojoEnumValue; 73 int toJson() => mojoEnumValue;
70 } 74 }
71 75
76
77
72 class UrlRequest extends bindings.Struct { 78 class UrlRequest extends bindings.Struct {
73 static const List<bindings.StructDataHeader> kVersions = const [ 79 static const List<bindings.StructDataHeader> kVersions = const [
74 const bindings.StructDataHeader(56, 0) 80 const bindings.StructDataHeader(56, 0)
75 ]; 81 ];
76 String url = null; 82 String url = null;
77 String method = "GET"; 83 String method = "GET";
78 List<http_header_mojom.HttpHeader> headers = null; 84 List<http_header_mojom.HttpHeader> headers = null;
79 List<core.MojoDataPipeConsumer> body = null; 85 List<core.MojoDataPipeConsumer> body = null;
80 int responseBodyBufferSize = 0; 86 int responseBodyBufferSize = 0;
81 bool autoFollowRedirects = false; 87 bool autoFollowRedirects = false;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 "cacheMode: $cacheMode" ")"; 205 "cacheMode: $cacheMode" ")";
200 } 206 }
201 207
202 Map toJson() { 208 Map toJson() {
203 throw new bindings.MojoCodecError( 209 throw new bindings.MojoCodecError(
204 'Object containing handles cannot be encoded to JSON.'); 210 'Object containing handles cannot be encoded to JSON.');
205 } 211 }
206 } 212 }
207 213
208 214
215
216
217
218
OLDNEW
« no previous file with comments | « mojo/dart/packages/mojo/lib/mojo/shell.mojom.dart ('k') | mojo/dart/packages/mojo/lib/mojo/url_response.mojom.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698