Index: third_party/mojo/src/mojo/public/cpp/bindings/binding.h |
diff --git a/third_party/mojo/src/mojo/public/cpp/bindings/binding.h b/third_party/mojo/src/mojo/public/cpp/bindings/binding.h |
index 658b6a07cd052a2a60a7450b80fa89cac4dd1b06..7b663c435232f6e0f214a823de824ed96389a6b1 100644 |
--- a/third_party/mojo/src/mojo/public/cpp/bindings/binding.h |
+++ b/third_party/mojo/src/mojo/public/cpp/bindings/binding.h |
@@ -165,6 +165,13 @@ class Binding : public ErrorHandler { |
internal_router_->CloseMessagePipe(); |
} |
+ // Unbinds the underlying pipe from this binding and returns it so it can be |
+ // used in another context, such as on another thread or with a different |
+ // implementation. |
+ InterfaceRequest<Interface> Unbind() { |
+ return MakeRequest<Interface>(internal_router_->PassMessagePipe()); |
+ } |
+ |
// Sets an error handler that will be called if a connection error occurs on |
// the bound message pipe. |
void set_error_handler(ErrorHandler* error_handler) { |