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

Unified Diff: mojo/system/message_pipe.h

Issue 67413003: Mojo: Implement plumbing to support passing handles over MessagePipes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: old chunk mismatch Created 7 years, 1 month 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/system/message_pipe.h
diff --git a/mojo/system/message_pipe.h b/mojo/system/message_pipe.h
index 67f99d2f584e1ed7ebf717c8f6311ac923ae8218..fc5ec636c8db46b31c4ceb33c71db5682e3b99fe 100644
--- a/mojo/system/message_pipe.h
+++ b/mojo/system/message_pipe.h
@@ -5,6 +5,8 @@
#ifndef MOJO_SYSTEM_MESSAGE_PIPE_H_
#define MOJO_SYSTEM_MESSAGE_PIPE_H_
+#include <vector>
+
#include "base/basictypes.h"
#include "base/callback.h"
#include "base/memory/ref_counted.h"
@@ -18,6 +20,7 @@ namespace mojo {
namespace system {
class Channel;
+class Dispatcher;
class MessagePipeEndpoint;
class Waiter;
@@ -43,16 +46,17 @@ class MOJO_SYSTEM_EXPORT MessagePipe :
void CancelAllWaiters(unsigned port);
void Close(unsigned port);
// Unlike |MessagePipeDispatcher::WriteMessage()|, this does not validate its
- // arguments. |bytes|/|num_bytes| and |handles|/|num_handles| must be valid.
+ // arguments.
MojoResult WriteMessage(unsigned port,
const void* bytes, uint32_t num_bytes,
- const MojoHandle* handles, uint32_t num_handles,
+ const std::vector<Dispatcher*>* dispatchers,
MojoWriteMessageFlags flags);
// Unlike |MessagePipeDispatcher::ReadMessage()|, this does not validate its
- // arguments. |bytes|/|num_bytes| and |handles|/|num_handles| must be valid.
+ // arguments.
MojoResult ReadMessage(unsigned port,
void* bytes, uint32_t* num_bytes,
- MojoHandle* handles, uint32_t* num_handles,
+ uint32_t max_num_dispatchers,
+ std::vector<scoped_refptr<Dispatcher> >* dispatchers,
MojoReadMessageFlags flags);
MojoResult AddWaiter(unsigned port,
Waiter* waiter,

Powered by Google App Engine
This is Rietveld 408576698