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

Unified Diff: mojo/public/cpp/bindings/lib/binding_state.cc

Issue 2349293002: Mojo C++ bindings: always use MultiplexRouter with InterfacePtr/Binding. (Closed)
Patch Set: . Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/cpp/bindings/lib/binding_state.h ('k') | mojo/public/cpp/bindings/lib/interface_ptr_state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/binding_state.cc
diff --git a/mojo/public/cpp/bindings/lib/binding_state.cc b/mojo/public/cpp/bindings/lib/binding_state.cc
index c9462745906f0493fdc08f8f8f22f6939a93a2c1..e41258f586c846949d461402ecda435cea4dcb25 100644
--- a/mojo/public/cpp/bindings/lib/binding_state.cc
+++ b/mojo/public/cpp/bindings/lib/binding_state.cc
@@ -141,13 +141,19 @@ void MultiplexedBindingState::BindInternal(
scoped_refptr<base::SingleThreadTaskRunner> runner,
const char* interface_name,
std::unique_ptr<MessageReceiver> request_validator,
+ bool passes_associated_kinds,
bool has_sync_methods,
MessageReceiverWithResponderStatus* stub,
uint32_t interface_version) {
DCHECK(!router_);
- router_ = new MultiplexRouter(
- std::move(handle), MultiplexRouter::MULTI_INTERFACE, false, runner);
+ MultiplexRouter::Config config =
+ passes_associated_kinds
+ ? MultiplexRouter::MULTI_INTERFACE
+ : (has_sync_methods
+ ? MultiplexRouter::SINGLE_INTERFACE_WITH_SYNC_METHODS
+ : MultiplexRouter::SINGLE_INTERFACE);
+ router_ = new MultiplexRouter(std::move(handle), config, false, runner);
router_->SetMasterInterfaceName(interface_name);
endpoint_client_.reset(new InterfaceEndpointClient(
« no previous file with comments | « mojo/public/cpp/bindings/lib/binding_state.h ('k') | mojo/public/cpp/bindings/lib/interface_ptr_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698