| 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_SYSTEM_MESSAGE_PIPE_H_ | 5 #ifndef MOJO_SYSTEM_MESSAGE_PIPE_H_ |
| 6 #define MOJO_SYSTEM_MESSAGE_PIPE_H_ | 6 #define MOJO_SYSTEM_MESSAGE_PIPE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 // Unlike |MessagePipeDispatcher::ReadMessage()|, this does not validate its | 59 // Unlike |MessagePipeDispatcher::ReadMessage()|, this does not validate its |
| 60 // arguments. | 60 // arguments. |
| 61 MojoResult ReadMessage(unsigned port, | 61 MojoResult ReadMessage(unsigned port, |
| 62 void* bytes, | 62 void* bytes, |
| 63 uint32_t* num_bytes, | 63 uint32_t* num_bytes, |
| 64 DispatcherVector* dispatchers, | 64 DispatcherVector* dispatchers, |
| 65 uint32_t* num_dispatchers, | 65 uint32_t* num_dispatchers, |
| 66 MojoReadMessageFlags flags); | 66 MojoReadMessageFlags flags); |
| 67 MojoResult AddWaiter(unsigned port, | 67 MojoResult AddWaiter(unsigned port, |
| 68 Waiter* waiter, | 68 Waiter* waiter, |
| 69 MojoWaitFlags flags, | 69 MojoHandleSignals signals, |
| 70 uint32_t context); | 70 uint32_t context); |
| 71 void RemoveWaiter(unsigned port, Waiter* waiter); | 71 void RemoveWaiter(unsigned port, Waiter* waiter); |
| 72 | 72 |
| 73 // This is called by the dispatcher to convert a local endpoint to a proxy | 73 // This is called by the dispatcher to convert a local endpoint to a proxy |
| 74 // endpoint. | 74 // endpoint. |
| 75 void ConvertLocalToProxy(unsigned port); | 75 void ConvertLocalToProxy(unsigned port); |
| 76 | 76 |
| 77 // This is used by |Channel| to enqueue messages (typically to a | 77 // This is used by |Channel| to enqueue messages (typically to a |
| 78 // |LocalMessagePipeEndpoint|). Unlike |WriteMessage()|, |port| is the | 78 // |LocalMessagePipeEndpoint|). Unlike |WriteMessage()|, |port| is the |
| 79 // *destination* port. | 79 // *destination* port. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 base::Lock lock_; // Protects the following members. | 113 base::Lock lock_; // Protects the following members. |
| 114 scoped_ptr<MessagePipeEndpoint> endpoints_[2]; | 114 scoped_ptr<MessagePipeEndpoint> endpoints_[2]; |
| 115 | 115 |
| 116 DISALLOW_COPY_AND_ASSIGN(MessagePipe); | 116 DISALLOW_COPY_AND_ASSIGN(MessagePipe); |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 } // namespace system | 119 } // namespace system |
| 120 } // namespace mojo | 120 } // namespace mojo |
| 121 | 121 |
| 122 #endif // MOJO_SYSTEM_MESSAGE_PIPE_H_ | 122 #endif // MOJO_SYSTEM_MESSAGE_PIPE_H_ |
| OLD | NEW |