| 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_LOCAL_MESSAGE_PIPE_ENDPOINT_H_ | 5 #ifndef MOJO_SYSTEM_LOCAL_MESSAGE_PIPE_ENDPOINT_H_ |
| 6 #define MOJO_SYSTEM_LOCAL_MESSAGE_PIPE_ENDPOINT_H_ | 6 #define MOJO_SYSTEM_LOCAL_MESSAGE_PIPE_ENDPOINT_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "mojo/system/message_in_transit_queue.h" | 10 #include "mojo/system/message_in_transit_queue.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // There's a dispatcher for |LocalMessagePipeEndpoint|s, so we have to | 30 // There's a dispatcher for |LocalMessagePipeEndpoint|s, so we have to |
| 31 // implement/override these: | 31 // implement/override these: |
| 32 virtual void Close() OVERRIDE; | 32 virtual void Close() OVERRIDE; |
| 33 virtual void CancelAllWaiters() OVERRIDE; | 33 virtual void CancelAllWaiters() OVERRIDE; |
| 34 virtual MojoResult ReadMessage(void* bytes, | 34 virtual MojoResult ReadMessage(void* bytes, |
| 35 uint32_t* num_bytes, | 35 uint32_t* num_bytes, |
| 36 DispatcherVector* dispatchers, | 36 DispatcherVector* dispatchers, |
| 37 uint32_t* num_dispatchers, | 37 uint32_t* num_dispatchers, |
| 38 MojoReadMessageFlags flags) OVERRIDE; | 38 MojoReadMessageFlags flags) OVERRIDE; |
| 39 virtual MojoResult AddWaiter(Waiter* waiter, | 39 virtual MojoResult AddWaiter(Waiter* waiter, |
| 40 MojoWaitFlags flags, | 40 MojoHandleSignals signals, |
| 41 uint32_t context) OVERRIDE; | 41 uint32_t context) OVERRIDE; |
| 42 virtual void RemoveWaiter(Waiter* waiter) OVERRIDE; | 42 virtual void RemoveWaiter(Waiter* waiter) OVERRIDE; |
| 43 | 43 |
| 44 // This is only to be used by |ProxyMessagePipeEndpoint|: | 44 // This is only to be used by |ProxyMessagePipeEndpoint|: |
| 45 MessageInTransitQueue* message_queue() { return &message_queue_; } | 45 MessageInTransitQueue* message_queue() { return &message_queue_; } |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 WaitFlagsState GetWaitFlagsState(); | 48 WaitFlagsState GetWaitFlagsState(); |
| 49 | 49 |
| 50 bool is_open_; | 50 bool is_open_; |
| 51 bool is_peer_open_; | 51 bool is_peer_open_; |
| 52 | 52 |
| 53 // Queue of incoming messages. | 53 // Queue of incoming messages. |
| 54 MessageInTransitQueue message_queue_; | 54 MessageInTransitQueue message_queue_; |
| 55 WaiterList waiter_list_; | 55 WaiterList waiter_list_; |
| 56 | 56 |
| 57 DISALLOW_COPY_AND_ASSIGN(LocalMessagePipeEndpoint); | 57 DISALLOW_COPY_AND_ASSIGN(LocalMessagePipeEndpoint); |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 } // namespace system | 60 } // namespace system |
| 61 } // namespace mojo | 61 } // namespace mojo |
| 62 | 62 |
| 63 #endif // MOJO_SYSTEM_LOCAL_MESSAGE_PIPE_ENDPOINT_H_ | 63 #endif // MOJO_SYSTEM_LOCAL_MESSAGE_PIPE_ENDPOINT_H_ |
| OLD | NEW |