| Index: mojo/public/cpp/bindings/binding.h
|
| diff --git a/mojo/public/cpp/bindings/binding.h b/mojo/public/cpp/bindings/binding.h
|
| index 68dd32239c41c3d1682c5ca12303f95bf7f16089..ea18b77fd92695d3ce24898abf1e7c2054f6fe72 100644
|
| --- a/mojo/public/cpp/bindings/binding.h
|
| +++ b/mojo/public/cpp/bindings/binding.h
|
| @@ -208,6 +208,22 @@ class Binding {
|
| return internal_state_.associated_group();
|
| }
|
|
|
| + // Allows immediate, synchronous dispatch of any incoming method call elicited
|
| + // by an event on the Binding's own thread. This is useful for efficiency when
|
| + // a Binding lives on the same thread that's running Mojo IPC Support (e.g.
|
| + // Chrome's IO thread) because there's no risk of subtle reentrancy issues in
|
| + // interface implementations.
|
| + //
|
| + // This may also be used in testing when, e.g., an InterfacePtr and Binding
|
| + // live on the same thread and you want synchronous behavior for messages that
|
| + // are asynchronous under normal conditions.
|
| + //
|
| + // Note that this option also affects all endpoints which are associated with
|
| + // this one and which live on the same thread.
|
| + void EnableImmediateDispatchOfEventsFromSameThread(bool enabled) {
|
| + internal_state_.EnableImmediateDispatchOfEventsFromSameThread(enabled);
|
| + }
|
| +
|
| // Exposed for testing, should not generally be used.
|
| void EnableTestingMode() { internal_state_.EnableTestingMode(); }
|
|
|
|
|