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

Side by Side Diff: mojo/dart/packages/mojo_services/lib/mojo/gfx/composition/resources.mojom.dart

Issue 2006093002: Dart: Futures -> Callbacks. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Merge 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 // WARNING: DO NOT EDIT. This file was generated by a program. 1 // WARNING: DO NOT EDIT. This file was generated by a program.
2 // See $MOJO_SDK/tools/bindings/mojom_bindings_generator.py. 2 // See $MOJO_SDK/tools/bindings/mojom_bindings_generator.py.
3 3
4 library resources_mojom; 4 library resources_mojom;
5 import 'dart:async'; 5 import 'dart:async';
6 import 'package:mojo/bindings.dart' as bindings; 6 import 'package:mojo/bindings.dart' as bindings;
7 import 'package:mojo/core.dart' as core; 7 import 'package:mojo/core.dart' as core;
8 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic e_describer; 8 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic e_describer;
9 import 'package:mojo_services/mojo/geometry.mojom.dart' as geometry_mojom; 9 import 'package:mojo_services/mojo/geometry.mojom.dart' as geometry_mojom;
10 import 'package:mojo_services/mojo/gfx/composition/scene_token.mojom.dart' as sc ene_token_mojom; 10 import 'package:mojo_services/mojo/gfx/composition/scene_token.mojom.dart' as sc ene_token_mojom;
11 11
12 12
13 13
14 class SceneResource extends bindings.Struct { 14 class SceneResource extends bindings.Struct {
15 static const List<bindings.StructDataHeader> kVersions = const [ 15 static const List<bindings.StructDataHeader> kVersions = const [
16 const bindings.StructDataHeader(16, 0) 16 const bindings.StructDataHeader(16, 0)
17 ]; 17 ];
18 scene_token_mojom.SceneToken sceneToken = null; 18 scene_token_mojom.SceneToken sceneToken = null;
19 19
20 SceneResource() : super(kVersions.last.size); 20 SceneResource() : super(kVersions.last.size);
21 21
22 SceneResource.init(
23 scene_token_mojom.SceneToken this.sceneToken
24 ) : super(kVersions.last.size);
25
22 static SceneResource deserialize(bindings.Message message) { 26 static SceneResource deserialize(bindings.Message message) {
23 var decoder = new bindings.Decoder(message); 27 var decoder = new bindings.Decoder(message);
24 var result = decode(decoder); 28 var result = decode(decoder);
25 if (decoder.excessHandles != null) { 29 if (decoder.excessHandles != null) {
26 decoder.excessHandles.forEach((h) => h.close()); 30 decoder.excessHandles.forEach((h) => h.close());
27 } 31 }
28 return result; 32 return result;
29 } 33 }
30 34
31 static SceneResource decode(bindings.Decoder decoder0) { 35 static SceneResource decode(bindings.Decoder decoder0) {
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 const bindings.StructDataHeader(40, 0) 145 const bindings.StructDataHeader(40, 0)
142 ]; 146 ];
143 List<int> mailboxName = null; 147 List<int> mailboxName = null;
144 int syncPoint = 0; 148 int syncPoint = 0;
145 MailboxTextureResourceOrigin origin = new MailboxTextureResourceOrigin(0); 149 MailboxTextureResourceOrigin origin = new MailboxTextureResourceOrigin(0);
146 geometry_mojom.Size size = null; 150 geometry_mojom.Size size = null;
147 MailboxTextureCallbackInterface callback = null; 151 MailboxTextureCallbackInterface callback = null;
148 152
149 MailboxTextureResource() : super(kVersions.last.size); 153 MailboxTextureResource() : super(kVersions.last.size);
150 154
155 MailboxTextureResource.init(
156 List<int> this.mailboxName,
157 int this.syncPoint,
158 MailboxTextureResourceOrigin this.origin,
159 geometry_mojom.Size this.size,
160 MailboxTextureCallbackInterface this.callback
161 ) : super(kVersions.last.size);
162
151 static MailboxTextureResource deserialize(bindings.Message message) { 163 static MailboxTextureResource deserialize(bindings.Message message) {
152 var decoder = new bindings.Decoder(message); 164 var decoder = new bindings.Decoder(message);
153 var result = decode(decoder); 165 var result = decode(decoder);
154 if (decoder.excessHandles != null) { 166 if (decoder.excessHandles != null) {
155 decoder.excessHandles.forEach((h) => h.close()); 167 decoder.excessHandles.forEach((h) => h.close());
156 } 168 }
157 return result; 169 return result;
158 } 170 }
159 171
160 static MailboxTextureResource decode(bindings.Decoder decoder0) { 172 static MailboxTextureResource decode(bindings.Decoder decoder0) {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 } 276 }
265 277
266 278
267 class _MailboxTextureCallbackOnMailboxTextureReleasedParams extends bindings.Str uct { 279 class _MailboxTextureCallbackOnMailboxTextureReleasedParams extends bindings.Str uct {
268 static const List<bindings.StructDataHeader> kVersions = const [ 280 static const List<bindings.StructDataHeader> kVersions = const [
269 const bindings.StructDataHeader(8, 0) 281 const bindings.StructDataHeader(8, 0)
270 ]; 282 ];
271 283
272 _MailboxTextureCallbackOnMailboxTextureReleasedParams() : super(kVersions.last .size); 284 _MailboxTextureCallbackOnMailboxTextureReleasedParams() : super(kVersions.last .size);
273 285
286 _MailboxTextureCallbackOnMailboxTextureReleasedParams.init(
287 ) : super(kVersions.last.size);
288
274 static _MailboxTextureCallbackOnMailboxTextureReleasedParams deserialize(bindi ngs.Message message) { 289 static _MailboxTextureCallbackOnMailboxTextureReleasedParams deserialize(bindi ngs.Message message) {
275 var decoder = new bindings.Decoder(message); 290 var decoder = new bindings.Decoder(message);
276 var result = decode(decoder); 291 var result = decode(decoder);
277 if (decoder.excessHandles != null) { 292 if (decoder.excessHandles != null) {
278 decoder.excessHandles.forEach((h) => h.close()); 293 decoder.excessHandles.forEach((h) => h.close());
279 } 294 }
280 return result; 295 return result;
281 } 296 }
282 297
283 static _MailboxTextureCallbackOnMailboxTextureReleasedParams decode(bindings.D ecoder decoder0) { 298 static _MailboxTextureCallbackOnMailboxTextureReleasedParams decode(bindings.D ecoder decoder0) {
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 default: 437 default:
423 result += "unknown"; 438 result += "unknown";
424 } 439 }
425 result += ": $_data)"; 440 result += ": $_data)";
426 return result; 441 return result;
427 } 442 }
428 } 443 }
429 const int _mailboxTextureCallbackMethodOnMailboxTextureReleasedName = 0; 444 const int _mailboxTextureCallbackMethodOnMailboxTextureReleasedName = 0;
430 445
431 class _MailboxTextureCallbackServiceDescription implements service_describer.Ser viceDescription { 446 class _MailboxTextureCallbackServiceDescription implements service_describer.Ser viceDescription {
432 dynamic getTopLevelInterface([Function responseFactory]) => 447 void getTopLevelInterface(Function responder) {
433 responseFactory(null); 448 responder(null);
449 }
434 450
435 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => 451 void getTypeDefinition(String typeKey, Function responder) {
436 responseFactory(null); 452 responder(null);
453 }
437 454
438 dynamic getAllTypeDefinitions([Function responseFactory]) => 455 void getAllTypeDefinitions(Function responder) {
439 responseFactory(null); 456 responder(null);
457 }
440 } 458 }
441 459
442 abstract class MailboxTextureCallback { 460 abstract class MailboxTextureCallback {
443 static const String serviceName = null; 461 static const String serviceName = null;
444 462
445 static service_describer.ServiceDescription _cachedServiceDescription; 463 static service_describer.ServiceDescription _cachedServiceDescription;
446 static service_describer.ServiceDescription get serviceDescription { 464 static service_describer.ServiceDescription get serviceDescription {
447 if (_cachedServiceDescription == null) { 465 if (_cachedServiceDescription == null) {
448 _cachedServiceDescription = new _MailboxTextureCallbackServiceDescription( ); 466 _cachedServiceDescription = new _MailboxTextureCallbackServiceDescription( );
449 } 467 }
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 : super.fromHandle(handle, autoBegin: impl != null) { 596 : super.fromHandle(handle, autoBegin: impl != null) {
579 _impl = impl; 597 _impl = impl;
580 } 598 }
581 599
582 _MailboxTextureCallbackStubControl.unbound([this._impl]) : super.unbound(); 600 _MailboxTextureCallbackStubControl.unbound([this._impl]) : super.unbound();
583 601
584 String get serviceName => MailboxTextureCallback.serviceName; 602 String get serviceName => MailboxTextureCallback.serviceName;
585 603
586 604
587 605
588 dynamic handleMessage(bindings.ServiceMessage message) { 606 void handleMessage(bindings.ServiceMessage message) {
589 if (bindings.ControlMessageHandler.isControlMessage(message)) { 607 if (bindings.ControlMessageHandler.isControlMessage(message)) {
590 return bindings.ControlMessageHandler.handleMessage(this, 608 bindings.ControlMessageHandler.handleMessage(
591 0, 609 this, 0, message);
592 message); 610 return;
593 } 611 }
594 if (_impl == null) { 612 if (_impl == null) {
595 throw new core.MojoApiError("$this has no implementation set"); 613 throw new core.MojoApiError("$this has no implementation set");
596 } 614 }
597 switch (message.header.type) { 615 switch (message.header.type) {
598 case _mailboxTextureCallbackMethodOnMailboxTextureReleasedName: 616 case _mailboxTextureCallbackMethodOnMailboxTextureReleasedName:
599 _impl.onMailboxTextureReleased(); 617 _impl.onMailboxTextureReleased();
600 break; 618 break;
601 default: 619 default:
602 throw new bindings.MojoCodecError("Unexpected message name"); 620 throw new bindings.MojoCodecError("Unexpected message name");
603 break; 621 break;
604 } 622 }
605 return null;
606 } 623 }
607 624
608 MailboxTextureCallback get impl => _impl; 625 MailboxTextureCallback get impl => _impl;
609 set impl(MailboxTextureCallback d) { 626 set impl(MailboxTextureCallback d) {
610 if (d == null) { 627 if (d == null) {
611 throw new core.MojoApiError("$this: Cannot set a null implementation"); 628 throw new core.MojoApiError("$this: Cannot set a null implementation");
612 } 629 }
613 if (isBound && (_impl == null)) { 630 if (isBound && (_impl == null)) {
614 beginHandlingEvents(); 631 beginHandlingEvents();
615 } 632 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 } 673 }
657 674
658 675
659 void onMailboxTextureReleased() { 676 void onMailboxTextureReleased() {
660 return impl.onMailboxTextureReleased(); 677 return impl.onMailboxTextureReleased();
661 } 678 }
662 } 679 }
663 680
664 681
665 682
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698