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

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

Issue 1880823005: [mojo-edk] Add explicit message object APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make VS happy Created 4 years, 8 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 fd3f665b8e457c3e32a1c7ffbddd34aec7730454..0345a45203e4677fa15f239b345fdaed08472a06 100644
--- a/mojo/edk/system/message_pipe_dispatcher.h
+++ b/mojo/edk/system/message_pipe_dispatcher.h
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <memory>
#include <queue>
#include "base/macros.h"
@@ -14,6 +15,7 @@
#include "mojo/edk/system/atomic_flag.h"
#include "mojo/edk/system/awakable_list.h"
#include "mojo/edk/system/dispatcher.h"
+#include "mojo/edk/system/message_for_transit.h"
#include "mojo/edk/system/ports/port_ref.h"
namespace mojo {
@@ -52,16 +54,14 @@ class MessagePipeDispatcher : public Dispatcher {
const Watcher::WatchCallback& callback,
uintptr_t context) override;
MojoResult CancelWatch(uintptr_t context) override;
- MojoResult WriteMessage(const void* bytes,
- uint32_t num_bytes,
- const DispatcherInTransit* dispatchers,
- uint32_t num_dispatchers,
+ MojoResult WriteMessage(std::unique_ptr<MessageForTransit> message,
MojoWriteMessageFlags flags) override;
- MojoResult ReadMessage(void* bytes,
+ MojoResult ReadMessage(std::unique_ptr<MessageForTransit>* message,
uint32_t* num_bytes,
MojoHandle* handles,
uint32_t* num_handles,
- MojoReadMessageFlags flags) override;
+ MojoReadMessageFlags flags,
+ bool read_any_size) override;
HandleSignalsState GetHandleSignalsState() const override;
MojoResult AddAwakable(Awakable* awakable,
MojoHandleSignals signals,

Powered by Google App Engine
This is Rietveld 408576698