Index: mojo/public/cpp/bindings/binding.h |
diff --git a/mojo/public/cpp/bindings/binding.h b/mojo/public/cpp/bindings/binding.h |
index 09cdb88e77b4ebb4b6d3063b95df0a4b2d6ba7ff..c49b073bed2ed0c304c7fcb6b3c8e2ccec6451d6 100644 |
--- a/mojo/public/cpp/bindings/binding.h |
+++ b/mojo/public/cpp/bindings/binding.h |
@@ -59,6 +59,8 @@ class AssociatedGroup; |
template <typename Interface> |
class Binding { |
public: |
+ using GenericInterface_ = typename Interface::GenericInterface_; |
+ |
// Constructs an incomplete binding that will use the implementation |impl|. |
// The binding may be completed with a subsequent call to the |Bind| method. |
// Does not take ownership of |impl|, which must outlive the binding. |
@@ -81,7 +83,7 @@ class Binding { |
// last until the constructor returns. See class comment for definition of |
// |waiter|. |
Binding(Interface* impl, |
- InterfacePtr<Interface>* ptr, |
+ InterfacePtr<GenericInterface_>* ptr, |
const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter()) |
: Binding(impl) { |
Bind(ptr, waiter); |
@@ -92,7 +94,7 @@ class Binding { |
// |impl|, which must outlive the binding. See class comment for definition of |
// |waiter|. |
Binding(Interface* impl, |
- InterfaceRequest<Interface> request, |
+ InterfaceRequest<GenericInterface_> request, |
const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter()) |
: Binding(impl) { |
Bind(request.PassMessagePipe(), waiter); |
@@ -118,7 +120,7 @@ class Binding { |
// eventual client of the service. Does not take ownership of |ptr|. See |
// class comment for definition of |waiter|. |
void Bind( |
- InterfacePtr<Interface>* ptr, |
+ InterfacePtr<GenericInterface_>* ptr, |
const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter()) { |
MessagePipe pipe; |
ptr->Bind( |
@@ -132,7 +134,7 @@ class Binding { |
// binding it to the previously specified implementation. See class comment |
// for definition of |waiter|. |
void Bind( |
- InterfaceRequest<Interface> request, |
+ InterfaceRequest<GenericInterface_> request, |
const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter()) { |
Bind(request.PassMessagePipe(), waiter); |
} |
@@ -186,7 +188,7 @@ class Binding { |
// on to associated interface endpoint handles at both sides of the |
// message pipe in order to call this method. We need a way to forcefully |
// invalidate associated interface endpoint handles. |
- InterfaceRequest<Interface> Unbind() { |
+ InterfaceRequest<GenericInterface_> Unbind() { |
CHECK(!HasAssociatedInterfaces()); |
return internal_state_.Unbind(); |
} |