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

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

Issue 2664483002: Support sync mojo IPCs to and from bindings running on a sequence.
Patch Set: Created 3 years, 10 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.cc ('k') | mojo/public/cpp/bindings/lib/sync_handle_registry.cc » ('j') | 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/lib/multiplex_router.h" 5 #include "mojo/public/cpp/bindings/lib/multiplex_router.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 std::move(runner)), 306 std::move(runner)),
307 lock_(config == MULTI_INTERFACE ? new base::Lock : nullptr), 307 lock_(config == MULTI_INTERFACE ? new base::Lock : nullptr),
308 control_message_handler_(this), 308 control_message_handler_(this),
309 control_message_proxy_(&connector_), 309 control_message_proxy_(&connector_),
310 next_interface_id_value_(1), 310 next_interface_id_value_(1),
311 posted_to_process_tasks_(false), 311 posted_to_process_tasks_(false),
312 encountered_error_(false), 312 encountered_error_(false),
313 paused_(false), 313 paused_(false),
314 testing_mode_(false) { 314 testing_mode_(false) {
315 DCHECK(task_runner_->RunsTasksOnCurrentThread()); 315 DCHECK(task_runner_->RunsTasksOnCurrentThread());
316 DCHECK(config == SINGLE_INTERFACE || base::ThreadTaskRunnerHandle::IsSet());
317 316
318 if (config == SINGLE_INTERFACE_WITH_SYNC_METHODS || 317 if (config == SINGLE_INTERFACE_WITH_SYNC_METHODS ||
319 config == MULTI_INTERFACE) { 318 config == MULTI_INTERFACE) {
320 // Always participate in sync handle watching in multi-interface mode, 319 // Always participate in sync handle watching in multi-interface mode,
321 // because even if it doesn't expect sync requests during sync handle 320 // because even if it doesn't expect sync requests during sync handle
322 // watching, it may still need to dispatch messages to associated endpoints 321 // watching, it may still need to dispatch messages to associated endpoints
323 // on a different thread. 322 // on a different thread.
324 connector_.AllowWokenUpBySyncWatchOnSameThread(); 323 connector_.AllowWokenUpBySyncWatchOnSameThread();
325 } 324 }
326 connector_.set_incoming_receiver(&filters_); 325 connector_.set_incoming_receiver(&filters_);
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
937 936
938 void MultiplexRouter::AssertLockAcquired() { 937 void MultiplexRouter::AssertLockAcquired() {
939 #if DCHECK_IS_ON() 938 #if DCHECK_IS_ON()
940 if (lock_) 939 if (lock_)
941 lock_->AssertAcquired(); 940 lock_->AssertAcquired();
942 #endif 941 #endif
943 } 942 }
944 943
945 } // namespace internal 944 } // namespace internal
946 } // namespace mojo 945 } // namespace mojo
OLDNEW
« no previous file with comments | « ipc/ipc_mojo_bootstrap.cc ('k') | mojo/public/cpp/bindings/lib/sync_handle_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698