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

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

Issue 2725133002: 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/dispatcher.cc ('k') | mojo/edk/system/message_pipe_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/message_pipe_dispatcher.h
diff --git a/mojo/edk/system/message_pipe_dispatcher.h b/mojo/edk/system/message_pipe_dispatcher.h
index 6743222bef081a97b80df4e89dff9289217f0a15..a7c1e69f607979017a29114493c51d971f7e0f2f 100644
--- a/mojo/edk/system/message_pipe_dispatcher.h
+++ b/mojo/edk/system/message_pipe_dispatcher.h
@@ -16,6 +16,7 @@
#include "mojo/edk/system/dispatcher.h"
#include "mojo/edk/system/message_for_transit.h"
#include "mojo/edk/system/ports/port_ref.h"
+#include "mojo/edk/system/watcher_set.h"
namespace mojo {
namespace edk {
@@ -48,10 +49,6 @@ class MessagePipeDispatcher : public Dispatcher {
// Dispatcher:
Type GetType() const override;
MojoResult Close() override;
- MojoResult Watch(MojoHandleSignals signals,
- const Watcher::WatchCallback& callback,
- uintptr_t context) override;
- MojoResult CancelWatch(uintptr_t context) override;
MojoResult WriteMessage(std::unique_ptr<MessageForTransit> message,
MojoWriteMessageFlags flags) override;
MojoResult ReadMessage(std::unique_ptr<MessageForTransit>* message,
@@ -61,6 +58,10 @@ class MessagePipeDispatcher : public Dispatcher {
MojoReadMessageFlags flags,
bool read_any_size) override;
HandleSignalsState GetHandleSignalsState() const override;
+ MojoResult AddWatcherRef(const scoped_refptr<WatcherDispatcher>& watcher,
+ uintptr_t context) override;
+ MojoResult RemoveWatcherRef(WatcherDispatcher* watcher,
+ uintptr_t context) override;
MojoResult AddAwakable(Awakable* awakable,
MojoHandleSignals signals,
uintptr_t context,
@@ -111,6 +112,7 @@ class MessagePipeDispatcher : public Dispatcher {
bool port_transferred_ = false;
AtomicFlag port_closed_;
AwakableList awakables_;
+ WatcherSet watchers_;
DISALLOW_COPY_AND_ASSIGN(MessagePipeDispatcher);
};
« no previous file with comments | « mojo/edk/system/dispatcher.cc ('k') | mojo/edk/system/message_pipe_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698