Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(879)

Unified Diff: services/service_manager/public/cpp/binder_registry.h

Issue 2844063003: Migrate RenderFrameImpl to use BinderRegistry. (Closed)
Patch Set: . Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: services/service_manager/public/cpp/binder_registry.h
diff --git a/services/service_manager/public/cpp/binder_registry.h b/services/service_manager/public/cpp/binder_registry.h
index f8d1e5c72b63585954f344455fa97df329e0cba3..44eab787a9c51b2e858f1caa04b71aa7a0f76e7a 100644
--- a/services/service_manager/public/cpp/binder_registry.h
+++ b/services/service_manager/public/cpp/binder_registry.h
@@ -11,6 +11,7 @@
#include "base/callback.h"
#include "base/memory/ptr_util.h"
+#include "base/memory/weak_ptr.h"
#include "mojo/public/cpp/system/message_pipe.h"
#include "services/service_manager/public/cpp/interface_factory.h"
#include "services/service_manager/public/cpp/lib/callback_binder.h"
@@ -72,6 +73,8 @@ class BinderRegistry {
const std::string& interface_name,
mojo::ScopedMessagePipeHandle interface_pipe);
+ base::WeakPtr<BinderRegistry> GetWeakPtr();
+
private:
using InterfaceNameToBinderMap =
std::map<std::string, std::unique_ptr<InterfaceBinder>>;
@@ -82,6 +85,8 @@ class BinderRegistry {
InterfaceNameToBinderMap binders_;
+ base::WeakPtrFactory<BinderRegistry> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(BinderRegistry);
};

Powered by Google App Engine
This is Rietveld 408576698