Index: mojo/public/cpp/bindings/binding.h |
diff --git a/mojo/public/cpp/bindings/binding.h b/mojo/public/cpp/bindings/binding.h |
index 781f3f34a83a968bbc6838ad05caa7c1e24dd79a..179c1b975d9a4a64708fb6923f0ccf6ece2fb5ba 100644 |
--- a/mojo/public/cpp/bindings/binding.h |
+++ b/mojo/public/cpp/bindings/binding.h |
@@ -111,6 +111,14 @@ class Binding { |
// implementation unbound. |
~Binding() {} |
+ // Returns an InterfacePtr bound to one end of a pipe whose other end is |
+ // bound to |this|. |
+ InterfacePtr<Interface> CreateInterfacePtrAndBind() { |
+ InterfacePtr<Interface> interface_ptr; |
+ Bind(&interface_ptr); |
+ return interface_ptr; |
+ } |
+ |
// Completes a binding that was constructed with only an interface |
// implementation. Takes ownership of |handle| and binds it to the previously |
// specified implementation. See class comment for definition of |waiter|. |