OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 IPC_IPC_CHANNEL_NACL_H_ | 5 #ifndef IPC_IPC_CHANNEL_NACL_H_ |
6 #define IPC_IPC_CHANNEL_NACL_H_ | 6 #define IPC_IPC_CHANNEL_NACL_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 // NaClDescCustom. See NaClIPCAdapter for the trusted-side implementation. | 28 // NaClDescCustom. See NaClIPCAdapter for the trusted-side implementation. |
29 // | 29 // |
30 // We don't need to worry about complicated set up and READWRITE mode for | 30 // We don't need to worry about complicated set up and READWRITE mode for |
31 // sharing handles. We also currently do not support passing file descriptors or | 31 // sharing handles. We also currently do not support passing file descriptors or |
32 // named pipes, and we use background threads to emulate signaling when we can | 32 // named pipes, and we use background threads to emulate signaling when we can |
33 // read or write without blocking. | 33 // read or write without blocking. |
34 class ChannelNacl : public Channel, | 34 class ChannelNacl : public Channel, |
35 public internal::ChannelReader { | 35 public internal::ChannelReader { |
36 public: | 36 public: |
37 // Mirror methods of Channel, see ipc_channel.h for description. | 37 // Mirror methods of Channel, see ipc_channel.h for description. |
38 // |broker| must outlive the newly created object. | |
39 ChannelNacl(const IPC::ChannelHandle& channel_handle, | 38 ChannelNacl(const IPC::ChannelHandle& channel_handle, |
40 Mode mode, | 39 Mode mode, |
41 Listener* listener, | 40 Listener* listener); |
42 AttachmentBroker* broker); | |
43 ~ChannelNacl() override; | 41 ~ChannelNacl() override; |
44 | 42 |
45 // Channel implementation. | 43 // Channel implementation. |
46 base::ProcessId GetPeerPID() const override; | 44 base::ProcessId GetPeerPID() const override; |
47 base::ProcessId GetSelfPID() const override; | 45 base::ProcessId GetSelfPID() const override; |
48 bool Connect() override; | 46 bool Connect() override; |
49 void Close() override; | 47 void Close() override; |
50 bool Send(Message* message) override; | 48 bool Send(Message* message) override; |
51 AttachmentBroker* GetAttachmentBroker() override; | 49 AttachmentBroker* GetAttachmentBroker() override; |
52 | 50 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 std::deque<linked_ptr<Message> > output_queue_; | 117 std::deque<linked_ptr<Message> > output_queue_; |
120 | 118 |
121 base::WeakPtrFactory<ChannelNacl> weak_ptr_factory_; | 119 base::WeakPtrFactory<ChannelNacl> weak_ptr_factory_; |
122 | 120 |
123 DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelNacl); | 121 DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelNacl); |
124 }; | 122 }; |
125 | 123 |
126 } // namespace IPC | 124 } // namespace IPC |
127 | 125 |
128 #endif // IPC_IPC_CHANNEL_NACL_H_ | 126 #endif // IPC_IPC_CHANNEL_NACL_H_ |
OLD | NEW |