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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ipc/ipc_channel.h" | 9 #include "ipc/ipc_channel.h" |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 #define IPC_USES_READWRITE 1 | 47 #define IPC_USES_READWRITE 1 |
48 #endif | 48 #endif |
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 MessageLoopForIO::Watcher { | 53 public 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 ChannelListener* listener); |
58 virtual ~ChannelImpl(); | 58 virtual ~ChannelImpl(); |
59 bool Connect(); | 59 bool Connect(); |
60 void Close(); | 60 void Close(); |
61 bool Send(Message* message); | 61 bool Send(Message* message); |
62 int GetClientFileDescriptor(); | 62 int GetClientFileDescriptor(); |
63 int TakeClientFileDescriptor(); | 63 int TakeClientFileDescriptor(); |
64 void CloseClientFileDescriptor(); | 64 void CloseClientFileDescriptor(); |
65 bool AcceptsConnections() const; | 65 bool AcceptsConnections() const; |
66 bool HasAcceptedConnection() const; | 66 bool HasAcceptedConnection() const; |
67 bool GetClientEuid(uid_t* client_euid) const; | 67 bool GetClientEuid(uid_t* client_euid) const; |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 197 |
198 // The maximum length of the name of a pipe for MODE_NAMED_SERVER or | 198 // The maximum length of the name of a pipe for MODE_NAMED_SERVER or |
199 // MODE_NAMED_CLIENT if you want to pass in your own socket. | 199 // MODE_NAMED_CLIENT if you want to pass in your own socket. |
200 // The standard size on linux is 108, mac is 104. To maintain consistency | 200 // The standard size on linux is 108, mac is 104. To maintain consistency |
201 // across platforms we standardize on the smaller value. | 201 // across platforms we standardize on the smaller value. |
202 static const size_t kMaxPipeNameLength = 104; | 202 static const size_t kMaxPipeNameLength = 104; |
203 | 203 |
204 } // namespace IPC | 204 } // namespace IPC |
205 | 205 |
206 #endif // IPC_IPC_CHANNEL_POSIX_H_ | 206 #endif // IPC_IPC_CHANNEL_POSIX_H_ |
OLD | NEW |