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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 MojoResult WriteMessage(unsigned port, | 51 MojoResult WriteMessage(unsigned port, |
52 const void* bytes, | 52 const void* bytes, |
53 uint32_t num_bytes, | 53 uint32_t num_bytes, |
54 std::vector<DispatcherTransport>* transports, | 54 std::vector<DispatcherTransport>* transports, |
55 MojoWriteMessageFlags flags); | 55 MojoWriteMessageFlags flags); |
56 // Unlike |MessagePipeDispatcher::ReadMessage()|, this does not validate its | 56 // Unlike |MessagePipeDispatcher::ReadMessage()|, this does not validate its |
57 // arguments. | 57 // arguments. |
58 MojoResult ReadMessage(unsigned port, | 58 MojoResult ReadMessage(unsigned port, |
59 void* bytes, | 59 void* bytes, |
60 uint32_t* num_bytes, | 60 uint32_t* num_bytes, |
61 std::vector<scoped_refptr<Dispatcher> >* dispatchers, | 61 DispatcherVector* dispatchers, |
62 uint32_t* num_dispatchers, | 62 uint32_t* num_dispatchers, |
63 MojoReadMessageFlags flags); | 63 MojoReadMessageFlags flags); |
64 MojoResult AddWaiter(unsigned port, | 64 MojoResult AddWaiter(unsigned port, |
65 Waiter* waiter, | 65 Waiter* waiter, |
66 MojoWaitFlags flags, | 66 MojoWaitFlags flags, |
67 MojoResult wake_result); | 67 MojoResult wake_result); |
68 void RemoveWaiter(unsigned port, Waiter* waiter); | 68 void RemoveWaiter(unsigned port, Waiter* waiter); |
69 | 69 |
70 // This is called by the dispatcher to convert a local endpoint to a proxy | 70 // This is called by the dispatcher to convert a local endpoint to a proxy |
71 // endpoint. | 71 // endpoint. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 base::Lock lock_; // Protects the following members. | 110 base::Lock lock_; // Protects the following members. |
111 scoped_ptr<MessagePipeEndpoint> endpoints_[2]; | 111 scoped_ptr<MessagePipeEndpoint> endpoints_[2]; |
112 | 112 |
113 DISALLOW_COPY_AND_ASSIGN(MessagePipe); | 113 DISALLOW_COPY_AND_ASSIGN(MessagePipe); |
114 }; | 114 }; |
115 | 115 |
116 } // namespace system | 116 } // namespace system |
117 } // namespace mojo | 117 } // namespace mojo |
118 | 118 |
119 #endif // MOJO_SYSTEM_MESSAGE_PIPE_H_ | 119 #endif // MOJO_SYSTEM_MESSAGE_PIPE_H_ |
OLD | NEW |