| Index: mojo/public/cpp/bindings/associated_interface_ptr.h
|
| diff --git a/mojo/public/cpp/bindings/associated_interface_ptr.h b/mojo/public/cpp/bindings/associated_interface_ptr.h
|
| index e760c7d34a053bf9ec57d9386dd15ecab1f12f63..4d75949d883a31b907860e4b63a61e492f55c0c9 100644
|
| --- a/mojo/public/cpp/bindings/associated_interface_ptr.h
|
| +++ b/mojo/public/cpp/bindings/associated_interface_ptr.h
|
| @@ -267,6 +267,25 @@ void GetDummyProxyForTesting(AssociatedInterfacePtr<Interface>* proxy) {
|
| MakeRequest(proxy, group.get());
|
| }
|
|
|
| +template <typename Interface>
|
| +scoped_refptr<AssociatedGroupController> GetRemoteGroupControllerForTesting(
|
| + AssociatedInterfacePtr<Interface>* proxy) {
|
| + MessagePipe pipe;
|
| + scoped_refptr<internal::MultiplexRouter> router0 =
|
| + new internal::MultiplexRouter(std::move(pipe.handle0),
|
| + internal::MultiplexRouter::MULTI_INTERFACE,
|
| + true, base::ThreadTaskRunnerHandle::Get());
|
| + scoped_refptr<internal::MultiplexRouter> router1 =
|
| + new internal::MultiplexRouter(std::move(pipe.handle1),
|
| + internal::MultiplexRouter::MULTI_INTERFACE,
|
| + false, base::ThreadTaskRunnerHandle::Get());
|
| +
|
| + std::unique_ptr<AssociatedGroup> group = router0->CreateAssociatedGroup();
|
| + MakeRequest(proxy, group.get());
|
| +
|
| + return router1;
|
| +}
|
| +
|
| } // namespace mojo
|
|
|
| #endif // MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_INTERFACE_PTR_H_
|
|
|