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

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

Issue 2100683002: Mojo C++ Bindings: Extract AssociatedGroupController from MultiplexRouter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: oops more gyp ugh Created 4 years, 6 months 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/scoped_interface_endpoint_handle.h
diff --git a/mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h b/mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h
index 3daf75d8a2707db9fc73af4757ed2dbd67db5058..1f45b0c57140396518b0a95cdac78e220443e9e1 100644
--- a/mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h
+++ b/mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h
@@ -7,13 +7,11 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "mojo/public/cpp/bindings/lib/interface_id.h"
+#include "mojo/public/cpp/bindings/interface_id.h"
namespace mojo {
-namespace internal {
-class MultiplexRouter;
-}
+class AssociatedGroupController;
// ScopedInterfaceEndpointHandle refers to one end of an interface, either the
// implementation side or the client side.
@@ -29,7 +27,7 @@ class ScopedInterfaceEndpointHandle {
ScopedInterfaceEndpointHandle& operator=(
ScopedInterfaceEndpointHandle&& other);
- bool is_valid() const { return internal::IsValidInterfaceId(id_); }
+ bool is_valid() const { return IsValidInterfaceId(id_); }
bool is_local() const { return is_local_; }
@@ -38,28 +36,30 @@ class ScopedInterfaceEndpointHandle {
// DO NOT USE METHODS BELOW THIS LINE. These are for internal use and testing.
- internal::InterfaceId id() const { return id_; }
+ InterfaceId id() const { return id_; }
- internal::MultiplexRouter* router() const { return router_.get(); }
+ AssociatedGroupController* group_controller() const {
+ return group_controller_.get();
+ }
// Releases the handle without closing it.
- internal::InterfaceId release();
+ InterfaceId release();
private:
- friend class internal::MultiplexRouter;
+ friend class AssociatedGroupController;
- // This is supposed to be used by MultiplexRouter only.
+ // This is supposed to be used by AssociatedGroupController only.
// |id| is the corresponding interface ID.
- // If |is_local| is false, this handle is meant to be passed over |router| to
- // the remote side.
+ // If |is_local| is false, this handle is meant to be passed over a message
+ // pipe the remote side of the associated group.
ScopedInterfaceEndpointHandle(
- internal::InterfaceId id,
+ InterfaceId id,
bool is_local,
- scoped_refptr<internal::MultiplexRouter> router);
+ scoped_refptr<AssociatedGroupController> group_controller);
- internal::InterfaceId id_;
+ InterfaceId id_;
bool is_local_;
- scoped_refptr<internal::MultiplexRouter> router_;
+ scoped_refptr<AssociatedGroupController> group_controller_;
DISALLOW_COPY_AND_ASSIGN(ScopedInterfaceEndpointHandle);
};
« no previous file with comments | « mojo/public/cpp/bindings/lib/serialization_util.h ('k') | mojo/public/cpp/bindings/tests/multiplex_router_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698