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" |
11 #include "content/common/child.mojom.h" | 11 #include "content/common/child.mojom.h" |
12 #include "content/public/common/service_manager_connection.h" | 12 #include "content/public/common/service_manager_connection.h" |
13 #include "mojo/edk/embedder/embedder.h" | 13 #include "mojo/edk/embedder/embedder.h" |
14 #include "mojo/public/cpp/system/message_pipe.h" | 14 #include "mojo/public/cpp/system/message_pipe.h" |
15 #include "services/service_manager/public/cpp/connector.h" | 15 #include "services/service_manager/public/cpp/connector.h" |
16 #include "services/service_manager/public/cpp/identity.h" | 16 #include "services/service_manager/public/cpp/identity.h" |
17 #include "services/service_manager/public/cpp/interface_registry.h" | |
18 #include "services/service_manager/public/interfaces/service.mojom.h" | 17 #include "services/service_manager/public/interfaces/service.mojom.h" |
19 | 18 |
20 namespace content { | 19 namespace content { |
21 | 20 |
22 class ChildConnection::IOThreadContext | 21 class ChildConnection::IOThreadContext |
23 : public base::RefCountedThreadSafe<IOThreadContext> { | 22 : public base::RefCountedThreadSafe<IOThreadContext> { |
24 public: | 23 public: |
25 IOThreadContext() {} | 24 IOThreadContext() {} |
26 | 25 |
27 void Initialize(const service_manager::Identity& child_identity, | 26 void Initialize(const service_manager::Identity& child_identity, |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 mojo::ScopedMessagePipeHandle interface_pipe) { | 139 mojo::ScopedMessagePipeHandle interface_pipe) { |
141 context_->BindInterface(interface_name, std::move(interface_pipe)); | 140 context_->BindInterface(interface_name, std::move(interface_pipe)); |
142 } | 141 } |
143 | 142 |
144 void ChildConnection::SetProcessHandle(base::ProcessHandle handle) { | 143 void ChildConnection::SetProcessHandle(base::ProcessHandle handle) { |
145 process_handle_ = handle; | 144 process_handle_ = handle; |
146 context_->SetProcessHandle(handle); | 145 context_->SetProcessHandle(handle); |
147 } | 146 } |
148 | 147 |
149 } // namespace content | 148 } // namespace content |
OLD | NEW |