Chromium Code Reviews| 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 451f1ad0c8e297a65de8f14350be03ef6f6498b0..2a2886dd52c98a014f6045feb90d3cc28cf2adbe 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/service.h" |
| #include "services/service_manager/public/interfaces/connector.mojom.h" |
| @@ -104,6 +105,20 @@ class 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, means that |binder| can intercept requests |
|
Ken Rockot(use gerrit already)
2017/05/11 02:32:08
nit: means=meaning
leonhsl(Using Gerrit)
2017/05/11 03:10:04
Done.
|
| + // 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() before. |
|
Ken Rockot(use gerrit already)
2017/05/11 02:32:08
nit: can remove "before"
leonhsl(Using Gerrit)
2017/05/11 03:10:04
Done.
|
| + static void ClearGlobalBindersForTesting(const std::string& service_name); |
| + |
| private: |
| friend class service_manager::Service; |