| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MOJO_EDK_SYSTEM_MESSAGE_PIPE_H_ | 5 #ifndef MOJO_EDK_SYSTEM_MESSAGE_PIPE_H_ |
| 6 #define MOJO_EDK_SYSTEM_MESSAGE_PIPE_H_ | 6 #define MOJO_EDK_SYSTEM_MESSAGE_PIPE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 MojoResult EnqueueMessage(unsigned port, | 121 MojoResult EnqueueMessage(unsigned port, |
| 122 scoped_ptr<MessageInTransit> message, | 122 scoped_ptr<MessageInTransit> message, |
| 123 std::vector<DispatcherTransport>* transports); | 123 std::vector<DispatcherTransport>* transports); |
| 124 | 124 |
| 125 // Helper for |EnqueueMessage()|. Must be called with |lock_| held. | 125 // Helper for |EnqueueMessage()|. Must be called with |lock_| held. |
| 126 MojoResult AttachTransportsNoLock( | 126 MojoResult AttachTransportsNoLock( |
| 127 unsigned port, | 127 unsigned port, |
| 128 MessageInTransit* message, | 128 MessageInTransit* message, |
| 129 std::vector<DispatcherTransport>* transports); | 129 std::vector<DispatcherTransport>* transports); |
| 130 | 130 |
| 131 // Used by |EnqueueMessage()| to handle control messages that are actually | |
| 132 // meant for us. | |
| 133 MojoResult HandleControlMessage(unsigned port, | |
| 134 scoped_ptr<MessageInTransit> message); | |
| 135 | |
| 136 base::Lock lock_; // Protects the following members. | 131 base::Lock lock_; // Protects the following members. |
| 137 scoped_ptr<MessagePipeEndpoint> endpoints_[2]; | 132 scoped_ptr<MessagePipeEndpoint> endpoints_[2]; |
| 138 | 133 |
| 139 DISALLOW_COPY_AND_ASSIGN(MessagePipe); | 134 DISALLOW_COPY_AND_ASSIGN(MessagePipe); |
| 140 }; | 135 }; |
| 141 | 136 |
| 142 } // namespace system | 137 } // namespace system |
| 143 } // namespace mojo | 138 } // namespace mojo |
| 144 | 139 |
| 145 #endif // MOJO_EDK_SYSTEM_MESSAGE_PIPE_H_ | 140 #endif // MOJO_EDK_SYSTEM_MESSAGE_PIPE_H_ |
| OLD | NEW |