Chromium Code Reviews| Index: mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h |
| diff --git a/mojo/public/cpp/bindings/lib/scoped_interface_endpoint_handle.h b/mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h |
| similarity index 63% |
| rename from mojo/public/cpp/bindings/lib/scoped_interface_endpoint_handle.h |
| rename to mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h |
| index cb9418120716447f01435b046eeff94c107ccbab..8f23cc28c66e162d232e25b626ab209aef2d29f0 100644 |
| --- a/mojo/public/cpp/bindings/lib/scoped_interface_endpoint_handle.h |
| +++ b/mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h |
| @@ -2,8 +2,8 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_SCOPED_INTERFACE_ENDPOINT_HANDLE_H_ |
| -#define MOJO_PUBLIC_CPP_BINDINGS_LIB_SCOPED_INTERFACE_ENDPOINT_HANDLE_H_ |
| +#ifndef MOJO_PUBLIC_CPP_BINDINGS_SCOPED_INTERFACE_ENDPOINT_HANDLE_H_ |
| +#define MOJO_PUBLIC_CPP_BINDINGS_SCOPED_INTERFACE_ENDPOINT_HANDLE_H_ |
| #include "base/macros.h" |
| #include "base/memory/ref_counted.h" |
| @@ -11,9 +11,10 @@ |
| #include "mojo/public/cpp/bindings/lib/interface_id.h" |
| namespace mojo { |
| -namespace internal { |
| +namespace internal { |
| class MultiplexRouter; |
| +} |
| // ScopedInterfaceEndpointHandle refers to one end of an interface, either the |
| // implementation side or the client side. |
| @@ -28,9 +29,10 @@ class ScopedInterfaceEndpointHandle { |
| // |id| is the corresponding interface ID. |
| // If |is_local| is false, this handle is meant to be passed over |router| to |
| // the remote side. |
| - ScopedInterfaceEndpointHandle(InterfaceId id, |
| - bool is_local, |
| - scoped_refptr<MultiplexRouter> router); |
| + ScopedInterfaceEndpointHandle( |
|
yzshen1
2016/05/17 21:50:48
Does it make sense to make this private and Multip
Ken Rockot(use gerrit already)
2016/05/17 22:35:04
Done
|
| + internal::InterfaceId id, |
| + bool is_local, |
| + scoped_refptr<internal::MultiplexRouter> router); |
| ScopedInterfaceEndpointHandle(ScopedInterfaceEndpointHandle&& other); |
| @@ -39,25 +41,28 @@ class ScopedInterfaceEndpointHandle { |
| ScopedInterfaceEndpointHandle& operator=( |
| ScopedInterfaceEndpointHandle&& other); |
| - bool is_valid() const { return IsValidInterfaceId(id_); } |
| + bool is_valid() const { return internal::IsValidInterfaceId(id_); } |
| - InterfaceId id() const { return id_; } |
| bool is_local() const { return is_local_; } |
| - MultiplexRouter* router() const { return router_.get(); } |
| void reset(); |
| void swap(ScopedInterfaceEndpointHandle& other); |
| + // DO NOT USE METHODS BELOW THIS LINE. These are for internal use and testing. |
| + |
| + internal::InterfaceId id() const { return id_; } |
| + |
| + internal::MultiplexRouter* router() const { return router_.get(); } |
| + |
| // Releases the handle without closing it. |
| - InterfaceId release(); |
| + internal::InterfaceId release(); |
| private: |
| - InterfaceId id_; |
| + internal::InterfaceId id_; |
| bool is_local_; |
| - scoped_refptr<MultiplexRouter> router_; |
| + scoped_refptr<internal::MultiplexRouter> router_; |
| }; |
| -} // namespace internal |
| } // namespace mojo |
| -#endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_SCOPED_INTERFACE_ENDPOINT_HANDLE_H_ |
| +#endif // MOJO_PUBLIC_CPP_BINDINGS_SCOPED_INTERFACE_ENDPOINT_HANDLE_H_ |