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
3 // found in the LICENSE file.
5 #ifndef IPC_IPC_CHANNEL_NACL_H_
6 #define IPC_IPC_CHANNEL_NACL_H_
9 #include "ipc/ipc_channel.h"
13 // Similar to the Posix version of ChannelImpl but for Native Client code.
14 // This is somewhat different because NaCl's send/recvmsg is slightly different
15 // and we don't need to worry about complicated set up and READWRITE mode for
17 class Channel::ChannelImpl
: public internal::ChannelReader
{
19 ChannelImpl(const IPC::ChannelHandle
& channel_handle
,
22 virtual ~ChannelImpl();
24 // Channel implementation.
27 bool Send(Message
* message
);
28 int GetClientFileDescriptor() const;
29 int TakeClientFileDescriptor();
30 bool AcceptsConnections() const;
31 bool HasAcceptedConnection() const;
32 bool GetClientEuid(uid_t
* client_euid
) const;
33 void ResetToAcceptingConnectionState();
34 static bool IsNamedServerInitialized(const std::string
& channel_id
);
37 DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelImpl
);
42 #endif // IPC_IPC_CHANNEL_NACL_H_