Index: services/navigation/navigation.h |
diff --git a/services/navigation/navigation.h b/services/navigation/navigation.h |
index af242e3025785cb32e5833486e81b6f1fc821c9d..181b73f24b65cb734323ecc84017e91b297b9b40 100644 |
--- a/services/navigation/navigation.h |
+++ b/services/navigation/navigation.h |
@@ -6,11 +6,11 @@ |
#define SERVICES_NAVIGATION_NAVIGATION_H_ |
#include "base/memory/ref_counted.h" |
-#include "base/memory/weak_ptr.h" |
#include "base/sequenced_task_runner.h" |
#include "content/public/common/connection_filter.h" |
#include "mojo/public/cpp/bindings/binding_set.h" |
#include "services/navigation/public/interfaces/view.mojom.h" |
+#include "services/service_manager/public/cpp/binder_registry.h" |
#include "services/service_manager/public/cpp/interface_factory.h" |
#include "services/service_manager/public/cpp/service.h" |
#include "services/service_manager/public/cpp/service_context_ref.h" |
@@ -19,21 +19,27 @@ namespace navigation { |
std::unique_ptr<service_manager::Service> CreateNavigationService(); |
-class Navigation : public service_manager::Service, public mojom::ViewFactory { |
+class Navigation |
+ : public service_manager::Service, |
+ public mojom::ViewFactory, |
+ public service_manager::InterfaceFactory<mojom::ViewFactory> { |
public: |
Navigation(); |
~Navigation() override; |
private: |
// service_manager::Service: |
- bool OnConnect(const service_manager::ServiceInfo& remote_info, |
- service_manager::InterfaceRegistry* registry) override; |
+ void OnBindInterface(const service_manager::ServiceInfo& source_info, |
+ const std::string& interface_name, |
+ mojo::ScopedMessagePipeHandle interface_pipe) override; |
// mojom::ViewFactory: |
void CreateView(mojom::ViewClientPtr client, |
mojom::ViewRequest request) override; |
- void CreateViewFactory(mojom::ViewFactoryRequest request); |
+ void Create(const service_manager::Identity& remote_identity, |
+ mojom::ViewFactoryRequest request) override; |
+ |
void ViewFactoryLost(); |
scoped_refptr<base::SequencedTaskRunner> view_task_runner_; |
@@ -43,10 +49,9 @@ class Navigation : public service_manager::Service, public mojom::ViewFactory { |
service_manager::ServiceContextRefFactory ref_factory_; |
std::set<std::unique_ptr<service_manager::ServiceContextRef>> refs_; |
+ service_manager::BinderRegistry registry_; |
mojo::BindingSet<mojom::ViewFactory> bindings_; |
- base::WeakPtrFactory<Navigation> weak_factory_; |
- |
DISALLOW_COPY_AND_ASSIGN(Navigation); |
}; |