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

Unified Diff: mojo/system/message_pipe_endpoint.h

Issue 68993005: Mojo: More plumbing to support sending handles over MessagePipes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « mojo/system/message_pipe_dispatcher.cc ('k') | mojo/system/message_pipe_endpoint.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/message_pipe_endpoint.h
diff --git a/mojo/system/message_pipe_endpoint.h b/mojo/system/message_pipe_endpoint.h
index 14e989765c36119a2e527c1e7aac59bdf8b729ab..00c67e3c039fb37c4f15aaa02efc410652cc893c 100644
--- a/mojo/system/message_pipe_endpoint.h
+++ b/mojo/system/message_pipe_endpoint.h
@@ -5,6 +5,10 @@
#ifndef MOJO_SYSTEM_MESSAGE_PIPE_ENDPOINT_H_
#define MOJO_SYSTEM_MESSAGE_PIPE_ENDPOINT_H_
+#include <stdint.h>
+
+#include <vector>
+
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "mojo/public/system/core.h"
@@ -15,6 +19,7 @@ namespace mojo {
namespace system {
class Channel;
+class Dispatcher;
class Waiter;
// This is an interface to one of the ends of a message pipe, and is used by
@@ -34,7 +39,9 @@ class MOJO_SYSTEM_EXPORT MessagePipeEndpoint {
// Returns false if the endpoint should be closed and destroyed, else true.
virtual bool OnPeerClose() = 0;
// Takes ownership of |message|.
- virtual MojoResult EnqueueMessage(MessageInTransit* message) = 0;
+ virtual MojoResult EnqueueMessage(
+ MessageInTransit* message,
+ const std::vector<Dispatcher*>* dispatchers) = 0;
// Implementations must override these if they represent a local endpoint,
// i.e., one for which there's a |MessagePipeDispatcher| (and thus a handle).
@@ -45,9 +52,11 @@ class MOJO_SYSTEM_EXPORT MessagePipeEndpoint {
// though |MessagePipe|'s implementation may have to do a little more if the
// operation involves both endpoints.
virtual void CancelAllWaiters();
- virtual MojoResult ReadMessage(void* bytes, uint32_t* num_bytes,
- MojoHandle* handles, uint32_t* num_handles,
- MojoReadMessageFlags flags);
+ virtual MojoResult ReadMessage(
+ void* bytes, uint32_t* num_bytes,
+ uint32_t max_num_dispatchers,
+ std::vector<scoped_refptr<Dispatcher> >* dispatchers,
+ MojoReadMessageFlags flags);
virtual MojoResult AddWaiter(Waiter* waiter,
MojoWaitFlags flags,
MojoResult wake_result);
« no previous file with comments | « mojo/system/message_pipe_dispatcher.cc ('k') | mojo/system/message_pipe_endpoint.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698