| 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 shell_mojom; | 4 library shell_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/mojo/application_connector.mojom.dart' as application_conne
ctor_mojom; | 9 import 'package:mojo/mojo/application_connector.mojom.dart' as application_conne
ctor_mojom; |
| 10 import 'package:mojo/mojo/service_provider.mojom.dart' as service_provider_mojom
; | 10 import 'package:mojo/mojo/service_provider.mojom.dart' as service_provider_mojom
; |
| 11 | 11 |
| 12 | 12 |
| 13 | 13 |
| 14 class _ShellConnectToApplicationParams extends bindings.Struct { | 14 class _ShellConnectToApplicationParams extends bindings.Struct { |
| 15 static const List<bindings.StructDataHeader> kVersions = const [ | 15 static const List<bindings.StructDataHeader> kVersions = const [ |
| 16 const bindings.StructDataHeader(24, 0) | 16 const bindings.StructDataHeader(24, 0) |
| 17 ]; | 17 ]; |
| 18 String applicationUrl = null; | 18 String applicationUrl = null; |
| 19 service_provider_mojom.ServiceProviderInterfaceRequest services = null; | 19 service_provider_mojom.ServiceProviderInterfaceRequest services = null; |
| 20 | 20 |
| 21 _ShellConnectToApplicationParams() : super(kVersions.last.size); | 21 _ShellConnectToApplicationParams() : super(kVersions.last.size); |
| 22 | 22 |
| 23 _ShellConnectToApplicationParams.init( |
| 24 String this.applicationUrl, |
| 25 service_provider_mojom.ServiceProviderInterfaceRequest this.services |
| 26 ) : super(kVersions.last.size); |
| 27 |
| 23 static _ShellConnectToApplicationParams deserialize(bindings.Message message)
{ | 28 static _ShellConnectToApplicationParams deserialize(bindings.Message message)
{ |
| 24 var decoder = new bindings.Decoder(message); | 29 var decoder = new bindings.Decoder(message); |
| 25 var result = decode(decoder); | 30 var result = decode(decoder); |
| 26 if (decoder.excessHandles != null) { | 31 if (decoder.excessHandles != null) { |
| 27 decoder.excessHandles.forEach((h) => h.close()); | 32 decoder.excessHandles.forEach((h) => h.close()); |
| 28 } | 33 } |
| 29 return result; | 34 return result; |
| 30 } | 35 } |
| 31 | 36 |
| 32 static _ShellConnectToApplicationParams decode(bindings.Decoder decoder0) { | 37 static _ShellConnectToApplicationParams decode(bindings.Decoder decoder0) { |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 | 101 |
| 97 | 102 |
| 98 class _ShellCreateApplicationConnectorParams extends bindings.Struct { | 103 class _ShellCreateApplicationConnectorParams extends bindings.Struct { |
| 99 static const List<bindings.StructDataHeader> kVersions = const [ | 104 static const List<bindings.StructDataHeader> kVersions = const [ |
| 100 const bindings.StructDataHeader(16, 0) | 105 const bindings.StructDataHeader(16, 0) |
| 101 ]; | 106 ]; |
| 102 application_connector_mojom.ApplicationConnectorInterfaceRequest applicationCo
nnectorRequest = null; | 107 application_connector_mojom.ApplicationConnectorInterfaceRequest applicationCo
nnectorRequest = null; |
| 103 | 108 |
| 104 _ShellCreateApplicationConnectorParams() : super(kVersions.last.size); | 109 _ShellCreateApplicationConnectorParams() : super(kVersions.last.size); |
| 105 | 110 |
| 111 _ShellCreateApplicationConnectorParams.init( |
| 112 application_connector_mojom.ApplicationConnectorInterfaceRequest this.applic
ationConnectorRequest |
| 113 ) : super(kVersions.last.size); |
| 114 |
| 106 static _ShellCreateApplicationConnectorParams deserialize(bindings.Message mes
sage) { | 115 static _ShellCreateApplicationConnectorParams deserialize(bindings.Message mes
sage) { |
| 107 var decoder = new bindings.Decoder(message); | 116 var decoder = new bindings.Decoder(message); |
| 108 var result = decode(decoder); | 117 var result = decode(decoder); |
| 109 if (decoder.excessHandles != null) { | 118 if (decoder.excessHandles != null) { |
| 110 decoder.excessHandles.forEach((h) => h.close()); | 119 decoder.excessHandles.forEach((h) => h.close()); |
| 111 } | 120 } |
| 112 return result; | 121 return result; |
| 113 } | 122 } |
| 114 | 123 |
| 115 static _ShellCreateApplicationConnectorParams decode(bindings.Decoder decoder0
) { | 124 static _ShellCreateApplicationConnectorParams decode(bindings.Decoder decoder0
) { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 Map toJson() { | 171 Map toJson() { |
| 163 throw new bindings.MojoCodecError( | 172 throw new bindings.MojoCodecError( |
| 164 'Object containing handles cannot be encoded to JSON.'); | 173 'Object containing handles cannot be encoded to JSON.'); |
| 165 } | 174 } |
| 166 } | 175 } |
| 167 | 176 |
| 168 const int _shellMethodConnectToApplicationName = 0; | 177 const int _shellMethodConnectToApplicationName = 0; |
| 169 const int _shellMethodCreateApplicationConnectorName = 1; | 178 const int _shellMethodCreateApplicationConnectorName = 1; |
| 170 | 179 |
| 171 class _ShellServiceDescription implements service_describer.ServiceDescription { | 180 class _ShellServiceDescription implements service_describer.ServiceDescription { |
| 172 dynamic getTopLevelInterface([Function responseFactory]) => | 181 void getTopLevelInterface(Function responder) { |
| 173 responseFactory(null); | 182 responder(null); |
| 183 } |
| 174 | 184 |
| 175 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 185 void getTypeDefinition(String typeKey, Function responder) { |
| 176 responseFactory(null); | 186 responder(null); |
| 187 } |
| 177 | 188 |
| 178 dynamic getAllTypeDefinitions([Function responseFactory]) => | 189 void getAllTypeDefinitions(Function responder) { |
| 179 responseFactory(null); | 190 responder(null); |
| 191 } |
| 180 } | 192 } |
| 181 | 193 |
| 182 abstract class Shell { | 194 abstract class Shell { |
| 183 static const String serviceName = null; | 195 static const String serviceName = null; |
| 184 | 196 |
| 185 static service_describer.ServiceDescription _cachedServiceDescription; | 197 static service_describer.ServiceDescription _cachedServiceDescription; |
| 186 static service_describer.ServiceDescription get serviceDescription { | 198 static service_describer.ServiceDescription get serviceDescription { |
| 187 if (_cachedServiceDescription == null) { | 199 if (_cachedServiceDescription == null) { |
| 188 _cachedServiceDescription = new _ShellServiceDescription(); | 200 _cachedServiceDescription = new _ShellServiceDescription(); |
| 189 } | 201 } |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 : super.fromHandle(handle, autoBegin: impl != null) { | 347 : super.fromHandle(handle, autoBegin: impl != null) { |
| 336 _impl = impl; | 348 _impl = impl; |
| 337 } | 349 } |
| 338 | 350 |
| 339 _ShellStubControl.unbound([this._impl]) : super.unbound(); | 351 _ShellStubControl.unbound([this._impl]) : super.unbound(); |
| 340 | 352 |
| 341 String get serviceName => Shell.serviceName; | 353 String get serviceName => Shell.serviceName; |
| 342 | 354 |
| 343 | 355 |
| 344 | 356 |
| 345 dynamic handleMessage(bindings.ServiceMessage message) { | 357 void handleMessage(bindings.ServiceMessage message) { |
| 346 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 358 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
| 347 return bindings.ControlMessageHandler.handleMessage(this, | 359 bindings.ControlMessageHandler.handleMessage( |
| 348 0, | 360 this, 0, message); |
| 349 message); | 361 return; |
| 350 } | 362 } |
| 351 if (_impl == null) { | 363 if (_impl == null) { |
| 352 throw new core.MojoApiError("$this has no implementation set"); | 364 throw new core.MojoApiError("$this has no implementation set"); |
| 353 } | 365 } |
| 354 switch (message.header.type) { | 366 switch (message.header.type) { |
| 355 case _shellMethodConnectToApplicationName: | 367 case _shellMethodConnectToApplicationName: |
| 356 var params = _ShellConnectToApplicationParams.deserialize( | 368 var params = _ShellConnectToApplicationParams.deserialize( |
| 357 message.payload); | 369 message.payload); |
| 358 _impl.connectToApplication(params.applicationUrl, params.services); | 370 _impl.connectToApplication(params.applicationUrl, params.services); |
| 359 break; | 371 break; |
| 360 case _shellMethodCreateApplicationConnectorName: | 372 case _shellMethodCreateApplicationConnectorName: |
| 361 var params = _ShellCreateApplicationConnectorParams.deserialize( | 373 var params = _ShellCreateApplicationConnectorParams.deserialize( |
| 362 message.payload); | 374 message.payload); |
| 363 _impl.createApplicationConnector(params.applicationConnectorRequest); | 375 _impl.createApplicationConnector(params.applicationConnectorRequest); |
| 364 break; | 376 break; |
| 365 default: | 377 default: |
| 366 throw new bindings.MojoCodecError("Unexpected message name"); | 378 throw new bindings.MojoCodecError("Unexpected message name"); |
| 367 break; | 379 break; |
| 368 } | 380 } |
| 369 return null; | |
| 370 } | 381 } |
| 371 | 382 |
| 372 Shell get impl => _impl; | 383 Shell get impl => _impl; |
| 373 set impl(Shell d) { | 384 set impl(Shell d) { |
| 374 if (d == null) { | 385 if (d == null) { |
| 375 throw new core.MojoApiError("$this: Cannot set a null implementation"); | 386 throw new core.MojoApiError("$this: Cannot set a null implementation"); |
| 376 } | 387 } |
| 377 if (isBound && (_impl == null)) { | 388 if (isBound && (_impl == null)) { |
| 378 beginHandlingEvents(); | 389 beginHandlingEvents(); |
| 379 } | 390 } |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 void connectToApplication(String applicationUrl, service_provider_mojom.Servic
eProviderInterfaceRequest services) { | 434 void connectToApplication(String applicationUrl, service_provider_mojom.Servic
eProviderInterfaceRequest services) { |
| 424 return impl.connectToApplication(applicationUrl, services); | 435 return impl.connectToApplication(applicationUrl, services); |
| 425 } | 436 } |
| 426 void createApplicationConnector(application_connector_mojom.ApplicationConnect
orInterfaceRequest applicationConnectorRequest) { | 437 void createApplicationConnector(application_connector_mojom.ApplicationConnect
orInterfaceRequest applicationConnectorRequest) { |
| 427 return impl.createApplicationConnector(applicationConnectorRequest); | 438 return impl.createApplicationConnector(applicationConnectorRequest); |
| 428 } | 439 } |
| 429 } | 440 } |
| 430 | 441 |
| 431 | 442 |
| 432 | 443 |
| OLD | NEW |