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

Unified Diff: mojo/public/bindings/lib/bindings_support.h

Issue 69283002: Revert "Mojo: Add BindingsSupportImpl on top of HandleWatcher" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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/mojo.gyp ('k') | mojo/public/bindings/lib/connector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/bindings/lib/bindings_support.h
diff --git a/mojo/public/bindings/lib/bindings_support.h b/mojo/public/bindings/lib/bindings_support.h
index a1979f648c036663250fc4221969d409ba8f9904..15aa65b98bd194e52de31af00b262da458e177d4 100644
--- a/mojo/public/bindings/lib/bindings_support.h
+++ b/mojo/public/bindings/lib/bindings_support.h
@@ -15,30 +15,22 @@ class BindingsSupport {
public:
class AsyncWaitCallback {
public:
- virtual ~AsyncWaitCallback() {}
virtual void OnHandleReady(MojoResult result) = 0;
};
- typedef void* AsyncWaitID;
+ // Asynchronously call MojoWait on a background thread, and return the result
+ // to the current thread via the given AsyncWaitCallback.
+ virtual bool AsyncWait(Handle handle,
+ MojoWaitFlags flags,
+ MojoDeadline deadline,
+ AsyncWaitCallback* callback) = 0;
+
+ // Cancel an existing call to AsyncWait with the given callback. The
+ // callback's OnHandleReady method should not be called in this case.
+ virtual void CancelWait(AsyncWaitCallback* callback) = 0;
static void Set(BindingsSupport* support);
static BindingsSupport* Get();
-
- // Asynchronously call MojoWait on a background thread, and pass the result
- // of MojoWait to the given AsyncWaitCallback on the current thread. Returns
- // an AsyncWaitID that can be used with CancelWait to stop waiting. This
- // identifier becomes invalid once the callback runs.
- virtual AsyncWaitID AsyncWait(Handle handle,
- MojoWaitFlags flags,
- AsyncWaitCallback* callback) = 0;
-
- // Cancel an existing call to AsyncWait with the given AsyncWaitID. The
- // corresponding AsyncWaitCallback's OnHandleReady method will not be called
- // in this case.
- virtual void CancelWait(AsyncWaitID id) = 0;
-
- protected:
- virtual ~BindingsSupport() {}
};
} // namespace mojo
« no previous file with comments | « mojo/mojo.gyp ('k') | mojo/public/bindings/lib/connector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698