Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Unified Diff: mojo/dart/packages/mojo/lib/mojo/bindings/types/service_describer.mojom.dart

Issue 1648803006: Expose Service Describer in Dart mojo package (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Address zra's feedback Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/dart/packages/mojo/lib/mojo/bindings/types/service_describer.mojom.dart
diff --git a/mojo/dart/packages/mojo/lib/mojo/bindings/types/service_describer.mojom.dart b/mojo/dart/packages/mojo/lib/mojo/bindings/types/service_describer.mojom.dart
index 75509d3d9263e41d42044c429801b8cb6bd896eb..27c51ec76a8a8c86b7c1dcb60eb656462b48734b 100644
--- a/mojo/dart/packages/mojo/lib/mojo/bindings/types/service_describer.mojom.dart
+++ b/mojo/dart/packages/mojo/lib/mojo/bindings/types/service_describer.mojom.dart
@@ -580,11 +580,14 @@ const int _ServiceDescriber_describeServiceName = 0;
class _ServiceDescriberServiceDescription implements 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 ServiceDescriber {
@@ -756,8 +759,13 @@ class ServiceDescriberStub extends bindings.Stub {
int get version => 0;
- ServiceDescription get serviceDescription =>
- new _ServiceDescriberServiceDescription();
+ static ServiceDescription _cachedServiceDescription;
+ static ServiceDescription get serviceDescription {
+ if (_cachedServiceDescription == null) {
+ _cachedServiceDescription = new _ServiceDescriberServiceDescription();
+ }
+ return _cachedServiceDescription;
+ }
}
const int _ServiceDescription_getTopLevelInterfaceName = 0;
@@ -767,11 +775,14 @@ const int _ServiceDescription_getAllTypeDefinitionsName = 2;
class _ServiceDescriptionServiceDescription implements 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 ServiceDescription {
@@ -1096,8 +1107,13 @@ class ServiceDescriptionStub extends bindings.Stub {
int get version => 0;
- ServiceDescription get serviceDescription =>
- new _ServiceDescriptionServiceDescription();
+ static ServiceDescription _cachedServiceDescription;
+ static ServiceDescription get serviceDescription {
+ if (_cachedServiceDescription == null) {
+ _cachedServiceDescription = new _ServiceDescriptionServiceDescription();
+ }
+ return _cachedServiceDescription;
+ }
}

Powered by Google App Engine
This is Rietveld 408576698