| Index: mojo/dart/packages/mojo_services/lib/nfc/nfc.mojom.dart
|
| diff --git a/mojo/dart/packages/mojo_services/lib/nfc/nfc.mojom.dart b/mojo/dart/packages/mojo_services/lib/nfc/nfc.mojom.dart
|
| index 85058cb9a106c17f66b2e448300fb0abbfb5fd64..92faec658a403ccc8160ec36bca7a7d457c59c9e 100644
|
| --- a/mojo/dart/packages/mojo_services/lib/nfc/nfc.mojom.dart
|
| +++ b/mojo/dart/packages/mojo_services/lib/nfc/nfc.mojom.dart
|
| @@ -508,11 +508,14 @@ const int _NfcTransmission_cancelName = 0;
|
|
|
|
|
| class _NfcTransmissionServiceDescription implements service_describer.ServiceDescription {
|
| - dynamic getTopLevelInterface([Function responseFactory]) => null;
|
| + dynamic getTopLevelInterface([Function responseFactory]) =>
|
| + responseFactory(null);
|
|
|
| - dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => null;
|
| + dynamic getTypeDefinition(String typeKey, [Function responseFactory]) =>
|
| + responseFactory(null);
|
|
|
| - dynamic getAllTypeDefinitions([Function responseFactory]) => null;
|
| + dynamic getAllTypeDefinitions([Function responseFactory]) =>
|
| + responseFactory(null);
|
| }
|
|
|
| abstract class NfcTransmission {
|
| @@ -682,8 +685,13 @@ class NfcTransmissionStub extends bindings.Stub {
|
|
|
| int get version => 0;
|
|
|
| - service_describer.ServiceDescription get serviceDescription =>
|
| - new _NfcTransmissionServiceDescription();
|
| + static service_describer.ServiceDescription _cachedServiceDescription;
|
| + static service_describer.ServiceDescription get serviceDescription {
|
| + if (_cachedServiceDescription == null) {
|
| + _cachedServiceDescription = new _NfcTransmissionServiceDescription();
|
| + }
|
| + return _cachedServiceDescription;
|
| + }
|
| }
|
|
|
| const int _NfcReceiver_onReceivedNfcDataName = 0;
|
| @@ -691,11 +699,14 @@ const int _NfcReceiver_onReceivedNfcDataName = 0;
|
|
|
|
|
| class _NfcReceiverServiceDescription implements service_describer.ServiceDescription {
|
| - dynamic getTopLevelInterface([Function responseFactory]) => null;
|
| + dynamic getTopLevelInterface([Function responseFactory]) =>
|
| + responseFactory(null);
|
|
|
| - dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => null;
|
| + dynamic getTypeDefinition(String typeKey, [Function responseFactory]) =>
|
| + responseFactory(null);
|
|
|
| - dynamic getAllTypeDefinitions([Function responseFactory]) => null;
|
| + dynamic getAllTypeDefinitions([Function responseFactory]) =>
|
| + responseFactory(null);
|
| }
|
|
|
| abstract class NfcReceiver {
|
| @@ -866,8 +877,13 @@ class NfcReceiverStub extends bindings.Stub {
|
|
|
| int get version => 0;
|
|
|
| - service_describer.ServiceDescription get serviceDescription =>
|
| - new _NfcReceiverServiceDescription();
|
| + static service_describer.ServiceDescription _cachedServiceDescription;
|
| + static service_describer.ServiceDescription get serviceDescription {
|
| + if (_cachedServiceDescription == null) {
|
| + _cachedServiceDescription = new _NfcReceiverServiceDescription();
|
| + }
|
| + return _cachedServiceDescription;
|
| + }
|
| }
|
|
|
| const int _Nfc_transmitOnNextConnectionName = 0;
|
| @@ -877,11 +893,14 @@ const int _Nfc_unregisterName = 2;
|
|
|
|
|
| class _NfcServiceDescription implements service_describer.ServiceDescription {
|
| - dynamic getTopLevelInterface([Function responseFactory]) => null;
|
| + dynamic getTopLevelInterface([Function responseFactory]) =>
|
| + responseFactory(null);
|
|
|
| - dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => null;
|
| + dynamic getTypeDefinition(String typeKey, [Function responseFactory]) =>
|
| + responseFactory(null);
|
|
|
| - dynamic getAllTypeDefinitions([Function responseFactory]) => null;
|
| + dynamic getAllTypeDefinitions([Function responseFactory]) =>
|
| + responseFactory(null);
|
| }
|
|
|
| abstract class Nfc {
|
| @@ -1123,8 +1142,13 @@ class NfcStub extends bindings.Stub {
|
|
|
| int get version => 0;
|
|
|
| - service_describer.ServiceDescription get serviceDescription =>
|
| - new _NfcServiceDescription();
|
| + static service_describer.ServiceDescription _cachedServiceDescription;
|
| + static service_describer.ServiceDescription get serviceDescription {
|
| + if (_cachedServiceDescription == null) {
|
| + _cachedServiceDescription = new _NfcServiceDescription();
|
| + }
|
| + return _cachedServiceDescription;
|
| + }
|
| }
|
|
|
|
|
|
|