| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // Unlike |MessagePipeDispatcher::WriteMessage()|, this does not validate its | 48 // Unlike |MessagePipeDispatcher::WriteMessage()|, this does not validate its |
| 49 // arguments. | 49 // arguments. |
| 50 MojoResult WriteMessage(unsigned port, | 50 MojoResult WriteMessage(unsigned port, |
| 51 const void* bytes, uint32_t num_bytes, | 51 const void* bytes, uint32_t num_bytes, |
| 52 const std::vector<Dispatcher*>* dispatchers, | 52 const std::vector<Dispatcher*>* dispatchers, |
| 53 MojoWriteMessageFlags flags); | 53 MojoWriteMessageFlags flags); |
| 54 // Unlike |MessagePipeDispatcher::ReadMessage()|, this does not validate its | 54 // Unlike |MessagePipeDispatcher::ReadMessage()|, this does not validate its |
| 55 // arguments. | 55 // arguments. |
| 56 MojoResult ReadMessage(unsigned port, | 56 MojoResult ReadMessage(unsigned port, |
| 57 void* bytes, uint32_t* num_bytes, | 57 void* bytes, uint32_t* num_bytes, |
| 58 uint32_t max_num_dispatchers, | |
| 59 std::vector<scoped_refptr<Dispatcher> >* dispatchers, | 58 std::vector<scoped_refptr<Dispatcher> >* dispatchers, |
| 59 uint32_t* num_dispatchers, |
| 60 MojoReadMessageFlags flags); | 60 MojoReadMessageFlags flags); |
| 61 MojoResult AddWaiter(unsigned port, | 61 MojoResult AddWaiter(unsigned port, |
| 62 Waiter* waiter, | 62 Waiter* waiter, |
| 63 MojoWaitFlags flags, | 63 MojoWaitFlags flags, |
| 64 MojoResult wake_result); | 64 MojoResult wake_result); |
| 65 void RemoveWaiter(unsigned port, Waiter* waiter); | 65 void RemoveWaiter(unsigned port, Waiter* waiter); |
| 66 | 66 |
| 67 // This is used internally by |WriteMessage()| and by |Channel| to enqueue | 67 // This is used internally by |WriteMessage()| and by |Channel| to enqueue |
| 68 // messages (typically to a |LocalMessagePipeEndpoint|). Unlike | 68 // messages (typically to a |LocalMessagePipeEndpoint|). Unlike |
| 69 // |WriteMessage()|, |port| is the *destination* port. Takes ownership of | 69 // |WriteMessage()|, |port| is the *destination* port. Takes ownership of |
| (...skipping 19 matching lines...) Expand all Loading... |
| 89 base::Lock lock_; // Protects the following members. | 89 base::Lock lock_; // Protects the following members. |
| 90 scoped_ptr<MessagePipeEndpoint> endpoints_[2]; | 90 scoped_ptr<MessagePipeEndpoint> endpoints_[2]; |
| 91 | 91 |
| 92 DISALLOW_COPY_AND_ASSIGN(MessagePipe); | 92 DISALLOW_COPY_AND_ASSIGN(MessagePipe); |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 } // namespace system | 95 } // namespace system |
| 96 } // namespace mojo | 96 } // namespace mojo |
| 97 | 97 |
| 98 #endif // MOJO_SYSTEM_MESSAGE_PIPE_H_ | 98 #endif // MOJO_SYSTEM_MESSAGE_PIPE_H_ |
| OLD | NEW |