Chromium Code Reviews| Index: content/public/common/associated_interface_provider.h |
| diff --git a/content/public/common/associated_interface_provider.h b/content/public/common/associated_interface_provider.h |
| index f1c495b1a0fbe8cfb278cdeb40a1452cbcfa0a9b..121d18ce0fbe5093d7222f762f4c11451408d5d3 100644 |
| --- a/content/public/common/associated_interface_provider.h |
| +++ b/content/public/common/associated_interface_provider.h |
| @@ -31,6 +31,25 @@ namespace content { |
| // which hosts its corresponding RenderFrame. |
| class AssociatedInterfaceProvider { |
| public: |
| + class TestApi { |
|
Ken Rockot(use gerrit already)
2016/09/20 18:26:20
I don't think we need to emulate what's done in In
leonhsl(Using Gerrit)
2016/09/21 11:46:57
Done and thanks!
|
| + public: |
| + explicit TestApi(AssociatedInterfaceProvider* provider) |
| + : provider_(provider) {} |
| + ~TestApi() {} |
| + |
| + void SetBinderForName(const std::string& name, |
| + const base::Callback<void( |
| + mojo::ScopedInterfaceEndpointHandle)>& binder) { |
| + provider_->SetBinderForName(name, binder); |
| + } |
| + |
| + void ClearBinders() { provider_->ClearBinders(); } |
| + |
| + private: |
| + AssociatedInterfaceProvider* provider_; |
| + DISALLOW_COPY_AND_ASSIGN(TestApi); |
| + }; |
| + |
| virtual ~AssociatedInterfaceProvider() {} |
| // Passes an associated endpoint handle to the remote end to be bound to a |
| @@ -49,6 +68,13 @@ class AssociatedInterfaceProvider { |
| mojo::GetProxy(proxy, GetAssociatedGroup()); |
| GetInterface(Interface::Name_, request.PassHandle()); |
| } |
| + |
| + private: |
| + virtual void SetBinderForName( |
| + const std::string& name, |
| + const base::Callback<void(mojo::ScopedInterfaceEndpointHandle)>& |
| + binder) = 0; |
| + virtual void ClearBinders() = 0; |
| }; |
| } // namespace content |