| 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_POSIX_H_ | 5 #ifndef IPC_IPC_CHANNEL_POSIX_H_ |
| 6 #define IPC_IPC_CHANNEL_POSIX_H_ | 6 #define IPC_IPC_CHANNEL_POSIX_H_ |
| 7 | 7 |
| 8 #include "ipc/ipc_channel.h" | 8 #include "ipc/ipc_channel.h" |
| 9 | 9 |
| 10 #include <sys/socket.h> // for CMSG macros | 10 #include <sys/socket.h> // for CMSG macros |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 namespace IPC { | 50 namespace IPC { |
| 51 | 51 |
| 52 class Channel::ChannelImpl : public internal::ChannelReader, | 52 class Channel::ChannelImpl : public internal::ChannelReader, |
| 53 public base::MessageLoopForIO::Watcher { | 53 public base::MessageLoopForIO::Watcher { |
| 54 public: | 54 public: |
| 55 // Mirror methods of Channel, see ipc_channel.h for description. | 55 // Mirror methods of Channel, see ipc_channel.h for description. |
| 56 ChannelImpl(const IPC::ChannelHandle& channel_handle, Mode mode, | 56 ChannelImpl(const IPC::ChannelHandle& channel_handle, Mode mode, |
| 57 Listener* listener); | 57 Listener* listener); |
| 58 virtual ~ChannelImpl(); | 58 virtual ~ChannelImpl(); |
| 59 static bool SocketPair(int* fd1, int* fd2); |
| 59 bool Connect(); | 60 bool Connect(); |
| 60 void Close(); | 61 void Close(); |
| 61 bool Send(Message* message); | 62 bool Send(Message* message); |
| 62 int GetClientFileDescriptor(); | 63 int GetClientFileDescriptor(); |
| 63 int TakeClientFileDescriptor(); | 64 int TakeClientFileDescriptor(); |
| 64 void CloseClientFileDescriptor(); | 65 void CloseClientFileDescriptor(); |
| 65 bool AcceptsConnections() const; | 66 bool AcceptsConnections() const; |
| 66 bool HasAcceptedConnection() const; | 67 bool HasAcceptedConnection() const; |
| 67 bool GetPeerEuid(uid_t* peer_euid) const; | 68 bool GetPeerEuid(uid_t* peer_euid) const; |
| 68 void ResetToAcceptingConnectionState(); | 69 void ResetToAcceptingConnectionState(); |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 // If non-zero, overrides the process ID sent in the hello message. | 202 // If non-zero, overrides the process ID sent in the hello message. |
| 202 static int global_pid_; | 203 static int global_pid_; |
| 203 #endif // OS_LINUX | 204 #endif // OS_LINUX |
| 204 | 205 |
| 205 DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelImpl); | 206 DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelImpl); |
| 206 }; | 207 }; |
| 207 | 208 |
| 208 } // namespace IPC | 209 } // namespace IPC |
| 209 | 210 |
| 210 #endif // IPC_IPC_CHANNEL_POSIX_H_ | 211 #endif // IPC_IPC_CHANNEL_POSIX_H_ |
| OLD | NEW |