OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_INCOMING_ENDPOINT_H_ | 5 #ifndef MOJO_EDK_SYSTEM_INCOMING_ENDPOINT_H_ |
6 #define MOJO_EDK_SYSTEM_INCOMING_ENDPOINT_H_ | 6 #define MOJO_EDK_SYSTEM_INCOMING_ENDPOINT_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 // Must be called before destroying this object if |ConvertToMessagePipe()| | 33 // Must be called before destroying this object if |ConvertToMessagePipe()| |
34 // wasn't called (but |Init()| was). | 34 // wasn't called (but |Init()| was). |
35 void Close(); | 35 void Close(); |
36 | 36 |
37 // |ChannelEndpointClient| methods: | 37 // |ChannelEndpointClient| methods: |
38 bool OnReadMessage(unsigned port, MessageInTransit* message) override; | 38 bool OnReadMessage(unsigned port, MessageInTransit* message) override; |
39 void OnDetachFromChannel(unsigned port) override; | 39 void OnDetachFromChannel(unsigned port) override; |
40 | 40 |
41 private: | 41 private: |
42 virtual ~IncomingEndpoint(); | 42 ~IncomingEndpoint() override; |
43 | 43 |
44 base::Lock lock_; // Protects the following members. | 44 base::Lock lock_; // Protects the following members. |
45 scoped_refptr<ChannelEndpoint> endpoint_; | 45 scoped_refptr<ChannelEndpoint> endpoint_; |
46 MessageInTransitQueue message_queue_; | 46 MessageInTransitQueue message_queue_; |
47 | 47 |
48 DISALLOW_COPY_AND_ASSIGN(IncomingEndpoint); | 48 DISALLOW_COPY_AND_ASSIGN(IncomingEndpoint); |
49 }; | 49 }; |
50 | 50 |
51 } // namespace system | 51 } // namespace system |
52 } // namespace mojo | 52 } // namespace mojo |
53 | 53 |
54 #endif // MOJO_EDK_SYSTEM_INCOMING_ENDPOINT_H_ | 54 #endif // MOJO_EDK_SYSTEM_INCOMING_ENDPOINT_H_ |
OLD | NEW |