Chromium Code Reviews| Index: services/dart/lib/src/service_provider.dart |
| diff --git a/services/dart/lib/src/service_provider.dart b/services/dart/lib/src/service_provider.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f3ac81cda2a842636515d0c77874dd656514721b |
| --- /dev/null |
| +++ b/services/dart/lib/src/service_provider.dart |
| @@ -0,0 +1,19 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +part of application; |
| + |
| +typedef bindings.Interface InterfaceFactory( |
| + core.MojoMessagePipeEndpoint endpoint); |
| + |
| +class ServiceProvider implements service_provider.ServiceProviderInterface { |
| + InterfaceFactory _interfaceFactory; |
| + |
| + ServiceProvider(this._interfaceFactory); |
| + |
| + connectToService(String interfaceName, core.MojoMessagePipeEndpoint pipe) { |
| + var interfaceImpl = _interfaceFactory(pipe); |
| + interfaceImpl.listen(); |
| + } |
| +} |
|
abarth-chromium
2015/01/18 22:19:02
I'm not sure why we need this code. Why isn't thi
zra
2015/01/20 17:36:51
The message pipe handle in the mojom doesn't (and
|