| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 Listener* listener); | 58 Listener* listener); |
| 59 virtual ~ChannelPosix(); | 59 virtual ~ChannelPosix(); |
| 60 | 60 |
| 61 // Channel implementation | 61 // Channel implementation |
| 62 virtual bool Connect() override; | 62 virtual bool Connect() override; |
| 63 virtual void Close() override; | 63 virtual void Close() override; |
| 64 virtual bool Send(Message* message) override; | 64 virtual bool Send(Message* message) override; |
| 65 virtual base::ProcessId GetPeerPID() const override; | 65 virtual base::ProcessId GetPeerPID() const override; |
| 66 virtual base::ProcessId GetSelfPID() const override; | 66 virtual base::ProcessId GetSelfPID() const override; |
| 67 virtual int GetClientFileDescriptor() const override; | 67 virtual int GetClientFileDescriptor() const override; |
| 68 virtual int TakeClientFileDescriptor() override; | 68 virtual base::ScopedFD TakeClientFileDescriptor() override; |
| 69 | 69 |
| 70 // Returns true if the channel supports listening for connections. | 70 // Returns true if the channel supports listening for connections. |
| 71 bool AcceptsConnections() const; | 71 bool AcceptsConnections() const; |
| 72 | 72 |
| 73 // Returns true if the channel supports listening for connections and is | 73 // Returns true if the channel supports listening for connections and is |
| 74 // currently connected. | 74 // currently connected. |
| 75 bool HasAcceptedConnection() const; | 75 bool HasAcceptedConnection() const; |
| 76 | 76 |
| 77 // Closes any currently connected socket, and returns to a listening state | 77 // Closes any currently connected socket, and returns to a listening state |
| 78 // for more connections. | 78 // for more connections. |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 // If non-zero, overrides the process ID sent in the hello message. | 218 // If non-zero, overrides the process ID sent in the hello message. |
| 219 static int global_pid_; | 219 static int global_pid_; |
| 220 #endif // OS_LINUX | 220 #endif // OS_LINUX |
| 221 | 221 |
| 222 DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelPosix); | 222 DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelPosix); |
| 223 }; | 223 }; |
| 224 | 224 |
| 225 } // namespace IPC | 225 } // namespace IPC |
| 226 | 226 |
| 227 #endif // IPC_IPC_CHANNEL_POSIX_H_ | 227 #endif // IPC_IPC_CHANNEL_POSIX_H_ |
| OLD | NEW |