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

Unified Diff: mojo/edk/js/waiting_callback.h

Issue 1722543003: Mojo bindings environment: remove usage in mojo/edk/js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/edk/js/test/run_js_tests.cc ('k') | mojo/edk/js/waiting_callback.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « mojo/edk/js/test/run_js_tests.cc ('k') | mojo/edk/js/waiting_callback.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698