Index: services/shell/public/cpp/lib/interface_provider.cc |
diff --git a/services/shell/public/cpp/lib/interface_provider.cc b/services/shell/public/cpp/lib/interface_provider.cc |
index 6636444312992bb9b918ca02b81582c7edec688c..209d356ac476bb6a79d8cfc51f389500c8b297b7 100644 |
--- a/services/shell/public/cpp/lib/interface_provider.cc |
+++ b/services/shell/public/cpp/lib/interface_provider.cc |
@@ -6,12 +6,17 @@ |
namespace shell { |
-InterfaceProvider::InterfaceProvider( |
- mojom::InterfaceProviderPtr interface_provider) |
- : interface_provider_(std::move(interface_provider)), |
- weak_factory_(this) {} |
+InterfaceProvider::InterfaceProvider() : weak_factory_(this) { |
+ pending_request_ = GetProxy(&interface_provider_); |
+} |
InterfaceProvider::~InterfaceProvider() {} |
+void InterfaceProvider::Bind(mojom::InterfaceProviderPtr interface_provider) { |
+ DCHECK(pending_request_.is_pending()); |
+ mojo::FuseInterface(std::move(pending_request_), |
+ interface_provider.PassInterface()); |
+} |
+ |
void InterfaceProvider::SetConnectionLostClosure( |
const base::Closure& connection_lost_closure) { |
interface_provider_.set_connection_error_handler(connection_lost_closure); |