Index: mojo/edk/system/dispatcher.cc |
diff --git a/mojo/edk/system/dispatcher.cc b/mojo/edk/system/dispatcher.cc |
index d475ef6fa0da4bafbe49c5bd4de930f24544c419..2db7ed06d3914405a1331416f445a66a64ebe9b5 100644 |
--- a/mojo/edk/system/dispatcher.cc |
+++ b/mojo/edk/system/dispatcher.cc |
@@ -15,15 +15,38 @@ |
namespace mojo { |
namespace edk { |
+Dispatcher::RequestContext::RequestContext() {} |
+ |
+Dispatcher::RequestContext::~RequestContext() { |
+ for (const auto& finalizer : finalizers_.container()) |
+ finalizer.Run(); |
+} |
+ |
+void Dispatcher::RequestContext::AddFinalizer(const base::Closure& callback) { |
+ finalizers_->push_back(callback); |
+} |
+ |
Dispatcher::DispatcherInTransit::DispatcherInTransit() {} |
Dispatcher::DispatcherInTransit::~DispatcherInTransit() {} |
+MojoResult Dispatcher::Watch(MojoHandleSignals signals, |
+ const WatchCallback& callback, |
+ uintptr_t context, |
+ RequestContext* request_context) { |
+ return MOJO_RESULT_INVALID_ARGUMENT; |
+} |
+ |
+MojoResult Dispatcher::CancelWatch(uintptr_t context) { |
+ return MOJO_RESULT_INVALID_ARGUMENT; |
+} |
+ |
MojoResult Dispatcher::WriteMessage(const void* bytes, |
uint32_t num_bytes, |
const DispatcherInTransit* dispatchers, |
uint32_t num_dispatchers, |
- MojoWriteMessageFlags flags) { |
+ MojoWriteMessageFlags flags, |
+ RequestContext* request_context) { |
return MOJO_RESULT_INVALID_ARGUMENT; |
} |
@@ -31,7 +54,8 @@ MojoResult Dispatcher::ReadMessage(void* bytes, |
uint32_t* num_bytes, |
MojoHandle* handles, |
uint32_t* num_handles, |
- MojoReadMessageFlags flags) { |
+ MojoReadMessageFlags flags, |
+ RequestContext* request_context) { |
return MOJO_RESULT_INVALID_ARGUMENT; |
} |
@@ -131,11 +155,11 @@ bool Dispatcher::EndSerialize(void* destination, |
return true; |
} |
-bool Dispatcher::BeginTransit() { return true; } |
+bool Dispatcher::BeginTransit(RequestContext* request_context) { return true; } |
-void Dispatcher::CompleteTransitAndClose() {} |
+void Dispatcher::CompleteTransitAndClose(RequestContext* request_context) {} |
-void Dispatcher::CancelTransit() {} |
+void Dispatcher::CancelTransit(RequestContext* request_context) {} |
// static |
scoped_refptr<Dispatcher> Dispatcher::Deserialize( |