OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "content/common/service_manager/child_connection.h" | 5 #include "content/common/service_manager/child_connection.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 const service_manager::Identity& child_identity, | 88 const service_manager::Identity& child_identity, |
89 std::unique_ptr<service_manager::Connector> connector, | 89 std::unique_ptr<service_manager::Connector> connector, |
90 mojo::ScopedMessagePipeHandle service_pipe) { | 90 mojo::ScopedMessagePipeHandle service_pipe) { |
91 service_manager::mojom::ServicePtr service; | 91 service_manager::mojom::ServicePtr service; |
92 service.Bind(mojo::InterfacePtrInfo<service_manager::mojom::Service>( | 92 service.Bind(mojo::InterfacePtrInfo<service_manager::mojom::Service>( |
93 std::move(service_pipe), 0u)); | 93 std::move(service_pipe), 0u)); |
94 service_manager::mojom::PIDReceiverRequest pid_receiver_request( | 94 service_manager::mojom::PIDReceiverRequest pid_receiver_request( |
95 &pid_receiver_); | 95 &pid_receiver_); |
96 | 96 |
97 if (connector) { | 97 if (connector) { |
98 connector->Start(child_identity, | 98 connector->StartService(child_identity, |
99 std::move(service), | 99 std::move(service), |
100 std::move(pid_receiver_request)); | 100 std::move(pid_receiver_request)); |
101 connection_ = connector->Connect(child_identity); | 101 connection_ = connector->Connect(child_identity); |
102 } | 102 } |
103 } | 103 } |
104 | 104 |
105 void ShutDownOnIOThread() { | 105 void ShutDownOnIOThread() { |
106 connection_.reset(); | 106 connection_.reset(); |
107 pid_receiver_.reset(); | 107 pid_receiver_.reset(); |
108 } | 108 } |
109 | 109 |
110 void SetProcessHandleOnIOThread(base::ProcessHandle handle) { | 110 void SetProcessHandleOnIOThread(base::ProcessHandle handle) { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 145 |
146 ChildConnection::~ChildConnection() { | 146 ChildConnection::~ChildConnection() { |
147 context_->ShutDown(); | 147 context_->ShutDown(); |
148 } | 148 } |
149 | 149 |
150 void ChildConnection::SetProcessHandle(base::ProcessHandle handle) { | 150 void ChildConnection::SetProcessHandle(base::ProcessHandle handle) { |
151 context_->SetProcessHandle(handle); | 151 context_->SetProcessHandle(handle); |
152 } | 152 } |
153 | 153 |
154 } // namespace content | 154 } // namespace content |
OLD | NEW |