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..03571874aeb16974bb389fd719f352fa09bd35f8 100644 |
| --- a/services/service_manager/public/cpp/service_context.h |
| +++ b/services/service_manager/public/cpp/service_context.h |
| @@ -42,6 +42,32 @@ namespace service_manager { |
| // client. |
| class ServiceContext : public mojom::Service { |
| public: |
| + class TestApi { |
|
Ken Rockot(use gerrit already)
2017/05/09 15:29:34
nit: I'm not really a fan of these TestApi subclas
leonhsl(Using Gerrit)
2017/05/09 23:31:53
Acknowledged.
leonhsl(Using Gerrit)
2017/05/10 09:57:11
Done.
|
| + public: |
| + ~TestApi() = default; |
| + |
| + // Overrides the interface binder for |interface_name| of |service|. This is |
| + // a process-wide override, means that |binder| can intercept requests only |
| + // if |service| runs in the same process with caller of this function. |
| + // You can specify |service| as identity of a particular instance of service |
| + // "Foo", or just an identity only having the name "Foo" to specify any |
| + // instances of service "Foo" in general. |
| + static void SetGlobalBinder( |
| + const Identity& service, |
|
Ken Rockot(use gerrit already)
2017/05/09 15:29:34
I wonder if we really want a specific identity to
leonhsl(Using Gerrit)
2017/05/09 23:31:53
Yeah I was afraid in future some test cases may wa
blundell
2017/05/10 08:54:39
Let's leave it simple for now and it will be easy
leonhsl(Using Gerrit)
2017/05/10 09:57:11
I see, will update CL soon.
leonhsl(Using Gerrit)
2017/05/11 02:21:47
Done.
|
| + const std::string& interface_name, |
| + const base::Callback<void(mojo::ScopedMessagePipeHandle)>& binder, |
|
Ken Rockot(use gerrit already)
2017/05/09 15:29:34
In keeping with existing binder callbacks today, t
leonhsl(Using Gerrit)
2017/05/09 23:31:53
Acknowledged.
leonhsl(Using Gerrit)
2017/05/10 09:57:11
Done and Thanks!
|
| + const scoped_refptr<base::SingleThreadTaskRunner>& task_runner = |
| + nullptr); |
| + |
| + // Clears all overridden interface binders for |service|. |
| + static void ClearGlobalBinders(const Identity& service); |
|
blundell
2017/05/05 12:56:07
nit: Maybe ClearGlobalBindersForService()?
leonhsl(Using Gerrit)
2017/05/09 00:08:54
Acknowledged.
|
| + |
| + private: |
| + TestApi() = default; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(TestApi); |
| + }; |
| + |
| // Creates a new ServiceContext bound to |request|. This connection may be |
| // used immediately to make outgoing connections via connector(). |
| // |