| Index: mojo/public/dart/src/service_provider.dart
|
| diff --git a/mojo/public/dart/src/service_provider.dart b/mojo/public/dart/src/service_provider.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..555915c64925c537767f36912ad8c0bb797bcf40
|
| --- /dev/null
|
| +++ b/mojo/public/dart/src/service_provider.dart
|
| @@ -0,0 +1,18 @@
|
| +// 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 bindings;
|
| +
|
| +typedef 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();
|
| + }
|
| +}
|
|
|