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

Unified Diff: mojo/public/cpp/bindings/lib/multiplex_router.cc

Issue 1465293002: Mojo C++ bindings: introduce public associated-interface-related types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
Index: mojo/public/cpp/bindings/lib/multiplex_router.cc
diff --git a/mojo/public/cpp/bindings/lib/multiplex_router.cc b/mojo/public/cpp/bindings/lib/multiplex_router.cc
index a2b057be9fbd7d3389254dca2cb25f3924d57156..c09fc17ff4b2ad9deee6d513589f6b5bd1a8f524 100644
--- a/mojo/public/cpp/bindings/lib/multiplex_router.cc
+++ b/mojo/public/cpp/bindings/lib/multiplex_router.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
#include "base/stl_util.h"
+#include "mojo/public/cpp/bindings/associated_group.h"
#include "mojo/public/cpp/bindings/lib/interface_endpoint_client.h"
namespace mojo {
@@ -284,6 +285,17 @@ void MultiplexRouter::RaiseError() {
}
}
+scoped_ptr<AssociatedGroup> MultiplexRouter::CreateAssociatedGroup() {
+ scoped_ptr<AssociatedGroup> group(new AssociatedGroup);
+ group->router_ = this;
+ return group.Pass();
+}
+
+// static
+MultiplexRouter* MultiplexRouter::GetRouter(AssociatedGroup* associated_group) {
+ return associated_group->router_.get();
+}
+
ScopedMessagePipeHandle MultiplexRouter::PassMessagePipe() {
DCHECK(thread_checker_.CalledOnValidThread());
{
« no previous file with comments | « mojo/public/cpp/bindings/lib/multiplex_router.h ('k') | mojo/public/cpp/bindings/lib/scoped_interface_endpoint_handle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698