Index: mojo/edk/js/waiting_callback.h |
diff --git a/mojo/edk/js/waiting_callback.h b/mojo/edk/js/waiting_callback.h |
index b11fcc39d56315087cd91a1ba3039e29ff5156eb..f2554bc293ac3b7e360c97d0d5834d9b7421ecea 100644 |
--- a/mojo/edk/js/waiting_callback.h |
+++ b/mojo/edk/js/waiting_callback.h |
@@ -12,7 +12,7 @@ |
#include "gin/wrappable.h" |
#include "mojo/edk/js/handle.h" |
#include "mojo/edk/js/handle_close_observer.h" |
-#include "mojo/public/c/environment/async_waiter.h" |
+#include "mojo/message_pump/handle_watcher.h" |
#include "mojo/public/cpp/system/core.h" |
namespace mojo { |
@@ -42,21 +42,19 @@ class WaitingCallback : public gin::Wrappable<WaitingCallback>, |
gin::Handle<HandleWrapper> handle_wrapper); |
~WaitingCallback() override; |
- // Callback from MojoAsyncWaiter. |closure| is the WaitingCallback. |
- static void CallOnHandleReady(void* closure, MojoResult result); |
- |
- // Invoked from CallOnHandleReady() (CallOnHandleReady() must be static). |
+ // Callback from common::HandleWatcher. |
void OnHandleReady(MojoResult result); |
// Invoked by the HandleWrapper if the handle is closed while this wait is |
// still in progress. |
void OnWillCloseHandle() override; |
- void ClearWaitId(); |
+ void RemoveHandleCloseObserver(); |
void CallCallback(MojoResult result); |
base::WeakPtr<gin::Runner> runner_; |
- MojoAsyncWaitID wait_id_; |
+ |
+ common::HandleWatcher handle_watcher_; |
HandleWrapper* handle_wrapper_; |
base::WeakPtrFactory<WaitingCallback> weak_factory_; |