| Index: content/common/mojo/service_registry_impl.h
|
| diff --git a/content/common/mojo/service_registry_impl.h b/content/common/mojo/service_registry_impl.h
|
| index c0dce522e368e912bd9f9ef5d40d040bf86ad415..d3ca173738df63071ee4048a47c656b3148b04c9 100644
|
| --- a/content/common/mojo/service_registry_impl.h
|
| +++ b/content/common/mojo/service_registry_impl.h
|
| @@ -11,6 +11,7 @@
|
| #include <utility>
|
|
|
| #include "base/callback.h"
|
| +#include "base/memory/weak_ptr.h"
|
| #include "content/public/common/service_registry.h"
|
| #include "mojo/public/cpp/bindings/interface_impl.h"
|
| #include "mojo/public/cpp/system/core.h"
|
| @@ -41,6 +42,8 @@ class ServiceRegistryImpl : public ServiceRegistry,
|
| const base::StringPiece& service_name,
|
| mojo::ScopedMessagePipeHandle handle) OVERRIDE;
|
|
|
| + base::WeakPtr<ServiceRegistry> GetWeakPtr();
|
| +
|
| private:
|
| // mojo::InterfaceImpl<mojo::ServiceProvider> overrides.
|
| virtual void ConnectToService(
|
| @@ -53,6 +56,8 @@ class ServiceRegistryImpl : public ServiceRegistry,
|
| std::queue<std::pair<std::string, mojo::MessagePipeHandle> >
|
| pending_connects_;
|
| bool bound_;
|
| +
|
| + base::WeakPtrFactory<ServiceRegistry> weak_factory_;
|
| };
|
|
|
| } // namespace content
|
|
|