Chromium Code Reviews| Index: mojo/public/dart/src/application_connection.dart |
| diff --git a/mojo/public/dart/src/application_connection.dart b/mojo/public/dart/src/application_connection.dart |
| index 4f0b6c8ed250056b670b9b7cddee8faeb53c7b07..0ed5e1872e098d2e0f7cbcfed8f5b66ec041d2da 100644 |
| --- a/mojo/public/dart/src/application_connection.dart |
| +++ b/mojo/public/dart/src/application_connection.dart |
| @@ -11,15 +11,15 @@ typedef void FallbackServiceFactory(String interfaceName, |
| class LocalServiceProvider implements ServiceProvider { |
| final ApplicationConnection connection; |
| - ServiceProviderStub _stub; |
| + ServiceProviderBinding _binding; |
|
sky
2015/03/02 20:28:22
Binding is such a better name than Stub. Thanks!
zra
2015/03/02 20:52:45
No problem =)
|
| - LocalServiceProvider(this.connection, this._stub) { |
| - _stub.delegate = this; |
| + LocalServiceProvider(this.connection, this._binding) { |
| + _binding.delegate = this; |
| } |
| - listen() => _stub.listen(); |
| + listen({Function onClosed}) => _binding.listen(onClosed: onClosed); |
| - void close({bool nodefer : false}) => _stub.close(nodefer: nodefer); |
| + void close({bool nodefer : false}) => _binding.close(nodefer: nodefer); |
| void connectToService(String interfaceName, |
| core.MojoMessagePipeEndpoint pipe) { |
| @@ -64,10 +64,11 @@ class ApplicationConnection { |
| final _nameToServiceFactory = new Map<String, ServiceFactory>(); |
| FallbackServiceFactory _fallbackServiceFactory; |
| - ApplicationConnection(ServiceProviderStub stub, ServiceProviderProxy proxy) |
| + ApplicationConnection( |
| + ServiceProviderBinding binding, ServiceProviderProxy proxy) |
| : remoteServiceProvider = proxy { |
| - if (stub != null) _localServiceProvider = |
| - new LocalServiceProvider(this, stub); |
| + if (binding != null) |
| + _localServiceProvider = new LocalServiceProvider(this, binding); |
| } |
| FallbackServiceFactory get fallbackServiceFactory => _fallbackServiceFactory; |
| @@ -92,9 +93,9 @@ class ApplicationConnection { |
| _nameToServiceFactory[interfaceName] = factory; |
| } |
| - void listen() { |
| + void listen({Function onClosed}) { |
| assert(_localServiceProvider != null); |
| - _localServiceProvider.listen(); |
| + _localServiceProvider.listen(onClosed: onClosed); |
| } |
| void close({bool nodefer: false}) { |