Index: mojo/public/cpp/bindings/lib/binding_state.h |
diff --git a/mojo/public/cpp/bindings/lib/binding_state.h b/mojo/public/cpp/bindings/lib/binding_state.h |
index 82b1a327b21a13d318f9bf82d3de6e4c473472d0..dea3a6b906724d09d20666dc4e5822a5b00e0580 100644 |
--- a/mojo/public/cpp/bindings/lib/binding_state.h |
+++ b/mojo/public/cpp/bindings/lib/binding_state.h |
@@ -37,6 +37,8 @@ class BindingState; |
template <typename Interface> |
class BindingState<Interface, false> { |
public: |
+ using GenericInterface = typename Interface::GenericInterface; |
+ |
explicit BindingState(Interface* impl) : impl_(impl) { |
stub_.set_sink(impl_); |
} |
@@ -81,9 +83,9 @@ class BindingState<Interface, false> { |
DestroyRouter(); |
} |
- InterfaceRequest<Interface> Unbind() { |
- InterfaceRequest<Interface> request = |
- MakeRequest<Interface>(router_->PassMessagePipe()); |
+ InterfaceRequest<GenericInterface> Unbind() { |
+ InterfaceRequest<GenericInterface> request = |
+ MakeRequest<GenericInterface>(router_->PassMessagePipe()); |
DestroyRouter(); |
return request.Pass(); |
} |
@@ -128,6 +130,8 @@ class BindingState<Interface, false> { |
template <typename Interface> |
class BindingState<Interface, true> { |
public: |
+ using GenericInterface = typename Interface::GenericInterface; |
+ |
explicit BindingState(Interface* impl) : impl_(impl) { |
stub_.set_sink(impl_); |
} |
@@ -177,10 +181,10 @@ class BindingState<Interface, true> { |
router_ = nullptr; |
} |
- InterfaceRequest<Interface> Unbind() { |
+ InterfaceRequest<GenericInterface> Unbind() { |
endpoint_client_.reset(); |
- InterfaceRequest<Interface> request = |
- MakeRequest<Interface>(router_->PassMessagePipe()); |
+ InterfaceRequest<GenericInterface> request = |
+ MakeRequest<GenericInterface>(router_->PassMessagePipe()); |
router_ = nullptr; |
return request.Pass(); |
} |