OLD | NEW |
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 trace_provider_registry_mojom; | 4 library trace_provider_registry_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/tracing/tracing.mojom.dart' as tracing_mojom; | 9 import 'package:mojo_services/tracing/tracing.mojom.dart' as tracing_mojom; |
10 | 10 |
11 | 11 |
12 | 12 |
13 class _TraceProviderRegistryRegisterTraceProviderParams extends bindings.Struct
{ | 13 class _TraceProviderRegistryRegisterTraceProviderParams extends bindings.Struct
{ |
14 static const List<bindings.StructDataHeader> kVersions = const [ | 14 static const List<bindings.StructDataHeader> kVersions = const [ |
15 const bindings.StructDataHeader(16, 0) | 15 const bindings.StructDataHeader(16, 0) |
16 ]; | 16 ]; |
17 tracing_mojom.TraceProviderInterface traceProvider = null; | 17 tracing_mojom.TraceProviderInterface traceProvider = null; |
18 | 18 |
19 _TraceProviderRegistryRegisterTraceProviderParams() : super(kVersions.last.siz
e); | 19 _TraceProviderRegistryRegisterTraceProviderParams() : super(kVersions.last.siz
e); |
20 | 20 |
| 21 _TraceProviderRegistryRegisterTraceProviderParams.init( |
| 22 tracing_mojom.TraceProviderInterface this.traceProvider |
| 23 ) : super(kVersions.last.size); |
| 24 |
21 static _TraceProviderRegistryRegisterTraceProviderParams deserialize(bindings.
Message message) { | 25 static _TraceProviderRegistryRegisterTraceProviderParams deserialize(bindings.
Message message) { |
22 var decoder = new bindings.Decoder(message); | 26 var decoder = new bindings.Decoder(message); |
23 var result = decode(decoder); | 27 var result = decode(decoder); |
24 if (decoder.excessHandles != null) { | 28 if (decoder.excessHandles != null) { |
25 decoder.excessHandles.forEach((h) => h.close()); | 29 decoder.excessHandles.forEach((h) => h.close()); |
26 } | 30 } |
27 return result; | 31 return result; |
28 } | 32 } |
29 | 33 |
30 static _TraceProviderRegistryRegisterTraceProviderParams decode(bindings.Decod
er decoder0) { | 34 static _TraceProviderRegistryRegisterTraceProviderParams decode(bindings.Decod
er decoder0) { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 80 |
77 Map toJson() { | 81 Map toJson() { |
78 throw new bindings.MojoCodecError( | 82 throw new bindings.MojoCodecError( |
79 'Object containing handles cannot be encoded to JSON.'); | 83 'Object containing handles cannot be encoded to JSON.'); |
80 } | 84 } |
81 } | 85 } |
82 | 86 |
83 const int _traceProviderRegistryMethodRegisterTraceProviderName = 0; | 87 const int _traceProviderRegistryMethodRegisterTraceProviderName = 0; |
84 | 88 |
85 class _TraceProviderRegistryServiceDescription implements service_describer.Serv
iceDescription { | 89 class _TraceProviderRegistryServiceDescription implements service_describer.Serv
iceDescription { |
86 dynamic getTopLevelInterface([Function responseFactory]) => | 90 void getTopLevelInterface(Function responder) { |
87 responseFactory(null); | 91 responder(null); |
| 92 } |
88 | 93 |
89 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 94 void getTypeDefinition(String typeKey, Function responder) { |
90 responseFactory(null); | 95 responder(null); |
| 96 } |
91 | 97 |
92 dynamic getAllTypeDefinitions([Function responseFactory]) => | 98 void getAllTypeDefinitions(Function responder) { |
93 responseFactory(null); | 99 responder(null); |
| 100 } |
94 } | 101 } |
95 | 102 |
96 abstract class TraceProviderRegistry { | 103 abstract class TraceProviderRegistry { |
97 static const String serviceName = "tracing.TraceProviderRegistry"; | 104 static const String serviceName = "tracing.TraceProviderRegistry"; |
98 | 105 |
99 static service_describer.ServiceDescription _cachedServiceDescription; | 106 static service_describer.ServiceDescription _cachedServiceDescription; |
100 static service_describer.ServiceDescription get serviceDescription { | 107 static service_describer.ServiceDescription get serviceDescription { |
101 if (_cachedServiceDescription == null) { | 108 if (_cachedServiceDescription == null) { |
102 _cachedServiceDescription = new _TraceProviderRegistryServiceDescription()
; | 109 _cachedServiceDescription = new _TraceProviderRegistryServiceDescription()
; |
103 } | 110 } |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 : super.fromHandle(handle, autoBegin: impl != null) { | 240 : super.fromHandle(handle, autoBegin: impl != null) { |
234 _impl = impl; | 241 _impl = impl; |
235 } | 242 } |
236 | 243 |
237 _TraceProviderRegistryStubControl.unbound([this._impl]) : super.unbound(); | 244 _TraceProviderRegistryStubControl.unbound([this._impl]) : super.unbound(); |
238 | 245 |
239 String get serviceName => TraceProviderRegistry.serviceName; | 246 String get serviceName => TraceProviderRegistry.serviceName; |
240 | 247 |
241 | 248 |
242 | 249 |
243 dynamic handleMessage(bindings.ServiceMessage message) { | 250 void handleMessage(bindings.ServiceMessage message) { |
244 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 251 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
245 return bindings.ControlMessageHandler.handleMessage(this, | 252 bindings.ControlMessageHandler.handleMessage( |
246 0, | 253 this, 0, message); |
247 message); | 254 return; |
248 } | 255 } |
249 if (_impl == null) { | 256 if (_impl == null) { |
250 throw new core.MojoApiError("$this has no implementation set"); | 257 throw new core.MojoApiError("$this has no implementation set"); |
251 } | 258 } |
252 switch (message.header.type) { | 259 switch (message.header.type) { |
253 case _traceProviderRegistryMethodRegisterTraceProviderName: | 260 case _traceProviderRegistryMethodRegisterTraceProviderName: |
254 var params = _TraceProviderRegistryRegisterTraceProviderParams.deseriali
ze( | 261 var params = _TraceProviderRegistryRegisterTraceProviderParams.deseriali
ze( |
255 message.payload); | 262 message.payload); |
256 _impl.registerTraceProvider(params.traceProvider); | 263 _impl.registerTraceProvider(params.traceProvider); |
257 break; | 264 break; |
258 default: | 265 default: |
259 throw new bindings.MojoCodecError("Unexpected message name"); | 266 throw new bindings.MojoCodecError("Unexpected message name"); |
260 break; | 267 break; |
261 } | 268 } |
262 return null; | |
263 } | 269 } |
264 | 270 |
265 TraceProviderRegistry get impl => _impl; | 271 TraceProviderRegistry get impl => _impl; |
266 set impl(TraceProviderRegistry d) { | 272 set impl(TraceProviderRegistry d) { |
267 if (d == null) { | 273 if (d == null) { |
268 throw new core.MojoApiError("$this: Cannot set a null implementation"); | 274 throw new core.MojoApiError("$this: Cannot set a null implementation"); |
269 } | 275 } |
270 if (isBound && (_impl == null)) { | 276 if (isBound && (_impl == null)) { |
271 beginHandlingEvents(); | 277 beginHandlingEvents(); |
272 } | 278 } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 } | 319 } |
314 | 320 |
315 | 321 |
316 void registerTraceProvider(tracing_mojom.TraceProviderInterface traceProvider)
{ | 322 void registerTraceProvider(tracing_mojom.TraceProviderInterface traceProvider)
{ |
317 return impl.registerTraceProvider(traceProvider); | 323 return impl.registerTraceProvider(traceProvider); |
318 } | 324 } |
319 } | 325 } |
320 | 326 |
321 | 327 |
322 | 328 |
OLD | NEW |