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

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

Issue 2725133002: Mojo: Armed Watchers (Closed)
Patch Set: . Created 3 years, 10 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
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..8e41e417d37a39ce0a5fc4dc54e35453a41a25c2 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,11 @@ 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 RegisterWatcher(MojoHandleSignals signals,
+ const Watcher::WatchCallback& callback,
+ uintptr_t context) override;
+ MojoResult ArmWatcher(uintptr_t context) override;
+ MojoResult UnregisterWatcher(uintptr_t context) override;
MojoResult WriteMessage(std::unique_ptr<MessageForTransit> message,
MojoWriteMessageFlags flags) override;
MojoResult ReadMessage(std::unique_ptr<MessageForTransit>* message,
@@ -111,6 +113,7 @@ class MessagePipeDispatcher : public Dispatcher {
bool port_transferred_ = false;
AtomicFlag port_closed_;
AwakableList awakables_;
+ WatcherSet watchers_;
DISALLOW_COPY_AND_ASSIGN(MessagePipeDispatcher);
};

Powered by Google App Engine
This is Rietveld 408576698