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

Unified Diff: mojo/system/channel_endpoint.h

Issue 577313002: Mojo: Give ChannelEndpoint the remote ID and ProxyMessagePipeEndpoint the ChannelEndpoint. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « mojo/system/channel.cc ('k') | 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 351d5d414b9904bbc4df315e311c2398b2bcfa04..1cfc7c6fa0c215a17ed26d53f6004d30d68ac21b 100644
--- a/mojo/system/channel_endpoint.h
+++ b/mojo/system/channel_endpoint.h
@@ -114,10 +114,10 @@ class MOJO_SYSTEM_IMPL_EXPORT ChannelEndpoint
// |Channel::AttachMessagePipeEndpoint()| to a |Channel::AttachEndpoint()|
// that takes a |ChannelEndpoint|, and move |ChannelEndpoint| creation out of
// |Channel|.)
- ChannelEndpoint(MessagePipe* message_pipe,
- unsigned port,
- Channel* channel,
- MessageInTransit::EndpointId local_id);
+ ChannelEndpoint(MessagePipe* message_pipe, unsigned port);
+
+ void AttachToChannel(Channel* channel, MessageInTransit::EndpointId local_id);
+ void Run(MessageInTransit::EndpointId remote_id);
// Called by |Channel| before it gives up its reference to this object.
void DetachFromChannel();
@@ -142,6 +142,7 @@ class MOJO_SYSTEM_IMPL_EXPORT ChannelEndpoint
~ChannelEndpoint();
State state_;
+ // TODO(vtl): When moved under lock, this can/should be made a raw pointer.
scoped_refptr<MessagePipe> message_pipe_;
unsigned port_;
@@ -149,12 +150,11 @@ class MOJO_SYSTEM_IMPL_EXPORT ChannelEndpoint
// Protects the members below.
base::Lock lock_;
- // |channel_| must be alive whenever this is nonnull. Before the |channel_|
+ // |channel_| must be alive whenever this is non-null. Before the |channel_|
// gives up its reference to this object, it will call |DetachFromChannel()|.
Channel* channel_;
MessageInTransit::EndpointId local_id_;
- // TODO(vtl):
- // MessageInTransit::EndpointId remote_id_;
+ MessageInTransit::EndpointId remote_id_;
DISALLOW_COPY_AND_ASSIGN(ChannelEndpoint);
};
« no previous file with comments | « mojo/system/channel.cc ('k') | mojo/system/channel_endpoint.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698