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

Unified Diff: mojo/edk/system/dispatcher.h

Issue 2750373002: Revert of Mojo: Armed Watchers (Closed)
Patch Set: Created 3 years, 9 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/system/data_pipe_unittest.cc ('k') | mojo/edk/system/dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/dispatcher.h
diff --git a/mojo/edk/system/dispatcher.h b/mojo/edk/system/dispatcher.h
index 88a9de7c8509dda9969bb8bc8fe49fd4ff10aa17..9dca67fa45f800d45231cb7a3c1e1718c0261c5e 100644
--- a/mojo/edk/system/dispatcher.h
+++ b/mojo/edk/system/dispatcher.h
@@ -20,7 +20,7 @@
#include "mojo/edk/system/handle_signals_state.h"
#include "mojo/edk/system/ports/name.h"
#include "mojo/edk/system/system_impl_export.h"
-#include "mojo/edk/system/watch.h"
+#include "mojo/edk/system/watcher.h"
#include "mojo/public/c/system/buffer.h"
#include "mojo/public/c/system/data_pipe.h"
#include "mojo/public/c/system/message_pipe.h"
@@ -57,7 +57,6 @@
DATA_PIPE_CONSUMER,
SHARED_BUFFER,
WAIT_SET,
- WATCHER,
// "Private" types (not exposed via the public interface):
PLATFORM_HANDLE = -1,
@@ -68,16 +67,13 @@
virtual Type GetType() const = 0;
virtual MojoResult Close() = 0;
- ///////////// Watcher API ////////////////////
-
- virtual MojoResult WatchDispatcher(scoped_refptr<Dispatcher> dispatcher,
- MojoHandleSignals signals,
- uintptr_t context);
+ ///////////// Watch API ////////////////////
+
+ virtual MojoResult Watch(MojoHandleSignals signals,
+ const Watcher::WatchCallback& callback,
+ uintptr_t context);
+
virtual MojoResult CancelWatch(uintptr_t context);
- virtual MojoResult Arm(uint32_t* num_ready_contexts,
- uintptr_t* ready_contexts,
- MojoResult* ready_results,
- MojoHandleSignalsState* ready_signals_states);
///////////// Message pipe API /////////////
@@ -161,18 +157,6 @@
// satisfied or satisfiable.) Note: The state is subject to change from other
// threads.
virtual HandleSignalsState GetHandleSignalsState() const;
-
- // Adds a WatcherDispatcher reference to this dispatcher, to be notified of
- // all subsequent changes to handle state including signal changes or closure.
- // The reference is associated with a |context| for disambiguation of
- // removals.
- virtual MojoResult AddWatcherRef(
- const scoped_refptr<WatcherDispatcher>& watcher,
- uintptr_t context);
-
- // Removes a WatcherDispatcher reference from this dispatcher.
- virtual MojoResult RemoveWatcherRef(WatcherDispatcher* watcher,
- uintptr_t context);
// Adds an awakable to this dispatcher, which will be woken up when this
// object changes state to satisfy |signals| with context |context|. It will
« no previous file with comments | « mojo/edk/system/data_pipe_unittest.cc ('k') | mojo/edk/system/dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698