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

Side by Side Diff: mojo/dart/packages/mojo_services/lib/mojo/surfaces.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 surfaces_mojom; 5 library surfaces_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 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic e_describer;
11 import 'package:mojo_services/mojo/geometry.mojom.dart' as geometry_mojom; 13 import 'package:mojo_services/mojo/geometry.mojom.dart' as geometry_mojom;
12 import 'package:mojo_services/mojo/quads.mojom.dart' as quads_mojom; 14 import 'package:mojo_services/mojo/quads.mojom.dart' as quads_mojom;
13 import 'package:mojo_services/mojo/surface_id.mojom.dart' as surface_id_mojom; 15 import 'package:mojo_services/mojo/surface_id.mojom.dart' as surface_id_mojom;
14 16
15 class ResourceFormat extends bindings.MojoEnum { 17 class ResourceFormat extends bindings.MojoEnum {
16 static const ResourceFormat rgba8888 = const ResourceFormat._(0); 18 static const ResourceFormat rgba8888 = const ResourceFormat._(0);
17 static const ResourceFormat rgba4444 = const ResourceFormat._(1); 19 static const ResourceFormat rgba4444 = const ResourceFormat._(1);
18 static const ResourceFormat bgra8888 = const ResourceFormat._(2); 20 static const ResourceFormat bgra8888 = const ResourceFormat._(2);
19 static const ResourceFormat alpha8 = const ResourceFormat._(3); 21 static const ResourceFormat alpha8 = const ResourceFormat._(3);
20 static const ResourceFormat luminance8 = const ResourceFormat._(4); 22 static const ResourceFormat luminance8 = const ResourceFormat._(4);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 case bgra8888: 86 case bgra8888:
85 return 'ResourceFormat.bgra8888'; 87 return 'ResourceFormat.bgra8888';
86 case alpha8: 88 case alpha8:
87 return 'ResourceFormat.alpha8'; 89 return 'ResourceFormat.alpha8';
88 case luminance8: 90 case luminance8:
89 return 'ResourceFormat.luminance8'; 91 return 'ResourceFormat.luminance8';
90 case rgb565: 92 case rgb565:
91 return 'ResourceFormat.rgb565'; 93 return 'ResourceFormat.rgb565';
92 case etc1: 94 case etc1:
93 return 'ResourceFormat.etc1'; 95 return 'ResourceFormat.etc1';
96 default:
97 return null;
94 } 98 }
95 } 99 }
96 100
97 int toJson() => mojoEnumValue; 101 int toJson() => mojoEnumValue;
98 } 102 }
99 103
100 104
101 105
106
107
102 class Mailbox extends bindings.Struct { 108 class Mailbox extends bindings.Struct {
103 static const List<bindings.StructDataHeader> kVersions = const [ 109 static const List<bindings.StructDataHeader> kVersions = const [
104 const bindings.StructDataHeader(16, 0) 110 const bindings.StructDataHeader(16, 0)
105 ]; 111 ];
106 List<int> name = null; 112 List<int> name = null;
107 113
108 Mailbox() : super(kVersions.last.size); 114 Mailbox() : super(kVersions.last.size);
109 115
110 static Mailbox deserialize(bindings.Message message) { 116 static Mailbox deserialize(bindings.Message message) {
111 var decoder = new bindings.Decoder(message); 117 var decoder = new bindings.Decoder(message);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 } 165 }
160 166
161 Map toJson() { 167 Map toJson() {
162 Map map = new Map(); 168 Map map = new Map();
163 map["name"] = name; 169 map["name"] = name;
164 return map; 170 return map;
165 } 171 }
166 } 172 }
167 173
168 174
175
176
169 class MailboxHolder extends bindings.Struct { 177 class MailboxHolder extends bindings.Struct {
170 static const List<bindings.StructDataHeader> kVersions = const [ 178 static const List<bindings.StructDataHeader> kVersions = const [
171 const bindings.StructDataHeader(24, 0) 179 const bindings.StructDataHeader(24, 0)
172 ]; 180 ];
173 Mailbox mailbox = null; 181 Mailbox mailbox = null;
174 int textureTarget = 0; 182 int textureTarget = 0;
175 int syncPoint = 0; 183 int syncPoint = 0;
176 184
177 MailboxHolder() : super(kVersions.last.size); 185 MailboxHolder() : super(kVersions.last.size);
178 186
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 Map toJson() { 253 Map toJson() {
246 Map map = new Map(); 254 Map map = new Map();
247 map["mailbox"] = mailbox; 255 map["mailbox"] = mailbox;
248 map["textureTarget"] = textureTarget; 256 map["textureTarget"] = textureTarget;
249 map["syncPoint"] = syncPoint; 257 map["syncPoint"] = syncPoint;
250 return map; 258 return map;
251 } 259 }
252 } 260 }
253 261
254 262
263
264
255 class TransferableResource extends bindings.Struct { 265 class TransferableResource extends bindings.Struct {
256 static const List<bindings.StructDataHeader> kVersions = const [ 266 static const List<bindings.StructDataHeader> kVersions = const [
257 const bindings.StructDataHeader(40, 0) 267 const bindings.StructDataHeader(40, 0)
258 ]; 268 ];
259 int id = 0; 269 int id = 0;
260 ResourceFormat format = null; 270 ResourceFormat format = null;
261 int filter = 0; 271 int filter = 0;
262 bool isRepeated = false; 272 bool isRepeated = false;
263 bool isSoftware = false; 273 bool isSoftware = false;
264 geometry_mojom.Size size = null; 274 geometry_mojom.Size size = null;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 map["filter"] = filter; 382 map["filter"] = filter;
373 map["isRepeated"] = isRepeated; 383 map["isRepeated"] = isRepeated;
374 map["isSoftware"] = isSoftware; 384 map["isSoftware"] = isSoftware;
375 map["size"] = size; 385 map["size"] = size;
376 map["mailboxHolder"] = mailboxHolder; 386 map["mailboxHolder"] = mailboxHolder;
377 return map; 387 return map;
378 } 388 }
379 } 389 }
380 390
381 391
392
393
382 class ReturnedResource extends bindings.Struct { 394 class ReturnedResource extends bindings.Struct {
383 static const List<bindings.StructDataHeader> kVersions = const [ 395 static const List<bindings.StructDataHeader> kVersions = const [
384 const bindings.StructDataHeader(24, 0) 396 const bindings.StructDataHeader(24, 0)
385 ]; 397 ];
386 int id = 0; 398 int id = 0;
387 int syncPoint = 0; 399 int syncPoint = 0;
388 int count = 0; 400 int count = 0;
389 bool lost = false; 401 bool lost = false;
390 402
391 ReturnedResource() : super(kVersions.last.size); 403 ReturnedResource() : super(kVersions.last.size);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 Map map = new Map(); 478 Map map = new Map();
467 map["id"] = id; 479 map["id"] = id;
468 map["syncPoint"] = syncPoint; 480 map["syncPoint"] = syncPoint;
469 map["count"] = count; 481 map["count"] = count;
470 map["lost"] = lost; 482 map["lost"] = lost;
471 return map; 483 return map;
472 } 484 }
473 } 485 }
474 486
475 487
488
489
476 class Frame extends bindings.Struct { 490 class Frame extends bindings.Struct {
477 static const List<bindings.StructDataHeader> kVersions = const [ 491 static const List<bindings.StructDataHeader> kVersions = const [
478 const bindings.StructDataHeader(24, 0) 492 const bindings.StructDataHeader(24, 0)
479 ]; 493 ];
480 List<TransferableResource> resources = null; 494 List<TransferableResource> resources = null;
481 List<quads_mojom.Pass> passes = null; 495 List<quads_mojom.Pass> passes = null;
482 496
483 Frame() : super(kVersions.last.size); 497 Frame() : super(kVersions.last.size);
484 498
485 static Frame deserialize(bindings.Message message) { 499 static Frame deserialize(bindings.Message message) {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 590
577 Map toJson() { 591 Map toJson() {
578 Map map = new Map(); 592 Map map = new Map();
579 map["resources"] = resources; 593 map["resources"] = resources;
580 map["passes"] = passes; 594 map["passes"] = passes;
581 return map; 595 return map;
582 } 596 }
583 } 597 }
584 598
585 599
600
601
586 class _ResourceReturnerReturnResourcesParams extends bindings.Struct { 602 class _ResourceReturnerReturnResourcesParams extends bindings.Struct {
587 static const List<bindings.StructDataHeader> kVersions = const [ 603 static const List<bindings.StructDataHeader> kVersions = const [
588 const bindings.StructDataHeader(16, 0) 604 const bindings.StructDataHeader(16, 0)
589 ]; 605 ];
590 List<ReturnedResource> resources = null; 606 List<ReturnedResource> resources = null;
591 607
592 _ResourceReturnerReturnResourcesParams() : super(kVersions.last.size); 608 _ResourceReturnerReturnResourcesParams() : super(kVersions.last.size);
593 609
594 static _ResourceReturnerReturnResourcesParams deserialize(bindings.Message mes sage) { 610 static _ResourceReturnerReturnResourcesParams deserialize(bindings.Message mes sage) {
595 var decoder = new bindings.Decoder(message); 611 var decoder = new bindings.Decoder(message);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 } 676 }
661 677
662 Map toJson() { 678 Map toJson() {
663 Map map = new Map(); 679 Map map = new Map();
664 map["resources"] = resources; 680 map["resources"] = resources;
665 return map; 681 return map;
666 } 682 }
667 } 683 }
668 684
669 685
686
687
670 class _SurfaceGetIdNamespaceParams extends bindings.Struct { 688 class _SurfaceGetIdNamespaceParams extends bindings.Struct {
671 static const List<bindings.StructDataHeader> kVersions = const [ 689 static const List<bindings.StructDataHeader> kVersions = const [
672 const bindings.StructDataHeader(8, 0) 690 const bindings.StructDataHeader(8, 0)
673 ]; 691 ];
674 692
675 _SurfaceGetIdNamespaceParams() : super(kVersions.last.size); 693 _SurfaceGetIdNamespaceParams() : super(kVersions.last.size);
676 694
677 static _SurfaceGetIdNamespaceParams deserialize(bindings.Message message) { 695 static _SurfaceGetIdNamespaceParams deserialize(bindings.Message message) {
678 var decoder = new bindings.Decoder(message); 696 var decoder = new bindings.Decoder(message);
679 var result = decode(decoder); 697 var result = decode(decoder);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 return "_SurfaceGetIdNamespaceParams("")"; 736 return "_SurfaceGetIdNamespaceParams("")";
719 } 737 }
720 738
721 Map toJson() { 739 Map toJson() {
722 Map map = new Map(); 740 Map map = new Map();
723 return map; 741 return map;
724 } 742 }
725 } 743 }
726 744
727 745
746
747
728 class SurfaceGetIdNamespaceResponseParams extends bindings.Struct { 748 class SurfaceGetIdNamespaceResponseParams extends bindings.Struct {
729 static const List<bindings.StructDataHeader> kVersions = const [ 749 static const List<bindings.StructDataHeader> kVersions = const [
730 const bindings.StructDataHeader(16, 0) 750 const bindings.StructDataHeader(16, 0)
731 ]; 751 ];
732 int idNamespace = 0; 752 int idNamespace = 0;
733 753
734 SurfaceGetIdNamespaceResponseParams() : super(kVersions.last.size); 754 SurfaceGetIdNamespaceResponseParams() : super(kVersions.last.size);
735 755
736 static SurfaceGetIdNamespaceResponseParams deserialize(bindings.Message messag e) { 756 static SurfaceGetIdNamespaceResponseParams deserialize(bindings.Message messag e) {
737 var decoder = new bindings.Decoder(message); 757 var decoder = new bindings.Decoder(message);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 } 805 }
786 806
787 Map toJson() { 807 Map toJson() {
788 Map map = new Map(); 808 Map map = new Map();
789 map["idNamespace"] = idNamespace; 809 map["idNamespace"] = idNamespace;
790 return map; 810 return map;
791 } 811 }
792 } 812 }
793 813
794 814
815
816
795 class _SurfaceSetResourceReturnerParams extends bindings.Struct { 817 class _SurfaceSetResourceReturnerParams extends bindings.Struct {
796 static const List<bindings.StructDataHeader> kVersions = const [ 818 static const List<bindings.StructDataHeader> kVersions = const [
797 const bindings.StructDataHeader(16, 0) 819 const bindings.StructDataHeader(16, 0)
798 ]; 820 ];
799 Object returner = null; 821 Object returner = null;
800 822
801 _SurfaceSetResourceReturnerParams() : super(kVersions.last.size); 823 _SurfaceSetResourceReturnerParams() : super(kVersions.last.size);
802 824
803 static _SurfaceSetResourceReturnerParams deserialize(bindings.Message message) { 825 static _SurfaceSetResourceReturnerParams deserialize(bindings.Message message) {
804 var decoder = new bindings.Decoder(message); 826 var decoder = new bindings.Decoder(message);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 "returner: $returner" ")"; 873 "returner: $returner" ")";
852 } 874 }
853 875
854 Map toJson() { 876 Map toJson() {
855 throw new bindings.MojoCodecError( 877 throw new bindings.MojoCodecError(
856 'Object containing handles cannot be encoded to JSON.'); 878 'Object containing handles cannot be encoded to JSON.');
857 } 879 }
858 } 880 }
859 881
860 882
883
884
861 class _SurfaceCreateSurfaceParams extends bindings.Struct { 885 class _SurfaceCreateSurfaceParams extends bindings.Struct {
862 static const List<bindings.StructDataHeader> kVersions = const [ 886 static const List<bindings.StructDataHeader> kVersions = const [
863 const bindings.StructDataHeader(16, 0) 887 const bindings.StructDataHeader(16, 0)
864 ]; 888 ];
865 int idLocal = 0; 889 int idLocal = 0;
866 890
867 _SurfaceCreateSurfaceParams() : super(kVersions.last.size); 891 _SurfaceCreateSurfaceParams() : super(kVersions.last.size);
868 892
869 static _SurfaceCreateSurfaceParams deserialize(bindings.Message message) { 893 static _SurfaceCreateSurfaceParams deserialize(bindings.Message message) {
870 var decoder = new bindings.Decoder(message); 894 var decoder = new bindings.Decoder(message);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 } 942 }
919 943
920 Map toJson() { 944 Map toJson() {
921 Map map = new Map(); 945 Map map = new Map();
922 map["idLocal"] = idLocal; 946 map["idLocal"] = idLocal;
923 return map; 947 return map;
924 } 948 }
925 } 949 }
926 950
927 951
952
953
928 class _SurfaceSubmitFrameParams extends bindings.Struct { 954 class _SurfaceSubmitFrameParams extends bindings.Struct {
929 static const List<bindings.StructDataHeader> kVersions = const [ 955 static const List<bindings.StructDataHeader> kVersions = const [
930 const bindings.StructDataHeader(24, 0) 956 const bindings.StructDataHeader(24, 0)
931 ]; 957 ];
932 int idLocal = 0; 958 int idLocal = 0;
933 Frame frame = null; 959 Frame frame = null;
934 960
935 _SurfaceSubmitFrameParams() : super(kVersions.last.size); 961 _SurfaceSubmitFrameParams() : super(kVersions.last.size);
936 962
937 static _SurfaceSubmitFrameParams deserialize(bindings.Message message) { 963 static _SurfaceSubmitFrameParams deserialize(bindings.Message message) {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 1021
996 Map toJson() { 1022 Map toJson() {
997 Map map = new Map(); 1023 Map map = new Map();
998 map["idLocal"] = idLocal; 1024 map["idLocal"] = idLocal;
999 map["frame"] = frame; 1025 map["frame"] = frame;
1000 return map; 1026 return map;
1001 } 1027 }
1002 } 1028 }
1003 1029
1004 1030
1031
1032
1005 class SurfaceSubmitFrameResponseParams extends bindings.Struct { 1033 class SurfaceSubmitFrameResponseParams extends bindings.Struct {
1006 static const List<bindings.StructDataHeader> kVersions = const [ 1034 static const List<bindings.StructDataHeader> kVersions = const [
1007 const bindings.StructDataHeader(8, 0) 1035 const bindings.StructDataHeader(8, 0)
1008 ]; 1036 ];
1009 1037
1010 SurfaceSubmitFrameResponseParams() : super(kVersions.last.size); 1038 SurfaceSubmitFrameResponseParams() : super(kVersions.last.size);
1011 1039
1012 static SurfaceSubmitFrameResponseParams deserialize(bindings.Message message) { 1040 static SurfaceSubmitFrameResponseParams deserialize(bindings.Message message) {
1013 var decoder = new bindings.Decoder(message); 1041 var decoder = new bindings.Decoder(message);
1014 var result = decode(decoder); 1042 var result = decode(decoder);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 return "SurfaceSubmitFrameResponseParams("")"; 1081 return "SurfaceSubmitFrameResponseParams("")";
1054 } 1082 }
1055 1083
1056 Map toJson() { 1084 Map toJson() {
1057 Map map = new Map(); 1085 Map map = new Map();
1058 return map; 1086 return map;
1059 } 1087 }
1060 } 1088 }
1061 1089
1062 1090
1091
1092
1063 class _SurfaceDestroySurfaceParams extends bindings.Struct { 1093 class _SurfaceDestroySurfaceParams extends bindings.Struct {
1064 static const List<bindings.StructDataHeader> kVersions = const [ 1094 static const List<bindings.StructDataHeader> kVersions = const [
1065 const bindings.StructDataHeader(16, 0) 1095 const bindings.StructDataHeader(16, 0)
1066 ]; 1096 ];
1067 int idLocal = 0; 1097 int idLocal = 0;
1068 1098
1069 _SurfaceDestroySurfaceParams() : super(kVersions.last.size); 1099 _SurfaceDestroySurfaceParams() : super(kVersions.last.size);
1070 1100
1071 static _SurfaceDestroySurfaceParams deserialize(bindings.Message message) { 1101 static _SurfaceDestroySurfaceParams deserialize(bindings.Message message) {
1072 var decoder = new bindings.Decoder(message); 1102 var decoder = new bindings.Decoder(message);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
1119 "idLocal: $idLocal" ")"; 1149 "idLocal: $idLocal" ")";
1120 } 1150 }
1121 1151
1122 Map toJson() { 1152 Map toJson() {
1123 Map map = new Map(); 1153 Map map = new Map();
1124 map["idLocal"] = idLocal; 1154 map["idLocal"] = idLocal;
1125 return map; 1155 return map;
1126 } 1156 }
1127 } 1157 }
1128 1158
1159
1160
1161
1129 const int _ResourceReturner_returnResourcesName = 0; 1162 const int _ResourceReturner_returnResourcesName = 0;
1130 1163
1164
1165
1166 class _ResourceReturnerServiceDescription implements service_describer.ServiceDe scription {
1167 dynamic getTopLevelInterface([Function responseFactory]) => null;
1168
1169 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => null;
1170
1171 dynamic getAllTypeDefinitions([Function responseFactory]) => null;
1172 }
1173
1131 abstract class ResourceReturner { 1174 abstract class ResourceReturner {
1132 static const String serviceName = null; 1175 static const String serviceName = null;
1133 void returnResources(List<ReturnedResource> resources); 1176 void returnResources(List<ReturnedResource> resources);
1134 } 1177 }
1135 1178
1136 1179
1137 class _ResourceReturnerProxyImpl extends bindings.Proxy { 1180 class _ResourceReturnerProxyImpl extends bindings.Proxy {
1138 _ResourceReturnerProxyImpl.fromEndpoint( 1181 _ResourceReturnerProxyImpl.fromEndpoint(
1139 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); 1182 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
1140 1183
1141 _ResourceReturnerProxyImpl.fromHandle(core.MojoHandle handle) : 1184 _ResourceReturnerProxyImpl.fromHandle(core.MojoHandle handle) :
1142 super.fromHandle(handle); 1185 super.fromHandle(handle);
1143 1186
1144 _ResourceReturnerProxyImpl.unbound() : super.unbound(); 1187 _ResourceReturnerProxyImpl.unbound() : super.unbound();
1145 1188
1146 static _ResourceReturnerProxyImpl newFromEndpoint( 1189 static _ResourceReturnerProxyImpl newFromEndpoint(
1147 core.MojoMessagePipeEndpoint endpoint) { 1190 core.MojoMessagePipeEndpoint endpoint) {
1148 assert(endpoint.setDescription("For _ResourceReturnerProxyImpl")); 1191 assert(endpoint.setDescription("For _ResourceReturnerProxyImpl"));
1149 return new _ResourceReturnerProxyImpl.fromEndpoint(endpoint); 1192 return new _ResourceReturnerProxyImpl.fromEndpoint(endpoint);
1150 } 1193 }
1151 1194
1195 service_describer.ServiceDescription get serviceDescription =>
1196 new _ResourceReturnerServiceDescription();
1197
1152 void handleResponse(bindings.ServiceMessage message) { 1198 void handleResponse(bindings.ServiceMessage message) {
1153 switch (message.header.type) { 1199 switch (message.header.type) {
1154 default: 1200 default:
1155 proxyError("Unexpected message type: ${message.header.type}"); 1201 proxyError("Unexpected message type: ${message.header.type}");
1156 close(immediate: true); 1202 close(immediate: true);
1157 break; 1203 break;
1158 } 1204 }
1159 } 1205 }
1160 1206
1161 String toString() { 1207 String toString() {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 assert(_impl == null); 1331 assert(_impl == null);
1286 _impl = d; 1332 _impl = d;
1287 } 1333 }
1288 1334
1289 String toString() { 1335 String toString() {
1290 var superString = super.toString(); 1336 var superString = super.toString();
1291 return "ResourceReturnerStub($superString)"; 1337 return "ResourceReturnerStub($superString)";
1292 } 1338 }
1293 1339
1294 int get version => 0; 1340 int get version => 0;
1341
1342 service_describer.ServiceDescription get serviceDescription =>
1343 new _ResourceReturnerServiceDescription();
1295 } 1344 }
1296 1345
1297 const int _Surface_getIdNamespaceName = 0; 1346 const int _Surface_getIdNamespaceName = 0;
1298 const int _Surface_setResourceReturnerName = 1; 1347 const int _Surface_setResourceReturnerName = 1;
1299 const int _Surface_createSurfaceName = 2; 1348 const int _Surface_createSurfaceName = 2;
1300 const int _Surface_submitFrameName = 3; 1349 const int _Surface_submitFrameName = 3;
1301 const int _Surface_destroySurfaceName = 4; 1350 const int _Surface_destroySurfaceName = 4;
1302 1351
1352
1353
1354 class _SurfaceServiceDescription implements service_describer.ServiceDescription {
1355 dynamic getTopLevelInterface([Function responseFactory]) => null;
1356
1357 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => null;
1358
1359 dynamic getAllTypeDefinitions([Function responseFactory]) => null;
1360 }
1361
1303 abstract class Surface { 1362 abstract class Surface {
1304 static const String serviceName = "mojo::Surface"; 1363 static const String serviceName = "mojo::Surface";
1305 dynamic getIdNamespace([Function responseFactory = null]); 1364 dynamic getIdNamespace([Function responseFactory = null]);
1306 void setResourceReturner(Object returner); 1365 void setResourceReturner(Object returner);
1307 void createSurface(int idLocal); 1366 void createSurface(int idLocal);
1308 dynamic submitFrame(int idLocal,Frame frame,[Function responseFactory = null]) ; 1367 dynamic submitFrame(int idLocal,Frame frame,[Function responseFactory = null]) ;
1309 void destroySurface(int idLocal); 1368 void destroySurface(int idLocal);
1310 } 1369 }
1311 1370
1312 1371
1313 class _SurfaceProxyImpl extends bindings.Proxy { 1372 class _SurfaceProxyImpl extends bindings.Proxy {
1314 _SurfaceProxyImpl.fromEndpoint( 1373 _SurfaceProxyImpl.fromEndpoint(
1315 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); 1374 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
1316 1375
1317 _SurfaceProxyImpl.fromHandle(core.MojoHandle handle) : 1376 _SurfaceProxyImpl.fromHandle(core.MojoHandle handle) :
1318 super.fromHandle(handle); 1377 super.fromHandle(handle);
1319 1378
1320 _SurfaceProxyImpl.unbound() : super.unbound(); 1379 _SurfaceProxyImpl.unbound() : super.unbound();
1321 1380
1322 static _SurfaceProxyImpl newFromEndpoint( 1381 static _SurfaceProxyImpl newFromEndpoint(
1323 core.MojoMessagePipeEndpoint endpoint) { 1382 core.MojoMessagePipeEndpoint endpoint) {
1324 assert(endpoint.setDescription("For _SurfaceProxyImpl")); 1383 assert(endpoint.setDescription("For _SurfaceProxyImpl"));
1325 return new _SurfaceProxyImpl.fromEndpoint(endpoint); 1384 return new _SurfaceProxyImpl.fromEndpoint(endpoint);
1326 } 1385 }
1327 1386
1387 service_describer.ServiceDescription get serviceDescription =>
1388 new _SurfaceServiceDescription();
1389
1328 void handleResponse(bindings.ServiceMessage message) { 1390 void handleResponse(bindings.ServiceMessage message) {
1329 switch (message.header.type) { 1391 switch (message.header.type) {
1330 case _Surface_getIdNamespaceName: 1392 case _Surface_getIdNamespaceName:
1331 var r = SurfaceGetIdNamespaceResponseParams.deserialize( 1393 var r = SurfaceGetIdNamespaceResponseParams.deserialize(
1332 message.payload); 1394 message.payload);
1333 if (!message.header.hasRequestId) { 1395 if (!message.header.hasRequestId) {
1334 proxyError("Expected a message with a valid request Id."); 1396 proxyError("Expected a message with a valid request Id.");
1335 return; 1397 return;
1336 } 1398 }
1337 Completer c = completerMap[message.header.requestId]; 1399 Completer c = completerMap[message.header.requestId];
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
1600 assert(_impl == null); 1662 assert(_impl == null);
1601 _impl = d; 1663 _impl = d;
1602 } 1664 }
1603 1665
1604 String toString() { 1666 String toString() {
1605 var superString = super.toString(); 1667 var superString = super.toString();
1606 return "SurfaceStub($superString)"; 1668 return "SurfaceStub($superString)";
1607 } 1669 }
1608 1670
1609 int get version => 0; 1671 int get version => 0;
1672
1673 service_describer.ServiceDescription get serviceDescription =>
1674 new _SurfaceServiceDescription();
1610 } 1675 }
1611 1676
1612 1677
1678
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698