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 asset_bundle_mojom; | 5 library asset_bundle_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 | 10 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 } | 75 } |
76 | 76 |
77 Map toJson() { | 77 Map toJson() { |
78 Map map = new Map(); | 78 Map map = new Map(); |
79 map["assetName"] = assetName; | 79 map["assetName"] = assetName; |
80 return map; | 80 return map; |
81 } | 81 } |
82 } | 82 } |
83 | 83 |
84 | 84 |
85 | |
86 | |
87 class AssetBundleGetAsStreamResponseParams extends bindings.Struct { | 85 class AssetBundleGetAsStreamResponseParams extends bindings.Struct { |
88 static const List<bindings.StructDataHeader> kVersions = const [ | 86 static const List<bindings.StructDataHeader> kVersions = const [ |
89 const bindings.StructDataHeader(16, 0) | 87 const bindings.StructDataHeader(16, 0) |
90 ]; | 88 ]; |
91 core.MojoDataPipeConsumer assetData = null; | 89 core.MojoDataPipeConsumer assetData = null; |
92 | 90 |
93 AssetBundleGetAsStreamResponseParams() : super(kVersions.last.size); | 91 AssetBundleGetAsStreamResponseParams() : super(kVersions.last.size); |
94 | 92 |
95 static AssetBundleGetAsStreamResponseParams deserialize(bindings.Message messa
ge) { | 93 static AssetBundleGetAsStreamResponseParams deserialize(bindings.Message messa
ge) { |
96 var decoder = new bindings.Decoder(message); | 94 var decoder = new bindings.Decoder(message); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 "assetData: $assetData" ")"; | 146 "assetData: $assetData" ")"; |
149 } | 147 } |
150 | 148 |
151 Map toJson() { | 149 Map toJson() { |
152 throw new bindings.MojoCodecError( | 150 throw new bindings.MojoCodecError( |
153 'Object containing handles cannot be encoded to JSON.'); | 151 'Object containing handles cannot be encoded to JSON.'); |
154 } | 152 } |
155 } | 153 } |
156 | 154 |
157 | 155 |
158 | |
159 | |
160 class _AssetUnpackerUnpackZipStreamParams extends bindings.Struct { | 156 class _AssetUnpackerUnpackZipStreamParams extends bindings.Struct { |
161 static const List<bindings.StructDataHeader> kVersions = const [ | 157 static const List<bindings.StructDataHeader> kVersions = const [ |
162 const bindings.StructDataHeader(16, 0) | 158 const bindings.StructDataHeader(16, 0) |
163 ]; | 159 ]; |
164 core.MojoDataPipeConsumer zippedAssets = null; | 160 core.MojoDataPipeConsumer zippedAssets = null; |
165 Object assetBundle = null; | 161 Object assetBundle = null; |
166 | 162 |
167 _AssetUnpackerUnpackZipStreamParams() : super(kVersions.last.size); | 163 _AssetUnpackerUnpackZipStreamParams() : super(kVersions.last.size); |
168 | 164 |
169 static _AssetUnpackerUnpackZipStreamParams deserialize(bindings.Message messag
e) { | 165 static _AssetUnpackerUnpackZipStreamParams deserialize(bindings.Message messag
e) { |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 "zippedAssets: $zippedAssets" ", " | 229 "zippedAssets: $zippedAssets" ", " |
234 "assetBundle: $assetBundle" ")"; | 230 "assetBundle: $assetBundle" ")"; |
235 } | 231 } |
236 | 232 |
237 Map toJson() { | 233 Map toJson() { |
238 throw new bindings.MojoCodecError( | 234 throw new bindings.MojoCodecError( |
239 'Object containing handles cannot be encoded to JSON.'); | 235 'Object containing handles cannot be encoded to JSON.'); |
240 } | 236 } |
241 } | 237 } |
242 | 238 |
243 | |
244 | |
245 | |
246 const int _AssetBundle_getAsStreamName = 0; | 239 const int _AssetBundle_getAsStreamName = 0; |
247 | 240 |
248 | |
249 | |
250 class _AssetBundleServiceDescription implements service_describer.ServiceDescrip
tion { | 241 class _AssetBundleServiceDescription implements service_describer.ServiceDescrip
tion { |
251 dynamic getTopLevelInterface([Function responseFactory]) => | 242 dynamic getTopLevelInterface([Function responseFactory]) => |
252 responseFactory(null); | 243 responseFactory(null); |
253 | 244 |
254 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 245 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
255 responseFactory(null); | 246 responseFactory(null); |
256 | 247 |
257 dynamic getAllTypeDefinitions([Function responseFactory]) => | 248 dynamic getAllTypeDefinitions([Function responseFactory]) => |
258 responseFactory(null); | 249 responseFactory(null); |
259 } | 250 } |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 static service_describer.ServiceDescription get serviceDescription { | 463 static service_describer.ServiceDescription get serviceDescription { |
473 if (_cachedServiceDescription == null) { | 464 if (_cachedServiceDescription == null) { |
474 _cachedServiceDescription = new _AssetBundleServiceDescription(); | 465 _cachedServiceDescription = new _AssetBundleServiceDescription(); |
475 } | 466 } |
476 return _cachedServiceDescription; | 467 return _cachedServiceDescription; |
477 } | 468 } |
478 } | 469 } |
479 | 470 |
480 const int _AssetUnpacker_unpackZipStreamName = 0; | 471 const int _AssetUnpacker_unpackZipStreamName = 0; |
481 | 472 |
482 | |
483 | |
484 class _AssetUnpackerServiceDescription implements service_describer.ServiceDescr
iption { | 473 class _AssetUnpackerServiceDescription implements service_describer.ServiceDescr
iption { |
485 dynamic getTopLevelInterface([Function responseFactory]) => | 474 dynamic getTopLevelInterface([Function responseFactory]) => |
486 responseFactory(null); | 475 responseFactory(null); |
487 | 476 |
488 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 477 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
489 responseFactory(null); | 478 responseFactory(null); |
490 | 479 |
491 dynamic getAllTypeDefinitions([Function responseFactory]) => | 480 dynamic getAllTypeDefinitions([Function responseFactory]) => |
492 responseFactory(null); | 481 responseFactory(null); |
493 } | 482 } |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 static service_describer.ServiceDescription get serviceDescription { | 654 static service_describer.ServiceDescription get serviceDescription { |
666 if (_cachedServiceDescription == null) { | 655 if (_cachedServiceDescription == null) { |
667 _cachedServiceDescription = new _AssetUnpackerServiceDescription(); | 656 _cachedServiceDescription = new _AssetUnpackerServiceDescription(); |
668 } | 657 } |
669 return _cachedServiceDescription; | 658 return _cachedServiceDescription; |
670 } | 659 } |
671 } | 660 } |
672 | 661 |
673 | 662 |
674 | 663 |
OLD | NEW |