| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "services/service_manager/public/cpp/lib/connector_impl.h" | 5 #include "services/service_manager/public/cpp/lib/connector_impl.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "services/service_manager/public/cpp/identity.h" | 8 #include "services/service_manager/public/cpp/identity.h" |
| 9 #include "services/service_manager/public/cpp/lib/connection_impl.h" | 9 #include "services/service_manager/public/cpp/lib/connection_impl.h" |
| 10 | 10 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 connector_->Connect(target, std::move(remote_request), | 67 connector_->Connect(target, std::move(remote_request), |
| 68 connection->GetConnectCallback()); | 68 connection->GetConnectCallback()); |
| 69 return std::move(connection); | 69 return std::move(connection); |
| 70 } | 70 } |
| 71 | 71 |
| 72 void ConnectorImpl::BindInterface( | 72 void ConnectorImpl::BindInterface( |
| 73 const Identity& target, | 73 const Identity& target, |
| 74 const std::string& interface_name, | 74 const std::string& interface_name, |
| 75 mojo::ScopedMessagePipeHandle interface_pipe) { | 75 mojo::ScopedMessagePipeHandle interface_pipe) { |
| 76 LOG(INFO) << "ConnectorImpl::BindInterface: " << interface_pipe.get().value(); |
| 76 if (!BindConnectorIfNecessary()) | 77 if (!BindConnectorIfNecessary()) |
| 77 return; | 78 return; |
| 78 | 79 |
| 79 connector_->BindInterface(target, interface_name, std::move(interface_pipe), | 80 connector_->BindInterface(target, interface_name, std::move(interface_pipe), |
| 80 base::Bind(&EmptyBindCallback)); | 81 base::Bind(&EmptyBindCallback)); |
| 81 } | 82 } |
| 82 | 83 |
| 83 std::unique_ptr<Connector> ConnectorImpl::Clone() { | 84 std::unique_ptr<Connector> ConnectorImpl::Clone() { |
| 84 if (!BindConnectorIfNecessary()) | 85 if (!BindConnectorIfNecessary()) |
| 85 return nullptr; | 86 return nullptr; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 return true; | 120 return true; |
| 120 } | 121 } |
| 121 | 122 |
| 122 std::unique_ptr<Connector> Connector::Create(mojom::ConnectorRequest* request) { | 123 std::unique_ptr<Connector> Connector::Create(mojom::ConnectorRequest* request) { |
| 123 mojom::ConnectorPtr proxy; | 124 mojom::ConnectorPtr proxy; |
| 124 *request = mojo::MakeRequest(&proxy); | 125 *request = mojo::MakeRequest(&proxy); |
| 125 return base::MakeUnique<ConnectorImpl>(proxy.PassInterface()); | 126 return base::MakeUnique<ConnectorImpl>(proxy.PassInterface()); |
| 126 } | 127 } |
| 127 | 128 |
| 128 } // namespace service_manager | 129 } // namespace service_manager |
| OLD | NEW |