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

Side by Side Diff: mojo/public/cpp/bindings/lib/interface_endpoint_client.cc

Issue 2173753002: Revert of Support early associated interface binding on ChannelMojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@explicit-channel-ipc-task-runner
Patch Set: Created 4 years, 5 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
« no previous file with comments | « ipc/ipc_mojo_bootstrap_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "mojo/public/cpp/bindings/interface_endpoint_client.h" 5 #include "mojo/public/cpp/bindings/interface_endpoint_client.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 152
153 controller_ = handle_.group_controller()->AttachEndpointClient( 153 controller_ = handle_.group_controller()->AttachEndpointClient(
154 handle_, this, task_runner_); 154 handle_, this, task_runner_);
155 if (expect_sync_requests) 155 if (expect_sync_requests)
156 controller_->AllowWokenUpBySyncWatchOnSameThread(); 156 controller_->AllowWokenUpBySyncWatchOnSameThread();
157 } 157 }
158 158
159 InterfaceEndpointClient::~InterfaceEndpointClient() { 159 InterfaceEndpointClient::~InterfaceEndpointClient() {
160 DCHECK(thread_checker_.CalledOnValidThread()); 160 DCHECK(thread_checker_.CalledOnValidThread());
161 161
162 if (handle_.is_valid()) 162 handle_.group_controller()->DetachEndpointClient(handle_);
163 handle_.group_controller()->DetachEndpointClient(handle_);
164 } 163 }
165 164
166 AssociatedGroup* InterfaceEndpointClient::associated_group() { 165 AssociatedGroup* InterfaceEndpointClient::associated_group() {
167 if (!associated_group_) 166 if (!associated_group_)
168 associated_group_ = handle_.group_controller()->CreateAssociatedGroup(); 167 associated_group_ = handle_.group_controller()->CreateAssociatedGroup();
169 return associated_group_.get(); 168 return associated_group_.get();
170 } 169 }
171 170
172 uint32_t InterfaceEndpointClient::interface_id() const { 171 uint32_t InterfaceEndpointClient::interface_id() const {
173 DCHECK(thread_checker_.CalledOnValidThread()); 172 DCHECK(thread_checker_.CalledOnValidThread());
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 return responder->Accept(message); 305 return responder->Accept(message);
307 } else { 306 } else {
308 if (!incoming_receiver_) 307 if (!incoming_receiver_)
309 return false; 308 return false;
310 309
311 return incoming_receiver_->Accept(message); 310 return incoming_receiver_->Accept(message);
312 } 311 }
313 } 312 }
314 313
315 } // namespace mojo 314 } // namespace mojo
OLDNEW
« no previous file with comments | « ipc/ipc_mojo_bootstrap_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698