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

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: address comments 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..01a13bafb28e77696d4b0e8578b85d6f9811fb05 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