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

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

Issue 1943123002: Make it possible to write a message pipe endpoint's peer into it. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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 be86377147c0cdf327a2eb9c4441853a5901a825..8eb9d0c46409caed6ab527c6e8dfe804afc5837a 100644
--- a/mojo/edk/system/message_pipe_dispatcher.h
+++ b/mojo/edk/system/message_pipe_dispatcher.h
@@ -16,7 +16,6 @@ namespace system {
class ChannelEndpoint;
class MessagePipe;
-class MessagePipeDispatcherTransport;
// This is the |Dispatcher| implementation for message pipes (created by the
// Mojo primitive |MojoCreateMessagePipe()|). This class is thread-safe.
@@ -64,8 +63,6 @@ class MessagePipeDispatcher final : public Dispatcher {
size_t size);
private:
- friend class MessagePipeDispatcherTransport;
-
MessagePipeDispatcher();
~MessagePipeDispatcher() override;
@@ -80,8 +77,9 @@ class MessagePipeDispatcher final : public Dispatcher {
// |Dispatcher| protected methods:
void CancelAllAwakablesNoLock() override;
void CloseImplNoLock() override;
- util::RefPtr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock()
- override;
+ util::RefPtr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock(
+ MessagePipe* message_pipe,
+ unsigned port) override;
MojoResult WriteMessageImplNoLock(
UserPointer<const void> bytes,
uint32_t num_bytes,
@@ -117,23 +115,6 @@ class MessagePipeDispatcher final : public Dispatcher {
MOJO_DISALLOW_COPY_AND_ASSIGN(MessagePipeDispatcher);
};
-class MessagePipeDispatcherTransport : public DispatcherTransport {
- public:
- explicit MessagePipeDispatcherTransport(DispatcherTransport transport);
-
- MessagePipe* GetMessagePipe() {
- return message_pipe_dispatcher()->GetMessagePipeNoLock();
- }
- unsigned GetPort() { return message_pipe_dispatcher()->GetPortNoLock(); }
-
- private:
- MessagePipeDispatcher* message_pipe_dispatcher() {
- return static_cast<MessagePipeDispatcher*>(dispatcher());
- }
-
- // Copy and assign allowed.
-};
-
} // namespace system
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698