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

Unified Diff: mojo/system/channel_endpoint.h

Issue 587153003: Mojo: Move the paused message queue from ProxyMessagePipeEndpoint to ChannelEndpoint. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@del_pmpe_attach
Patch Set: rebased Created 6 years, 3 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 | « no previous file | mojo/system/channel_endpoint.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/channel_endpoint.h
diff --git a/mojo/system/channel_endpoint.h b/mojo/system/channel_endpoint.h
index 7d85b8e35e80cf7c057170387182dc25660a8e34..78232a3d1512feed210c677d96da81cfd5fe1236 100644
--- a/mojo/system/channel_endpoint.h
+++ b/mojo/system/channel_endpoint.h
@@ -10,6 +10,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/synchronization/lock.h"
#include "mojo/system/message_in_transit.h"
+#include "mojo/system/message_in_transit_queue.h"
#include "mojo/system/system_impl_export.h"
namespace mojo {
@@ -112,6 +113,11 @@ class MOJO_SYSTEM_IMPL_EXPORT ChannelEndpoint
// TODO(vtl): More comments....
ChannelEndpoint(MessagePipe* message_pipe, unsigned port);
+ // Takes messages from the given |MessageInTransitQueue|. This must be called
+ // before this object is attached to a channel, and before anyone has a chance
+ // to enqueue any messages.
+ void TakeMessages(MessageInTransitQueue* message_queue);
+
// Methods called by |MessagePipe| (via |ProxyMessagePipeEndpoint|):
// TODO(vtl): This currently only works if we're "running". We'll move the
@@ -170,6 +176,10 @@ class MOJO_SYSTEM_IMPL_EXPORT ChannelEndpoint
MessageInTransit::EndpointId local_id_;
MessageInTransit::EndpointId remote_id_;
+ // This queue is used before we're running on a channel and ready to send
+ // messages.
+ MessageInTransitQueue paused_message_queue_;
+
DISALLOW_COPY_AND_ASSIGN(ChannelEndpoint);
};
« no previous file with comments | « no previous file | mojo/system/channel_endpoint.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698