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

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: merge 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..2e93e3032b7fc34721ec0818062b5868c295d539 100644
--- a/mojo/public/cpp/bindings/interface_request.h
+++ b/mojo/public/cpp/bindings/interface_request.h
@@ -107,10 +107,13 @@ 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());
+ ptr->Bind(InterfacePtrInfo<typename Interface::GenericInterface>(
+ pipe.handle0.Pass(), 0u));
+ return MakeRequest<typename Interface::GenericInterface>(
+ pipe.handle1.Pass());
}
} // namespace mojo
« no previous file with comments | « mojo/public/cpp/bindings/interface_ptr.h ('k') | mojo/public/cpp/bindings/lib/associated_interface_ptr_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698