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_PROXY_MESSAGE_PIPE_ENDPOINT_H_ | 5 #ifndef MOJO_EDK_SYSTEM_PROXY_MESSAGE_PIPE_ENDPOINT_H_ |
6 #define MOJO_EDK_SYSTEM_PROXY_MESSAGE_PIPE_ENDPOINT_H_ | 6 #define MOJO_EDK_SYSTEM_PROXY_MESSAGE_PIPE_ENDPOINT_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "mojo/edk/system/message_in_transit.h" | 9 #include "mojo/edk/system/message_in_transit.h" |
10 #include "mojo/edk/system/message_pipe_endpoint.h" | 10 #include "mojo/edk/system/message_pipe_endpoint.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 // may be called at most once, after which |Close()| need not be called. | 37 // may be called at most once, after which |Close()| need not be called. |
38 // | 38 // |
39 // Note: The returned |ChannelEndpoint| must have its client changed while | 39 // Note: The returned |ChannelEndpoint| must have its client changed while |
40 // still under |MessagePipe|'s lock (which this must have also been called | 40 // still under |MessagePipe|'s lock (which this must have also been called |
41 // under). | 41 // under). |
42 scoped_refptr<ChannelEndpoint> ReleaseChannelEndpoint(); | 42 scoped_refptr<ChannelEndpoint> ReleaseChannelEndpoint(); |
43 | 43 |
44 // |MessagePipeEndpoint| implementation: | 44 // |MessagePipeEndpoint| implementation: |
45 Type GetType() const override; | 45 Type GetType() const override; |
46 bool OnPeerClose() override; | 46 bool OnPeerClose() override; |
47 void EnqueueMessage(scoped_ptr<MessageInTransit> message) override; | 47 void EnqueueMessage(std::unique_ptr<MessageInTransit> message) override; |
48 void Close() override; | 48 void Close() override; |
49 | 49 |
50 private: | 50 private: |
51 void DetachIfNecessary(); | 51 void DetachIfNecessary(); |
52 | 52 |
53 scoped_refptr<ChannelEndpoint> channel_endpoint_; | 53 scoped_refptr<ChannelEndpoint> channel_endpoint_; |
54 | 54 |
55 MOJO_DISALLOW_COPY_AND_ASSIGN(ProxyMessagePipeEndpoint); | 55 MOJO_DISALLOW_COPY_AND_ASSIGN(ProxyMessagePipeEndpoint); |
56 }; | 56 }; |
57 | 57 |
58 } // namespace system | 58 } // namespace system |
59 } // namespace mojo | 59 } // namespace mojo |
60 | 60 |
61 #endif // MOJO_EDK_SYSTEM_PROXY_MESSAGE_PIPE_ENDPOINT_H_ | 61 #endif // MOJO_EDK_SYSTEM_PROXY_MESSAGE_PIPE_ENDPOINT_H_ |
OLD | NEW |