| Index: services/service_manager/public/cpp/service_context.h
|
| diff --git a/services/service_manager/public/cpp/service_context.h b/services/service_manager/public/cpp/service_context.h
|
| index d082913d088d1c1e8afabfa4ad6a2b62c5695a6b..4d6d72a09c60e2ecfdd74c2a5fa4a44945230c6b 100644
|
| --- a/services/service_manager/public/cpp/service_context.h
|
| +++ b/services/service_manager/public/cpp/service_context.h
|
| @@ -13,6 +13,7 @@
|
| #include "base/memory/weak_ptr.h"
|
| #include "mojo/public/cpp/bindings/binding.h"
|
| #include "mojo/public/cpp/system/core.h"
|
| +#include "services/service_manager/public/cpp/binder_registry.h"
|
| #include "services/service_manager/public/cpp/connector.h"
|
| #include "services/service_manager/public/cpp/export.h"
|
| #include "services/service_manager/public/cpp/service.h"
|
| @@ -105,6 +106,20 @@ class SERVICE_MANAGER_PUBLIC_CPP_EXPORT ServiceContext : public mojom::Service {
|
| // disconnection from the Service Manager.
|
| void QuitNow();
|
|
|
| + // Overrides the interface binder for |interface_name| of |service_name|.
|
| + // This is a process-wide override, meaning that |binder| can intercept
|
| + // requests against only those |service_name| service instances running in the
|
| + // same process with caller of this function.
|
| + static void SetGlobalBinderForTesting(
|
| + const std::string& service_name,
|
| + const std::string& interface_name,
|
| + const BinderRegistry::Binder& binder,
|
| + const scoped_refptr<base::SingleThreadTaskRunner>& task_runner = nullptr);
|
| +
|
| + // Clears all overridden interface binders for service |service_name| set via
|
| + // SetGlobalBinderForTesting().
|
| + static void ClearGlobalBindersForTesting(const std::string& service_name);
|
| +
|
| private:
|
| friend class service_manager::Service;
|
|
|
|
|