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

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

Issue 1682113003: Mojo C++ bindings: Generate InterfaceHandle<> instead of InterfacePtr<>. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: delay InterfacePtr::Create() until you actually need an InterfacePtr. GetProxy() and ConnectToAppl… Created 4 years, 10 months 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 515fe88b70b9eabaac82f386dd1731be072fcac4..1160b0e0d6cb1ef53f92d19247be0f35ce4c1c64 100644
--- a/mojo/public/cpp/bindings/interface_request.h
+++ b/mojo/public/cpp/bindings/interface_request.h
@@ -122,6 +122,13 @@ InterfaceRequest<Interface> GetProxy(InterfacePtr<Interface>* ptr) {
return MakeRequest<Interface>(pipe.handle1.Pass());
}
+template <typename Interface>
viettrungluu 2016/02/11 18:26:29 Could probably use a comment.
vardhan 2016/02/11 22:47:53 Done.
+InterfaceRequest<Interface> GetProxy(InterfaceHandle<Interface>* ptr) {
+ MessagePipe pipe;
+ *ptr = InterfaceHandle<Interface>(pipe.handle0.Pass(), 0u);
+ return MakeRequest<Interface>(pipe.handle1.Pass());
+}
+
} // namespace mojo
#endif // MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_REQUEST_H_

Powered by Google App Engine
This is Rietveld 408576698