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

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

Issue 1614553002: Reduce boilerplate needed to configure mojo::Binding (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 years, 11 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
« no previous file with comments | « mash/wm/accelerator_registrar_apptest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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|.
« no previous file with comments | « mash/wm/accelerator_registrar_apptest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698