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

Unified Diff: mojo/dart/packages/mojo_services/lib/contacts/contacts.mojom.dart

Issue 1983453002: Dart: Refactor Stubs (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Merge Created 4 years, 7 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_services/lib/contacts/contacts.mojom.dart
diff --git a/mojo/dart/packages/mojo_services/lib/contacts/contacts.mojom.dart b/mojo/dart/packages/mojo_services/lib/contacts/contacts.mojom.dart
index 398eb080c677691aed6fb25e0ecc10b0cdf21929..a8066069c71a9f939b381e7bcbe65a826002c2d2 100644
--- a/mojo/dart/packages/mojo_services/lib/contacts/contacts.mojom.dart
+++ b/mojo/dart/packages/mojo_services/lib/contacts/contacts.mojom.dart
@@ -768,9 +768,9 @@ abstract class ContactsService {
dynamic getPhoto(int id,bool highResolution,[Function responseFactory = null]);
}
-
-class _ContactsServiceProxyControl extends bindings.ProxyMessageHandler
- implements bindings.ProxyControl {
+class _ContactsServiceProxyControl
+ extends bindings.ProxyMessageHandler
+ implements bindings.ProxyControl {
_ContactsServiceProxyControl.fromEndpoint(
core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
@@ -784,7 +784,6 @@ class _ContactsServiceProxyControl extends bindings.ProxyMessageHandler
String get serviceName => ContactsService.serviceName;
- @override
void handleResponse(bindings.ServiceMessage message) {
switch (message.header.type) {
case _contactsServiceMethodGetCountName:
@@ -881,9 +880,9 @@ class _ContactsServiceProxyControl extends bindings.ProxyMessageHandler
}
}
-
-class ContactsServiceProxy extends bindings.Proxy
- implements ContactsService {
+class ContactsServiceProxy
+ extends bindings.Proxy
+ implements ContactsService {
ContactsServiceProxy.fromEndpoint(
core.MojoMessagePipeEndpoint endpoint)
: super(new _ContactsServiceProxyControl.fromEndpoint(endpoint));
@@ -949,29 +948,24 @@ class ContactsServiceProxy extends bindings.Proxy
}
}
-
-class ContactsServiceStub extends bindings.Stub {
+class _ContactsServiceStubControl
+ extends bindings.StubMessageHandler
+ implements bindings.StubControl<ContactsService> {
ContactsService _impl;
- ContactsServiceStub.fromEndpoint(
+ _ContactsServiceStubControl.fromEndpoint(
core.MojoMessagePipeEndpoint endpoint, [ContactsService impl])
: super.fromEndpoint(endpoint, autoBegin: impl != null) {
_impl = impl;
}
- ContactsServiceStub.fromHandle(
+ _ContactsServiceStubControl.fromHandle(
core.MojoHandle handle, [ContactsService impl])
: super.fromHandle(handle, autoBegin: impl != null) {
_impl = impl;
}
- ContactsServiceStub.unbound([this._impl]) : super.unbound();
-
- static ContactsServiceStub newFromEndpoint(
- core.MojoMessagePipeEndpoint endpoint) {
- assert(endpoint.setDescription("For ContactsServiceStub"));
- return new ContactsServiceStub.fromEndpoint(endpoint);
- }
+ _ContactsServiceStubControl.unbound([this._impl]) : super.unbound();
ContactsServiceGetCountResponseParams _contactsServiceGetCountResponseParamsFactory(int count) {
@@ -1119,9 +1113,10 @@ class ContactsServiceStub extends bindings.Stub {
}
}
+ @override
String toString() {
var superString = super.toString();
- return "ContactsServiceStub($superString)";
+ return "_ContactsServiceStubControl($superString)";
}
int get version => 0;
@@ -1135,5 +1130,43 @@ class ContactsServiceStub extends bindings.Stub {
}
}
+class ContactsServiceStub
+ extends bindings.Stub<ContactsService>
+ implements ContactsService {
+ ContactsServiceStub.fromEndpoint(
+ core.MojoMessagePipeEndpoint endpoint, [ContactsService impl])
+ : super(new _ContactsServiceStubControl.fromEndpoint(endpoint, impl));
+
+ ContactsServiceStub.fromHandle(
+ core.MojoHandle handle, [ContactsService impl])
+ : super(new _ContactsServiceStubControl.fromHandle(handle, impl));
+
+ ContactsServiceStub.unbound([ContactsService impl])
+ : super(new _ContactsServiceStubControl.unbound(impl));
+
+ static ContactsServiceStub newFromEndpoint(
+ core.MojoMessagePipeEndpoint endpoint) {
+ assert(endpoint.setDescription("For ContactsServiceStub"));
+ return new ContactsServiceStub.fromEndpoint(endpoint);
+ }
+
+ static service_describer.ServiceDescription get serviceDescription =>
+ _ContactsServiceStubControl.serviceDescription;
+
+
+ dynamic getCount(String filter,[Function responseFactory = null]) {
+ return impl.getCount(filter,responseFactory);
+ }
+ dynamic get(String filter,int offset,int limit,[Function responseFactory = null]) {
+ return impl.get(filter,offset,limit,responseFactory);
+ }
+ dynamic getEmails(int id,[Function responseFactory = null]) {
+ return impl.getEmails(id,responseFactory);
+ }
+ dynamic getPhoto(int id,bool highResolution,[Function responseFactory = null]) {
+ return impl.getPhoto(id,highResolution,responseFactory);
+ }
+}
+

Powered by Google App Engine
This is Rietveld 408576698