Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Side by Side Diff: ipc/ipc_channel_posix.h

Issue 139993009: [WIP] Yet another demo for BMM NaCl ppapi connection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698