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

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

Issue 2879843002: Reland 1: Enable overriding interface binders for any services running in current process. (Closed)
Patch Set: Identical with original CL 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
« no previous file with comments | « content/test/BUILD.gn ('k') | services/service_manager/public/cpp/binder_registry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 00a063090fe276e6c6e5553ac90f11404485e585..0cce9d98224058476fc0d4c495e92e55f1f0ebc0 100644
--- a/services/service_manager/public/cpp/binder_registry.h
+++ b/services/service_manager/public/cpp/binder_registry.h
@@ -18,13 +18,13 @@
namespace service_manager {
-class InterfaceBinder;
struct BindSourceInfo;
class SERVICE_MANAGER_PUBLIC_CPP_EXPORT 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();
@@ -44,6 +44,11 @@ class SERVICE_MANAGER_PUBLIC_CPP_EXPORT 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>
« no previous file with comments | « content/test/BUILD.gn ('k') | services/service_manager/public/cpp/binder_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698