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

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

Issue 2006093002: Dart: Futures -> Callbacks. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Cleanup Created 4 years, 6 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 geometry_mojom; 5 library geometry_mojom;
6 import 'package:mojo/bindings.dart' as bindings; 6 import 'package:mojo/bindings.dart' as bindings;
7 7
8 8
9 9
10 10
11 class Point extends bindings.Struct { 11 class Point extends bindings.Struct {
12 static const List<bindings.StructDataHeader> kVersions = const [ 12 static const List<bindings.StructDataHeader> kVersions = const [
13 const bindings.StructDataHeader(16, 0) 13 const bindings.StructDataHeader(16, 0)
14 ]; 14 ];
15 int x = 0; 15 int x = 0;
16 int y = 0; 16 int y = 0;
17 17
18 Point() : super(kVersions.last.size); 18 Point() : super(kVersions.last.size);
19 19
20 Point.init(
21 int this.x,
22 int this.y
23 ) : super(kVersions.last.size);
24
20 static Point deserialize(bindings.Message message) { 25 static Point deserialize(bindings.Message message) {
21 var decoder = new bindings.Decoder(message); 26 var decoder = new bindings.Decoder(message);
22 var result = decode(decoder); 27 var result = decode(decoder);
23 if (decoder.excessHandles != null) { 28 if (decoder.excessHandles != null) {
24 decoder.excessHandles.forEach((h) => h.close()); 29 decoder.excessHandles.forEach((h) => h.close());
25 } 30 }
26 return result; 31 return result;
27 } 32 }
28 33
29 static Point decode(bindings.Decoder decoder0) { 34 static Point decode(bindings.Decoder decoder0) {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 101
97 class PointF extends bindings.Struct { 102 class PointF extends bindings.Struct {
98 static const List<bindings.StructDataHeader> kVersions = const [ 103 static const List<bindings.StructDataHeader> kVersions = const [
99 const bindings.StructDataHeader(16, 0) 104 const bindings.StructDataHeader(16, 0)
100 ]; 105 ];
101 double x = 0.0; 106 double x = 0.0;
102 double y = 0.0; 107 double y = 0.0;
103 108
104 PointF() : super(kVersions.last.size); 109 PointF() : super(kVersions.last.size);
105 110
111 PointF.init(
112 double this.x,
113 double this.y
114 ) : super(kVersions.last.size);
115
106 static PointF deserialize(bindings.Message message) { 116 static PointF deserialize(bindings.Message message) {
107 var decoder = new bindings.Decoder(message); 117 var decoder = new bindings.Decoder(message);
108 var result = decode(decoder); 118 var result = decode(decoder);
109 if (decoder.excessHandles != null) { 119 if (decoder.excessHandles != null) {
110 decoder.excessHandles.forEach((h) => h.close()); 120 decoder.excessHandles.forEach((h) => h.close());
111 } 121 }
112 return result; 122 return result;
113 } 123 }
114 124
115 static PointF decode(bindings.Decoder decoder0) { 125 static PointF decode(bindings.Decoder decoder0) {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 192
183 class Size extends bindings.Struct { 193 class Size extends bindings.Struct {
184 static const List<bindings.StructDataHeader> kVersions = const [ 194 static const List<bindings.StructDataHeader> kVersions = const [
185 const bindings.StructDataHeader(16, 0) 195 const bindings.StructDataHeader(16, 0)
186 ]; 196 ];
187 int width = 0; 197 int width = 0;
188 int height = 0; 198 int height = 0;
189 199
190 Size() : super(kVersions.last.size); 200 Size() : super(kVersions.last.size);
191 201
202 Size.init(
203 int this.width,
204 int this.height
205 ) : super(kVersions.last.size);
206
192 static Size deserialize(bindings.Message message) { 207 static Size deserialize(bindings.Message message) {
193 var decoder = new bindings.Decoder(message); 208 var decoder = new bindings.Decoder(message);
194 var result = decode(decoder); 209 var result = decode(decoder);
195 if (decoder.excessHandles != null) { 210 if (decoder.excessHandles != null) {
196 decoder.excessHandles.forEach((h) => h.close()); 211 decoder.excessHandles.forEach((h) => h.close());
197 } 212 }
198 return result; 213 return result;
199 } 214 }
200 215
201 static Size decode(bindings.Decoder decoder0) { 216 static Size decode(bindings.Decoder decoder0) {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 static const List<bindings.StructDataHeader> kVersions = const [ 285 static const List<bindings.StructDataHeader> kVersions = const [
271 const bindings.StructDataHeader(24, 0) 286 const bindings.StructDataHeader(24, 0)
272 ]; 287 ];
273 int x = 0; 288 int x = 0;
274 int y = 0; 289 int y = 0;
275 int width = 0; 290 int width = 0;
276 int height = 0; 291 int height = 0;
277 292
278 Rect() : super(kVersions.last.size); 293 Rect() : super(kVersions.last.size);
279 294
295 Rect.init(
296 int this.x,
297 int this.y,
298 int this.width,
299 int this.height
300 ) : super(kVersions.last.size);
301
280 static Rect deserialize(bindings.Message message) { 302 static Rect deserialize(bindings.Message message) {
281 var decoder = new bindings.Decoder(message); 303 var decoder = new bindings.Decoder(message);
282 var result = decode(decoder); 304 var result = decode(decoder);
283 if (decoder.excessHandles != null) { 305 if (decoder.excessHandles != null) {
284 decoder.excessHandles.forEach((h) => h.close()); 306 decoder.excessHandles.forEach((h) => h.close());
285 } 307 }
286 return result; 308 return result;
287 } 309 }
288 310
289 static Rect decode(bindings.Decoder decoder0) { 311 static Rect decode(bindings.Decoder decoder0) {
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 static const List<bindings.StructDataHeader> kVersions = const [ 406 static const List<bindings.StructDataHeader> kVersions = const [
385 const bindings.StructDataHeader(24, 0) 407 const bindings.StructDataHeader(24, 0)
386 ]; 408 ];
387 double x = 0.0; 409 double x = 0.0;
388 double y = 0.0; 410 double y = 0.0;
389 double width = 0.0; 411 double width = 0.0;
390 double height = 0.0; 412 double height = 0.0;
391 413
392 RectF() : super(kVersions.last.size); 414 RectF() : super(kVersions.last.size);
393 415
416 RectF.init(
417 double this.x,
418 double this.y,
419 double this.width,
420 double this.height
421 ) : super(kVersions.last.size);
422
394 static RectF deserialize(bindings.Message message) { 423 static RectF deserialize(bindings.Message message) {
395 var decoder = new bindings.Decoder(message); 424 var decoder = new bindings.Decoder(message);
396 var result = decode(decoder); 425 var result = decode(decoder);
397 if (decoder.excessHandles != null) { 426 if (decoder.excessHandles != null) {
398 decoder.excessHandles.forEach((h) => h.close()); 427 decoder.excessHandles.forEach((h) => h.close());
399 } 428 }
400 return result; 429 return result;
401 } 430 }
402 431
403 static RectF decode(bindings.Decoder decoder0) { 432 static RectF decode(bindings.Decoder decoder0) {
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 double topLeftRadiusY = 0.0; 535 double topLeftRadiusY = 0.0;
507 double topRightRadiusX = 0.0; 536 double topRightRadiusX = 0.0;
508 double topRightRadiusY = 0.0; 537 double topRightRadiusY = 0.0;
509 double bottomLeftRadiusX = 0.0; 538 double bottomLeftRadiusX = 0.0;
510 double bottomLeftRadiusY = 0.0; 539 double bottomLeftRadiusY = 0.0;
511 double bottomRightRadiusX = 0.0; 540 double bottomRightRadiusX = 0.0;
512 double bottomRightRadiusY = 0.0; 541 double bottomRightRadiusY = 0.0;
513 542
514 RRectF() : super(kVersions.last.size); 543 RRectF() : super(kVersions.last.size);
515 544
545 RRectF.init(
546 double this.x,
547 double this.y,
548 double this.width,
549 double this.height,
550 double this.topLeftRadiusX,
551 double this.topLeftRadiusY,
552 double this.topRightRadiusX,
553 double this.topRightRadiusY,
554 double this.bottomLeftRadiusX,
555 double this.bottomLeftRadiusY,
556 double this.bottomRightRadiusX,
557 double this.bottomRightRadiusY
558 ) : super(kVersions.last.size);
559
516 static RRectF deserialize(bindings.Message message) { 560 static RRectF deserialize(bindings.Message message) {
517 var decoder = new bindings.Decoder(message); 561 var decoder = new bindings.Decoder(message);
518 var result = decode(decoder); 562 var result = decode(decoder);
519 if (decoder.excessHandles != null) { 563 if (decoder.excessHandles != null) {
520 decoder.excessHandles.forEach((h) => h.close()); 564 decoder.excessHandles.forEach((h) => h.close());
521 } 565 }
522 return result; 566 return result;
523 } 567 }
524 568
525 static RRectF decode(bindings.Decoder decoder0) { 569 static RRectF decode(bindings.Decoder decoder0) {
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 765
722 766
723 class Transform extends bindings.Struct { 767 class Transform extends bindings.Struct {
724 static const List<bindings.StructDataHeader> kVersions = const [ 768 static const List<bindings.StructDataHeader> kVersions = const [
725 const bindings.StructDataHeader(16, 0) 769 const bindings.StructDataHeader(16, 0)
726 ]; 770 ];
727 List<double> matrix = null; 771 List<double> matrix = null;
728 772
729 Transform() : super(kVersions.last.size); 773 Transform() : super(kVersions.last.size);
730 774
775 Transform.init(
776 List<double> this.matrix
777 ) : super(kVersions.last.size);
778
731 static Transform deserialize(bindings.Message message) { 779 static Transform deserialize(bindings.Message message) {
732 var decoder = new bindings.Decoder(message); 780 var decoder = new bindings.Decoder(message);
733 var result = decode(decoder); 781 var result = decode(decoder);
734 if (decoder.excessHandles != null) { 782 if (decoder.excessHandles != null) {
735 decoder.excessHandles.forEach((h) => h.close()); 783 decoder.excessHandles.forEach((h) => h.close());
736 } 784 }
737 return result; 785 return result;
738 } 786 }
739 787
740 static Transform decode(bindings.Decoder decoder0) { 788 static Transform decode(bindings.Decoder decoder0) {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 834
787 Map toJson() { 835 Map toJson() {
788 Map map = new Map(); 836 Map map = new Map();
789 map["matrix"] = matrix; 837 map["matrix"] = matrix;
790 return map; 838 return map;
791 } 839 }
792 } 840 }
793 841
794 842
795 843
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698