| Index: mojo/dbus/dbus_external_service.h
|
| diff --git a/mojo/dbus/dbus_external_service.h b/mojo/dbus/dbus_external_service.h
|
| index 77e9e4be2df38d630a280a3f25e58405f8e3c105..da383d00e248c9ae786cd14b73d8aaeaa42d0af3 100644
|
| --- a/mojo/dbus/dbus_external_service.h
|
| +++ b/mojo/dbus/dbus_external_service.h
|
| @@ -50,8 +50,10 @@ class DBusExternalServiceBase {
|
| };
|
|
|
| template <class ServiceImpl>
|
| -class DBusExternalService : public DBusExternalServiceBase,
|
| - public ApplicationDelegate {
|
| +class DBusExternalService
|
| + : public DBusExternalServiceBase,
|
| + public ApplicationDelegate,
|
| + public InterfaceFactory<typename ServiceImpl::Implements> {
|
| public:
|
| explicit DBusExternalService(const std::string& service_name)
|
| : DBusExternalServiceBase(service_name) {
|
| @@ -60,10 +62,16 @@ class DBusExternalService : public DBusExternalServiceBase,
|
|
|
| virtual bool ConfigureIncomingConnection(ApplicationConnection* connection)
|
| MOJO_OVERRIDE {
|
| - connection->AddService<ServiceImpl>();
|
| + connection->AddServiceFactory(this);
|
| return true;
|
| }
|
|
|
| + virtual void Create(ApplicationConnection* connection,
|
| + InterfaceRequest<typename ServiceImpl::Implements>
|
| + request) MOJO_OVERRIDE {
|
| + mojo::BindToRequest(new ServiceImpl, &request);
|
| + }
|
| +
|
| protected:
|
| virtual void Connect(ScopedMessagePipeHandle client_handle) OVERRIDE {
|
| external_service_.reset(BindToPipe(new Impl(this), client_handle.Pass()));
|
|
|