| 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 // no actual implementation is needed. This will cause un-overridden calls to | 210 // no actual implementation is needed. This will cause un-overridden calls to |
| 211 // segfault. Do not use outside of test code! | 211 // segfault. Do not use outside of test code! |
| 212 Channel() : channel_impl_(0) { } | 212 Channel() : channel_impl_(0) { } |
| 213 | 213 |
| 214 private: | 214 private: |
| 215 // PIMPL to which all channel calls are delegated. | 215 // PIMPL to which all channel calls are delegated. |
| 216 class ChannelImpl; | 216 class ChannelImpl; |
| 217 ChannelImpl *channel_impl_; | 217 ChannelImpl *channel_impl_; |
| 218 }; | 218 }; |
| 219 | 219 |
| 220 #if defined(OS_LINUX) |
| 221 // On POSIX an IPC::Channel wraps a socketpair() with set some attributes |
| 222 // (such as non-blocking mode). This returns raw FD #s for the pair, which |
| 223 // allows us to pass file descriptors between processes (such as between |
| 224 // a plugin process and the browser process) before actual initialization |
| 225 // of IPC server Channel instance. |
| 226 bool SocketPair(int* fd1, int* fd2); |
| 227 #endif |
| 228 |
| 220 } // namespace IPC | 229 } // namespace IPC |
| 221 | 230 |
| 222 #endif // IPC_IPC_CHANNEL_H_ | 231 #endif // IPC_IPC_CHANNEL_H_ |
| OLD | NEW |