| Index: third_party/mojo/src/mojo/edk/system/dispatcher.h
|
| diff --git a/third_party/mojo/src/mojo/edk/system/dispatcher.h b/third_party/mojo/src/mojo/edk/system/dispatcher.h
|
| index c069269b1a2bee1aae2eb5c94e2a20ce2857a2a6..a15bed197525ae1d6eb10c148188f0e52a4760b8 100644
|
| --- a/third_party/mojo/src/mojo/edk/system/dispatcher.h
|
| +++ b/third_party/mojo/src/mojo/edk/system/dispatcher.h
|
| @@ -10,6 +10,7 @@
|
|
|
| #include <vector>
|
|
|
| +#include "base/callback.h"
|
| #include "base/macros.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/scoped_ptr.h"
|
| @@ -42,6 +43,8 @@ class TransportData;
|
| class Awakable;
|
|
|
| typedef std::vector<scoped_refptr<Dispatcher>> DispatcherVector;
|
| +typedef base::Callback<bool(const void* bytes, uint32_t num_bytes)>
|
| + AsyncMessageCallback;
|
|
|
| namespace test {
|
|
|
| @@ -152,6 +155,8 @@ class MOJO_SYSTEM_IMPL_EXPORT Dispatcher
|
| // |*signals_state| will be set to the current handle signals state.
|
| void RemoveAwakable(Awakable* awakable, HandleSignalsState* signals_state);
|
|
|
| + MojoResult SetAsyncMessageCallback(const AsyncMessageCallback& callback);
|
| +
|
| // A dispatcher must be put into a special state in order to be sent across a
|
| // message pipe. Outside of tests, only |HandleTableAccess| is allowed to do
|
| // this, since there are requirements on the handle table (see below).
|
| @@ -274,6 +279,9 @@ class MOJO_SYSTEM_IMPL_EXPORT Dispatcher
|
| virtual void RemoveAwakableImplNoLock(Awakable* awakable,
|
| HandleSignalsState* signals_state);
|
|
|
| + virtual MojoResult SetAsyncMessageCallbackImplNoLock(
|
| + const AsyncMessageCallback& callback);
|
| +
|
| // These implement the API used to serialize dispatchers to a |Channel|
|
| // (described below). They will only be called on a dispatcher that's attached
|
| // to and "owned" by a |MessageInTransit|. See the non-"impl" versions for
|
|
|