Chromium Code Reviews| 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..1c69aa321d91545c6b541a342fd89311926eb167 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() { |
|
yzshen1
2016/01/21 01:12:09
Please add a |waiter| param (just like line 127),
sky
2016/01/21 14:35:26
Do we really need the waiter param? And doesn't th
|
| + InterfacePtr<Interface> interface_ptr; |
| + Bind(&interface_ptr); |
| + return std::move(interface_ptr); |
|
yzshen1
2016/01/21 01:12:09
I think std::move() is not needed.
sky
2016/01/21 17:50:24
Done.
|
| + } |
| + |
| // 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|. |