OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 #define IPC_USES_READWRITE 1 | 45 #define IPC_USES_READWRITE 1 |
46 #endif | 46 #endif |
47 | 47 |
48 namespace IPC { | 48 namespace IPC { |
49 | 49 |
50 class Channel::ChannelImpl : public MessageLoopForIO::Watcher { | 50 class Channel::ChannelImpl : public MessageLoopForIO::Watcher { |
51 public: | 51 public: |
52 // Mirror methods of Channel, see ipc_channel.h for description. | 52 // Mirror methods of Channel, see ipc_channel.h for description. |
53 ChannelImpl(const IPC::ChannelHandle& channel_handle, Mode mode, | 53 ChannelImpl(const IPC::ChannelHandle& channel_handle, Mode mode, |
54 Listener* listener); | 54 Listener* listener); |
55 ~ChannelImpl(); | 55 virtual ~ChannelImpl(); |
56 bool Connect(); | 56 bool Connect(); |
57 void Close(); | 57 void Close(); |
58 void set_listener(Listener* listener) { listener_ = listener; } | 58 void set_listener(Listener* listener) { listener_ = listener; } |
59 bool Send(Message* message); | 59 bool Send(Message* message); |
60 int GetClientFileDescriptor() const; | 60 int GetClientFileDescriptor() const; |
61 bool AcceptsConnections() const; | 61 bool AcceptsConnections() const; |
62 bool HasAcceptedConnection() const; | 62 bool HasAcceptedConnection() const; |
63 bool GetClientEuid(uid_t* client_euid) const; | 63 bool GetClientEuid(uid_t* client_euid) const; |
64 void ResetToAcceptingConnectionState(); | 64 void ResetToAcceptingConnectionState(); |
65 | 65 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 151 |
152 // The maximum length of the name of a pipe for MODE_NAMED_SERVER or | 152 // The maximum length of the name of a pipe for MODE_NAMED_SERVER or |
153 // MODE_NAMED_CLIENT if you want to pass in your own socket. | 153 // MODE_NAMED_CLIENT if you want to pass in your own socket. |
154 // The standard size on linux is 108, mac is 104. To maintain consistency | 154 // The standard size on linux is 108, mac is 104. To maintain consistency |
155 // across platforms we standardize on the smaller value. | 155 // across platforms we standardize on the smaller value. |
156 static const size_t kMaxPipeNameLength = 104; | 156 static const size_t kMaxPipeNameLength = 104; |
157 | 157 |
158 } // namespace IPC | 158 } // namespace IPC |
159 | 159 |
160 #endif // IPC_IPC_CHANNEL_POSIX_H_ | 160 #endif // IPC_IPC_CHANNEL_POSIX_H_ |
OLD | NEW |