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

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

Issue 1524693002: [mojo] Add GenericInterface_ to interface class variants (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bindings-2-typemaps
Patch Set: Created 5 years 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/interface_request.h
diff --git a/mojo/public/cpp/bindings/interface_request.h b/mojo/public/cpp/bindings/interface_request.h
index c139306e2c8d671871c039d3960e5178bc7e546d..22ba015ff7b1d81988bea0e7f003b7d9957f94b6 100644
--- a/mojo/public/cpp/bindings/interface_request.h
+++ b/mojo/public/cpp/bindings/interface_request.h
@@ -107,10 +107,12 @@ InterfaceRequest<Interface> MakeRequest(ScopedMessagePipeHandle handle) {
// CreateSource(source_request.Pass()); // Create implementation locally.
//
template <typename Interface>
-InterfaceRequest<Interface> GetProxy(InterfacePtr<Interface>* ptr) {
+InterfaceRequest<typename Interface::GenericInterface_>
+GetProxy(InterfacePtr<Interface>* ptr) {
MessagePipe pipe;
ptr->Bind(InterfacePtrInfo<Interface>(pipe.handle0.Pass(), 0u));
- return MakeRequest<Interface>(pipe.handle1.Pass());
+ return MakeRequest<typename Interface::GenericInterface_>(
+ pipe.handle1.Pass());
}
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698