| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 Waiter* waiter, | 79 Waiter* waiter, |
| 80 MojoHandleSignals signals, | 80 MojoHandleSignals signals, |
| 81 uint32_t context, | 81 uint32_t context, |
| 82 HandleSignalsState* signals_state); | 82 HandleSignalsState* signals_state); |
| 83 void RemoveWaiter(unsigned port, | 83 void RemoveWaiter(unsigned port, |
| 84 Waiter* waiter, | 84 Waiter* waiter, |
| 85 HandleSignalsState* signals_state); | 85 HandleSignalsState* signals_state); |
| 86 | 86 |
| 87 // This is called by the dispatcher to convert a local endpoint to a proxy | 87 // This is called by the dispatcher to convert a local endpoint to a proxy |
| 88 // endpoint. | 88 // endpoint. |
| 89 void ConvertLocalToProxy(unsigned port); | 89 scoped_refptr<ChannelEndpoint> ConvertLocalToProxy(unsigned port); |
| 90 | 90 |
| 91 // This is used by |Channel| to enqueue messages (typically to a | 91 // This is used by |Channel| to enqueue messages (typically to a |
| 92 // |LocalMessagePipeEndpoint|). Unlike |WriteMessage()|, |port| is the | 92 // |LocalMessagePipeEndpoint|). Unlike |WriteMessage()|, |port| is the |
| 93 // *destination* port. | 93 // *destination* port. |
| 94 MojoResult EnqueueMessage(unsigned port, | 94 MojoResult EnqueueMessage(unsigned port, |
| 95 scoped_ptr<MessageInTransit> message); | 95 scoped_ptr<MessageInTransit> message); |
| 96 | 96 |
| 97 // These are used by |Channel|. | 97 // These are used by |Channel|. |
| 98 bool Attach(unsigned port, ChannelEndpoint* channel_endpoint); | 98 bool Attach(unsigned port, ChannelEndpoint* channel_endpoint); |
| 99 void Run(unsigned port); | 99 void Run(unsigned port); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 125 base::Lock lock_; // Protects the following members. | 125 base::Lock lock_; // Protects the following members. |
| 126 scoped_ptr<MessagePipeEndpoint> endpoints_[2]; | 126 scoped_ptr<MessagePipeEndpoint> endpoints_[2]; |
| 127 | 127 |
| 128 DISALLOW_COPY_AND_ASSIGN(MessagePipe); | 128 DISALLOW_COPY_AND_ASSIGN(MessagePipe); |
| 129 }; | 129 }; |
| 130 | 130 |
| 131 } // namespace system | 131 } // namespace system |
| 132 } // namespace mojo | 132 } // namespace mojo |
| 133 | 133 |
| 134 #endif // MOJO_SYSTEM_MESSAGE_PIPE_H_ | 134 #endif // MOJO_SYSTEM_MESSAGE_PIPE_H_ |
| OLD | NEW |