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

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

Issue 2859343003: Enable overriding interface binders for any services running in current process. (Closed)
Patch Set: Address nit Created 3 years, 7 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 9e16687920f8eb437962bef7c796c131f81ce52b..b4d18911aaac9191b09786ae5bce97e8b367d9e2 100644
--- a/services/service_manager/public/cpp/binder_registry.h
+++ b/services/service_manager/public/cpp/binder_registry.h
@@ -17,13 +17,13 @@
namespace service_manager {
-class InterfaceBinder;
struct BindSourceInfo;
class BinderRegistry {
public:
- using Binder = base::Callback<void(const std::string&,
- mojo::ScopedMessagePipeHandle)>;
+ using Binder = base::Callback<void(const BindSourceInfo&,
+ const std::string&,
+ mojo::ScopedMessagePipeHandle)>;
BinderRegistry();
~BinderRegistry();
@@ -43,6 +43,11 @@ class BinderRegistry {
const base::Callback<void(mojo::ScopedMessagePipeHandle)>& callback,
const scoped_refptr<base::SingleThreadTaskRunner>& task_runner = nullptr);
+ void AddInterface(
+ const std::string& interface_name,
+ const Binder& binder_callback,
+ const scoped_refptr<base::SingleThreadTaskRunner>& task_runner = nullptr);
+
// Removes the specified interface from the registry. This has no effect on
// bindings already completed.
template <typename Interface>

Powered by Google App Engine
This is Rietveld 408576698