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_EDK_SYSTEM_LOCAL_MESSAGE_PIPE_ENDPOINT_H_ | 5 #ifndef MOJO_EDK_SYSTEM_LOCAL_MESSAGE_PIPE_ENDPOINT_H_ |
6 #define MOJO_EDK_SYSTEM_LOCAL_MESSAGE_PIPE_ENDPOINT_H_ | 6 #define MOJO_EDK_SYSTEM_LOCAL_MESSAGE_PIPE_ENDPOINT_H_ |
7 | 7 |
8 #include "mojo/edk/system/awakable_list.h" | 8 #include "mojo/edk/system/awakable_list.h" |
9 #include "mojo/edk/system/handle_signals_state.h" | 9 #include "mojo/edk/system/handle_signals_state.h" |
10 #include "mojo/edk/system/message_in_transit_queue.h" | 10 #include "mojo/edk/system/message_in_transit_queue.h" |
11 #include "mojo/edk/system/message_pipe_endpoint.h" | 11 #include "mojo/edk/system/message_pipe_endpoint.h" |
12 #include "mojo/edk/system/system_impl_export.h" | |
13 #include "mojo/public/cpp/system/macros.h" | 12 #include "mojo/public/cpp/system/macros.h" |
14 | 13 |
15 namespace mojo { | 14 namespace mojo { |
16 namespace system { | 15 namespace system { |
17 | 16 |
18 class MOJO_SYSTEM_IMPL_EXPORT LocalMessagePipeEndpoint final | 17 class LocalMessagePipeEndpoint final : public MessagePipeEndpoint { |
19 : public MessagePipeEndpoint { | |
20 public: | 18 public: |
21 // If |message_queue| is non-null, its contents will be taken as the queue of | 19 // If |message_queue| is non-null, its contents will be taken as the queue of |
22 // (already-received) messages. | 20 // (already-received) messages. |
23 explicit LocalMessagePipeEndpoint( | 21 explicit LocalMessagePipeEndpoint( |
24 MessageInTransitQueue* message_queue = nullptr); | 22 MessageInTransitQueue* message_queue = nullptr); |
25 ~LocalMessagePipeEndpoint() override; | 23 ~LocalMessagePipeEndpoint() override; |
26 | 24 |
27 // |MessagePipeEndpoint| implementation: | 25 // |MessagePipeEndpoint| implementation: |
28 Type GetType() const override; | 26 Type GetType() const override; |
29 bool OnPeerClose() override; | 27 bool OnPeerClose() override; |
(...skipping 27 matching lines...) Expand all Loading... |
57 MessageInTransitQueue message_queue_; | 55 MessageInTransitQueue message_queue_; |
58 AwakableList awakable_list_; | 56 AwakableList awakable_list_; |
59 | 57 |
60 MOJO_DISALLOW_COPY_AND_ASSIGN(LocalMessagePipeEndpoint); | 58 MOJO_DISALLOW_COPY_AND_ASSIGN(LocalMessagePipeEndpoint); |
61 }; | 59 }; |
62 | 60 |
63 } // namespace system | 61 } // namespace system |
64 } // namespace mojo | 62 } // namespace mojo |
65 | 63 |
66 #endif // MOJO_EDK_SYSTEM_LOCAL_MESSAGE_PIPE_ENDPOINT_H_ | 64 #endif // MOJO_EDK_SYSTEM_LOCAL_MESSAGE_PIPE_ENDPOINT_H_ |
OLD | NEW |