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

Unified Diff: mojo/public/cpp/bindings/lib/associated_group.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/associated_group.cc
diff --git a/mojo/public/cpp/bindings/lib/associated_group.cc b/mojo/public/cpp/bindings/lib/associated_group.cc
new file mode 100644
index 0000000000000000000000000000000000000000..0bdf809d1ed47b8d6780bd9ddf1298f3c99dfe45
--- /dev/null
+++ b/mojo/public/cpp/bindings/lib/associated_group.cc
@@ -0,0 +1,35 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "mojo/public/cpp/bindings/associated_group.h"
+
+#include "mojo/public/cpp/bindings/lib/multiplex_router.h"
+
+namespace mojo {
+
+AssociatedGroup::AssociatedGroup() {}
+
+AssociatedGroup::AssociatedGroup(const AssociatedGroup& other)
+ : router_(other.router_) {}
+
+AssociatedGroup::~AssociatedGroup() {}
+
+AssociatedGroup& AssociatedGroup::operator=(const AssociatedGroup& other) {
+ if (this == &other)
+ return *this;
+
+ router_ = other.router_;
+ return *this;
+}
+
+void AssociatedGroup::CreateEndpointHandlePair(
+ internal::ScopedInterfaceEndpointHandle* local_endpoint,
+ internal::ScopedInterfaceEndpointHandle* remote_endpoint) {
+ if (!router_)
+ return;
+
+ router_->CreateEndpointHandlePair(local_endpoint, remote_endpoint);
+}
+
+} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698