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 media_factory_mojom; | 5 library media_factory_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/media/media_types.mojom.dart' as media_types_
mojom; | 10 import 'package:mojo_services/mojo/media/media_types.mojom.dart' as media_types_
mojom; |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 "player: $player" ")"; | 91 "player: $player" ")"; |
92 } | 92 } |
93 | 93 |
94 Map toJson() { | 94 Map toJson() { |
95 throw new bindings.MojoCodecError( | 95 throw new bindings.MojoCodecError( |
96 'Object containing handles cannot be encoded to JSON.'); | 96 'Object containing handles cannot be encoded to JSON.'); |
97 } | 97 } |
98 } | 98 } |
99 | 99 |
100 | 100 |
101 | |
102 | |
103 class _MediaFactoryCreateSourceParams extends bindings.Struct { | 101 class _MediaFactoryCreateSourceParams extends bindings.Struct { |
104 static const List<bindings.StructDataHeader> kVersions = const [ | 102 static const List<bindings.StructDataHeader> kVersions = const [ |
105 const bindings.StructDataHeader(32, 0) | 103 const bindings.StructDataHeader(32, 0) |
106 ]; | 104 ]; |
107 String originUrl = null; | 105 String originUrl = null; |
108 List<media_types_mojom.MediaTypeSet> allowedMediaTypes = null; | 106 List<media_types_mojom.MediaTypeSet> allowedMediaTypes = null; |
109 Object source = null; | 107 Object source = null; |
110 | 108 |
111 _MediaFactoryCreateSourceParams() : super(kVersions.last.size); | 109 _MediaFactoryCreateSourceParams() : super(kVersions.last.size); |
112 | 110 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 "source: $source" ")"; | 206 "source: $source" ")"; |
209 } | 207 } |
210 | 208 |
211 Map toJson() { | 209 Map toJson() { |
212 throw new bindings.MojoCodecError( | 210 throw new bindings.MojoCodecError( |
213 'Object containing handles cannot be encoded to JSON.'); | 211 'Object containing handles cannot be encoded to JSON.'); |
214 } | 212 } |
215 } | 213 } |
216 | 214 |
217 | 215 |
218 | |
219 | |
220 class _MediaFactoryCreateSinkParams extends bindings.Struct { | 216 class _MediaFactoryCreateSinkParams extends bindings.Struct { |
221 static const List<bindings.StructDataHeader> kVersions = const [ | 217 static const List<bindings.StructDataHeader> kVersions = const [ |
222 const bindings.StructDataHeader(32, 0) | 218 const bindings.StructDataHeader(32, 0) |
223 ]; | 219 ]; |
224 String destinationUrl = null; | 220 String destinationUrl = null; |
225 media_types_mojom.MediaType mediaType = null; | 221 media_types_mojom.MediaType mediaType = null; |
226 Object sink = null; | 222 Object sink = null; |
227 | 223 |
228 _MediaFactoryCreateSinkParams() : super(kVersions.last.size); | 224 _MediaFactoryCreateSinkParams() : super(kVersions.last.size); |
229 | 225 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 "mediaType: $mediaType" ", " | 303 "mediaType: $mediaType" ", " |
308 "sink: $sink" ")"; | 304 "sink: $sink" ")"; |
309 } | 305 } |
310 | 306 |
311 Map toJson() { | 307 Map toJson() { |
312 throw new bindings.MojoCodecError( | 308 throw new bindings.MojoCodecError( |
313 'Object containing handles cannot be encoded to JSON.'); | 309 'Object containing handles cannot be encoded to JSON.'); |
314 } | 310 } |
315 } | 311 } |
316 | 312 |
317 | |
318 | |
319 | |
320 const int _MediaFactory_createPlayerName = 0; | 313 const int _MediaFactory_createPlayerName = 0; |
321 const int _MediaFactory_createSourceName = 1; | 314 const int _MediaFactory_createSourceName = 1; |
322 const int _MediaFactory_createSinkName = 2; | 315 const int _MediaFactory_createSinkName = 2; |
323 | 316 |
324 | |
325 | |
326 class _MediaFactoryServiceDescription implements service_describer.ServiceDescri
ption { | 317 class _MediaFactoryServiceDescription implements service_describer.ServiceDescri
ption { |
327 dynamic getTopLevelInterface([Function responseFactory]) => | 318 dynamic getTopLevelInterface([Function responseFactory]) => |
328 responseFactory(null); | 319 responseFactory(null); |
329 | 320 |
330 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 321 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
331 responseFactory(null); | 322 responseFactory(null); |
332 | 323 |
333 dynamic getAllTypeDefinitions([Function responseFactory]) => | 324 dynamic getAllTypeDefinitions([Function responseFactory]) => |
334 responseFactory(null); | 325 responseFactory(null); |
335 } | 326 } |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 static service_describer.ServiceDescription get serviceDescription { | 532 static service_describer.ServiceDescription get serviceDescription { |
542 if (_cachedServiceDescription == null) { | 533 if (_cachedServiceDescription == null) { |
543 _cachedServiceDescription = new _MediaFactoryServiceDescription(); | 534 _cachedServiceDescription = new _MediaFactoryServiceDescription(); |
544 } | 535 } |
545 return _cachedServiceDescription; | 536 return _cachedServiceDescription; |
546 } | 537 } |
547 } | 538 } |
548 | 539 |
549 | 540 |
550 | 541 |
OLD | NEW |