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

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: nuke std::move 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..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|.
« 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