Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2118)

Unified Diff: mojo/public/cpp/bindings/associated_interface_ptr.h

Issue 2606593002: [ServiceWorker] Associate interfaces.
Patch Set: Fix unit tests Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/test/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « content/test/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698