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_H_ | 5 #ifndef IPC_IPC_CHANNEL_H_ |
6 #define IPC_IPC_CHANNEL_H_ | 6 #define IPC_IPC_CHANNEL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #if defined(OS_POSIX) | 10 #if defined(OS_POSIX) |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 virtual base::ProcessId GetPeerPID() const = 0; | 171 virtual base::ProcessId GetPeerPID() const = 0; |
172 | 172 |
173 // Get its own process id. This value is told to the peer. | 173 // Get its own process id. This value is told to the peer. |
174 virtual base::ProcessId GetSelfPID() const = 0; | 174 virtual base::ProcessId GetSelfPID() const = 0; |
175 | 175 |
176 // Overridden from ipc::Sender. | 176 // Overridden from ipc::Sender. |
177 // Send a message over the Channel to the listener on the other end. | 177 // Send a message over the Channel to the listener on the other end. |
178 // | 178 // |
179 // |message| must be allocated using operator new. This object will be | 179 // |message| must be allocated using operator new. This object will be |
180 // deleted once the contents of the Message have been sent. | 180 // deleted once the contents of the Message have been sent. |
181 virtual bool Send(Message* message) override = 0; | 181 bool Send(Message* message) override = 0; |
182 | 182 |
183 // NaCl in Non-SFI mode runs on Linux directly, and the following functions | 183 // NaCl in Non-SFI mode runs on Linux directly, and the following functions |
184 // compiled on Linux are also needed. Please see also comments in | 184 // compiled on Linux are also needed. Please see also comments in |
185 // components/nacl_nonsfi.gyp for more details. | 185 // components/nacl_nonsfi.gyp for more details. |
186 #if defined(OS_POSIX) && !defined(OS_NACL_SFI) | 186 #if defined(OS_POSIX) && !defined(OS_NACL_SFI) |
187 // On POSIX an IPC::Channel wraps a socketpair(), this method returns the | 187 // On POSIX an IPC::Channel wraps a socketpair(), this method returns the |
188 // FD # for the client end of the socket. | 188 // FD # for the client end of the socket. |
189 // This method may only be called on the server side of a channel. | 189 // This method may only be called on the server side of a channel. |
190 // This method can be called on any thread. | 190 // This method can be called on any thread. |
191 virtual int GetClientFileDescriptor() const = 0; | 191 virtual int GetClientFileDescriptor() const = 0; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 | 230 |
231 #if defined(OS_POSIX) | 231 #if defined(OS_POSIX) |
232 // SocketPair() creates a pair of socket FDs suitable for using with | 232 // SocketPair() creates a pair of socket FDs suitable for using with |
233 // IPC::Channel. | 233 // IPC::Channel. |
234 IPC_EXPORT bool SocketPair(int* fd1, int* fd2); | 234 IPC_EXPORT bool SocketPair(int* fd1, int* fd2); |
235 #endif | 235 #endif |
236 | 236 |
237 } // namespace IPC | 237 } // namespace IPC |
238 | 238 |
239 #endif // IPC_IPC_CHANNEL_H_ | 239 #endif // IPC_IPC_CHANNEL_H_ |
OLD | NEW |