Index: third_party/WebKit/Source/core/mojo/MojoWatcher.h |
diff --git a/third_party/WebKit/Source/core/mojo/MojoWatcher.h b/third_party/WebKit/Source/core/mojo/MojoWatcher.h |
index fe6e193d1a500872e08a14d49aeb186f3813b5a2..ece74d5ccac5c23632123e719a2e2402566d24c4 100644 |
--- a/third_party/WebKit/Source/core/mojo/MojoWatcher.h |
+++ b/third_party/WebKit/Source/core/mojo/MojoWatcher.h |
@@ -10,6 +10,7 @@ |
#include "bindings/core/v8/TraceWrapperMember.h" |
#include "core/dom/ContextLifecycleObserver.h" |
#include "mojo/public/cpp/system/handle.h" |
+#include "mojo/public/cpp/system/watcher.h" |
namespace blink { |
@@ -47,16 +48,21 @@ class MojoWatcher final : public GarbageCollectedFinalized<MojoWatcher>, |
MojoWatcher(ExecutionContext*, MojoWatchCallback*); |
MojoResult watch(mojo::Handle, const MojoHandleSignals&); |
+ MojoResult arm(MojoResult* readyResult); |
static void onHandleReady(uintptr_t context, |
MojoResult, |
MojoHandleSignalsState, |
- MojoWatchNotificationFlags); |
+ MojoWatcherNotificationFlags); |
void runReadyCallback(MojoResult); |
RefPtr<WebTaskRunner> m_taskRunner; |
TraceWrapperMember<MojoWatchCallback> m_callback; |
+ mojo::ScopedWatcherHandle m_watcherHandle; |
mojo::Handle m_handle; |
+ |
+ // Cross-thread reference to self, used as the watch context. |
+ std::unique_ptr<CrossThreadPersistent<MojoWatcher>> m_context; |
}; |
} // namespace blink |