OLD | NEW |
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 resources_mojom; | 5 library resources_mojom; |
6 import 'dart:async'; | 6 import 'dart:async'; |
7 import 'package:mojo/bindings.dart' as bindings; | 7 import 'package:mojo/bindings.dart' as bindings; |
8 import 'package:mojo/core.dart' as core; | 8 import 'package:mojo/core.dart' as core; |
9 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; | 9 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; |
10 import 'package:mojo_services/mojo/geometry.mojom.dart' as geometry_mojom; | 10 import 'package:mojo_services/mojo/geometry.mojom.dart' as geometry_mojom; |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 } | 78 } |
79 | 79 |
80 Map toJson() { | 80 Map toJson() { |
81 Map map = new Map(); | 81 Map map = new Map(); |
82 map["sceneToken"] = sceneToken; | 82 map["sceneToken"] = sceneToken; |
83 return map; | 83 return map; |
84 } | 84 } |
85 } | 85 } |
86 | 86 |
87 | 87 |
88 | |
89 | |
90 class MailboxTextureResource extends bindings.Struct { | 88 class MailboxTextureResource extends bindings.Struct { |
91 static const List<bindings.StructDataHeader> kVersions = const [ | 89 static const List<bindings.StructDataHeader> kVersions = const [ |
92 const bindings.StructDataHeader(40, 0) | 90 const bindings.StructDataHeader(40, 0) |
93 ]; | 91 ]; |
94 List<int> mailboxName = null; | 92 List<int> mailboxName = null; |
95 int syncPoint = 0; | 93 int syncPoint = 0; |
96 geometry_mojom.Size size = null; | 94 geometry_mojom.Size size = null; |
97 Object callback = null; | 95 Object callback = null; |
98 | 96 |
99 MailboxTextureResource() : super(kVersions.last.size); | 97 MailboxTextureResource() : super(kVersions.last.size); |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 "callback: $callback" ")"; | 189 "callback: $callback" ")"; |
192 } | 190 } |
193 | 191 |
194 Map toJson() { | 192 Map toJson() { |
195 throw new bindings.MojoCodecError( | 193 throw new bindings.MojoCodecError( |
196 'Object containing handles cannot be encoded to JSON.'); | 194 'Object containing handles cannot be encoded to JSON.'); |
197 } | 195 } |
198 } | 196 } |
199 | 197 |
200 | 198 |
201 | |
202 | |
203 class _MailboxTextureCallbackOnMailboxTextureReleasedParams extends bindings.Str
uct { | 199 class _MailboxTextureCallbackOnMailboxTextureReleasedParams extends bindings.Str
uct { |
204 static const List<bindings.StructDataHeader> kVersions = const [ | 200 static const List<bindings.StructDataHeader> kVersions = const [ |
205 const bindings.StructDataHeader(8, 0) | 201 const bindings.StructDataHeader(8, 0) |
206 ]; | 202 ]; |
207 | 203 |
208 _MailboxTextureCallbackOnMailboxTextureReleasedParams() : super(kVersions.last
.size); | 204 _MailboxTextureCallbackOnMailboxTextureReleasedParams() : super(kVersions.last
.size); |
209 | 205 |
210 static _MailboxTextureCallbackOnMailboxTextureReleasedParams deserialize(bindi
ngs.Message message) { | 206 static _MailboxTextureCallbackOnMailboxTextureReleasedParams deserialize(bindi
ngs.Message message) { |
211 var decoder = new bindings.Decoder(message); | 207 var decoder = new bindings.Decoder(message); |
212 var result = decode(decoder); | 208 var result = decode(decoder); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 } | 248 } |
253 | 249 |
254 Map toJson() { | 250 Map toJson() { |
255 Map map = new Map(); | 251 Map map = new Map(); |
256 return map; | 252 return map; |
257 } | 253 } |
258 } | 254 } |
259 | 255 |
260 | 256 |
261 | 257 |
262 | |
263 | |
264 enum ResourceTag { | 258 enum ResourceTag { |
265 scene, | 259 scene, |
266 mailboxTexture, | 260 mailboxTexture, |
267 unknown | 261 unknown |
268 } | 262 } |
269 | 263 |
270 class Resource extends bindings.Union { | 264 class Resource extends bindings.Union { |
271 static final _tag_to_int = const { | 265 static final _tag_to_int = const { |
272 ResourceTag.scene: 0, | 266 ResourceTag.scene: 0, |
273 ResourceTag.mailboxTexture: 1, | 267 ResourceTag.mailboxTexture: 1, |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 case ResourceTag.mailboxTexture: | 351 case ResourceTag.mailboxTexture: |
358 result += "mailboxTexture"; | 352 result += "mailboxTexture"; |
359 break; | 353 break; |
360 default: | 354 default: |
361 result += "unknown"; | 355 result += "unknown"; |
362 } | 356 } |
363 result += ": $_data)"; | 357 result += ": $_data)"; |
364 return result; | 358 return result; |
365 } | 359 } |
366 } | 360 } |
367 | |
368 | |
369 | |
370 const int _MailboxTextureCallback_onMailboxTextureReleasedName = 0; | 361 const int _MailboxTextureCallback_onMailboxTextureReleasedName = 0; |
371 | 362 |
372 | |
373 | |
374 class _MailboxTextureCallbackServiceDescription implements service_describer.Ser
viceDescription { | 363 class _MailboxTextureCallbackServiceDescription implements service_describer.Ser
viceDescription { |
375 dynamic getTopLevelInterface([Function responseFactory]) => | 364 dynamic getTopLevelInterface([Function responseFactory]) => |
376 responseFactory(null); | 365 responseFactory(null); |
377 | 366 |
378 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 367 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
379 responseFactory(null); | 368 responseFactory(null); |
380 | 369 |
381 dynamic getAllTypeDefinitions([Function responseFactory]) => | 370 dynamic getAllTypeDefinitions([Function responseFactory]) => |
382 responseFactory(null); | 371 responseFactory(null); |
383 } | 372 } |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 static service_describer.ServiceDescription get serviceDescription { | 540 static service_describer.ServiceDescription get serviceDescription { |
552 if (_cachedServiceDescription == null) { | 541 if (_cachedServiceDescription == null) { |
553 _cachedServiceDescription = new _MailboxTextureCallbackServiceDescription(
); | 542 _cachedServiceDescription = new _MailboxTextureCallbackServiceDescription(
); |
554 } | 543 } |
555 return _cachedServiceDescription; | 544 return _cachedServiceDescription; |
556 } | 545 } |
557 } | 546 } |
558 | 547 |
559 | 548 |
560 | 549 |
OLD | NEW |