Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(607)

Side by Side Diff: content/common/service_manager/child_connection.cc

Issue 2592623002: mojo:: Introduce InterfaceRequest ctor that takes in InterfacePtr* (Closed)
Patch Set: Minor fix Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 virtual ~IOThreadContext() {} 85 virtual ~IOThreadContext() {}
86 86
87 void InitializeOnIOThread( 87 void InitializeOnIOThread(
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 mojo::MakeRequest(&pid_receiver_); 95 &pid_receiver_);
96 96
97 service_manager::Connector::ConnectParams params(child_identity); 97 service_manager::Connector::ConnectParams params(child_identity);
98 params.set_client_process_connection(std::move(service), 98 params.set_client_process_connection(std::move(service),
99 std::move(pid_receiver_request)); 99 std::move(pid_receiver_request));
100 100
101 // In some unit testing scenarios a null connector is passed. 101 // In some unit testing scenarios a null connector is passed.
102 if (connector) 102 if (connector)
103 connection_ = connector->Connect(&params); 103 connection_ = connector->Connect(&params);
104 } 104 }
105 105
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 146
147 ChildConnection::~ChildConnection() { 147 ChildConnection::~ChildConnection() {
148 context_->ShutDown(); 148 context_->ShutDown();
149 } 149 }
150 150
151 void ChildConnection::SetProcessHandle(base::ProcessHandle handle) { 151 void ChildConnection::SetProcessHandle(base::ProcessHandle handle) {
152 context_->SetProcessHandle(handle); 152 context_->SetProcessHandle(handle);
153 } 153 }
154 154
155 } // namespace content 155 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698