Index: mojo/edk/system/core.cc |
diff --git a/mojo/edk/system/core.cc b/mojo/edk/system/core.cc |
index a5e432b8a749f3a2ddc937bcf5a86f392db1baa6..4240bc81d340756c155ccc65ed4e912c90a21157 100644 |
--- a/mojo/edk/system/core.cc |
+++ b/mojo/edk/system/core.cc |
@@ -427,24 +427,32 @@ MojoResult Core::WaitMany(const MojoHandle* handles, |
return rv; |
} |
-MojoResult Core::Watch(MojoHandle handle, |
- MojoHandleSignals signals, |
- MojoWatchCallback callback, |
- uintptr_t context) { |
+MojoResult Core::RegisterWatcher(MojoHandle handle, |
+ MojoHandleSignals signals, |
+ MojoWatchCallback callback, |
+ uintptr_t context) { |
RequestContext request_context; |
scoped_refptr<Dispatcher> dispatcher = GetDispatcher(handle); |
if (!dispatcher) |
return MOJO_RESULT_INVALID_ARGUMENT; |
- return dispatcher->Watch( |
+ return dispatcher->RegisterWatcher( |
signals, base::Bind(&CallWatchCallback, callback, context), context); |
} |
-MojoResult Core::CancelWatch(MojoHandle handle, uintptr_t context) { |
+MojoResult Core::ArmWatcher(MojoHandle handle, uintptr_t context) { |
RequestContext request_context; |
scoped_refptr<Dispatcher> dispatcher = GetDispatcher(handle); |
if (!dispatcher) |
return MOJO_RESULT_INVALID_ARGUMENT; |
- return dispatcher->CancelWatch(context); |
+ return dispatcher->ArmWatcher(context); |
+} |
+ |
+MojoResult Core::UnregisterWatcher(MojoHandle handle, uintptr_t context) { |
+ RequestContext request_context; |
+ scoped_refptr<Dispatcher> dispatcher = GetDispatcher(handle); |
+ if (!dispatcher) |
+ return MOJO_RESULT_INVALID_ARGUMENT; |
+ return dispatcher->UnregisterWatcher(context); |
} |
MojoResult Core::AllocMessage(uint32_t num_bytes, |