| Index: mojo/public/cpp/system/watcher.h
|
| diff --git a/mojo/public/cpp/system/watcher.h b/mojo/public/cpp/system/watcher.h
|
| index cd068aad0b4a6adec6331980aab7dbebc14497d0..f18ae4a006a6d71173bd70d17c0b3985fc804d36 100644
|
| --- a/mojo/public/cpp/system/watcher.h
|
| +++ b/mojo/public/cpp/system/watcher.h
|
| @@ -48,6 +48,11 @@ class Watcher {
|
| // still active.
|
| ~Watcher();
|
|
|
| + // Allows the watcher to dispatch notifications synchronously if notified on
|
| + // its own thread. This should be used with caution since it means watched
|
| + // endpoints may reenter each other.
|
| + void EnableImmediateDispatchOfEventsFromSameThread(bool enabled);
|
| +
|
| // Indicates if the Watcher is currently watching a handle.
|
| bool IsWatching() const;
|
|
|
| @@ -107,6 +112,8 @@ class Watcher {
|
| // The callback to call when the handle is signaled.
|
| ReadyCallback callback_;
|
|
|
| + bool sync_dispatch_enabled_ = false;
|
| +
|
| base::WeakPtrFactory<Watcher> weak_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(Watcher);
|
|
|